Étape 3: écrire votre code xml
< xmlns:android RelativeLayout = "http://schemas.android.com/apk/res/android"xmlns:Tools = "http://schemas.android.com/tools"
Android : layout_width = « match_parent »
Android : layout_height = « match_parent »
Android : paddingBottom = "
Android : paddingLeft = "
Android : paddingRight = "
Android : paddingTop = "
outils : context = ". MainActivity">
< TextView
Android : id = "
Android : layout_width = « wrap_content »
Android : layout_height = « wrap_content »
Android : layout_gravity = « center »
Android : text = « Arduino Simple automatisation »
Android : textAppearance = "? android : attr / textAppearanceLarge" / >
< LinearLayout
Android : id = "
Android : layout_width = « fill_parent »
Android : layout_height = « wrap_content »
Android : layout_alignLeft = "
Android : layout_below = "
Android : orientation = « horizontal » >
< bouton
Android : id = "
Android : layout_width = « 100dp »
Android : layout_height = « 100dp »
Android : layout_weight = « 0,39 »
Android : text = « LED 1 ON » / >
< bouton
Android : id = "
Android : layout_width = « 100dp »
Android : layout_height = « 100dp »
Android : layout_weight = « 0,39 »
Android : text = « LED 1 OFF » / >
< / LinearLayout >
< LinearLayout
Android : id = "
Android : layout_width = « fill_parent »
Android : layout_height = « wrap_content »
Android : layout_alignLeft = "
Android : layout_alignRight = "
Android : layout_below = "
Android : orientation = « horizontal » >
< bouton
Android : id = "
Android : layout_width = « 100dp »
Android : layout_height = « 100dp »
Android : layout_weight = « 0,39 »
Android : text = « LED 2 ON » / >
< bouton
Android : id = "
Android : layout_width = « 100dp »
Android : layout_height = « 100dp »
Android : layout_weight = « 0,39 »
Android : text = « LED 2 OFF » / >
< / LinearLayout >
< / RelativeLayout >