edit the main. xml to display the string "hello world + name"
\u0026lt;? xml version = "1.0" encoding = "utf-8"?>
\u0026lt;LinearLayout xmlns: android = " ;
http://schemas.android.com/apk/res/android "
android: orientation = "vertical" android
: layout_width = "fill_parent"
android: layout_height = "fill_parent"
>
\u0026lt;TextView android
: layout_width = "fill_parent"
& # 160; android: layout_height = "wrap_content"
android: text = "Hello World, Lorenzo" />
\u0026lt;TextView
; android: layout_width = "fill_parent"android: layout_height = "wrap_content" ; android: text = "Hello World, Luigi" /> \u0026lt;TextView android : layout_width = "fill_parent" android: layout_height = "wrap_content" & # 160; android: text = "Hello World, Daniele"
/> Android: layout_height = "wrap_content"android: text = "Hello World, Michael"
/> \u0026lt; ; / LinearLayout>
--------------------------------------- ------------------------------
main.xml Amend by adding a button that says "I am a button"
\u0026lt;? xml version = "1.0" encoding = "utf-8"?>
\u0026lt;LinearLayout xmlns: android = "
http://schemas.android.com/apk/res/android"
android: orientation = "vertical"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
>
\u0026lt;TextView android
: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: text = "Hello World, Bottone"
/>
\u0026lt; Button android: id = "@ + id / bottone"
android: layout_width = "fill_parent"
& # 160; android: layout_height = "wrap_content"
& # 160; android: text = "I'm a button!"
/ >
0 comments:
Post a Comment