the It will affect the width of in horizontal orientation and LinearLayout. Views height in vertical orientation. Remove the attribute from both buttons, add four android:android_weight more controls, set the attribute of all the five Button android:layout_width buttons to "match_parent", and change their to some android:textattribute newly created string resource. The final UI should look like that in Figure 50. (You have done all these before, so take it as a revision. ;P) Figure 50: The new Look The modified should like that in Figure 51. *activity_main.xml* Figure 51: Modified activity_main.xml Icon Caption It is more common for a control to be rendered with a text caption, but it Button can also be rendered with an icon or both. Open in "activity_main.xml" the view, follow the from Figures 52 to 54 to add an icon on top of the Text text caption of the button. We will use the default icon called LinearLayout "ic_launcher" provided by Android Studio. Figure 51: Add drawable to Button Figure 53: Add drawable to Button Figure 54: Add drawable to Button There you are, the icon has been added on top of ic_launcher the button (Figure 55). LinearLayout
the LinearLayout. It will affect the width of Views in horizontal orientation and height in vertical orientation. Remove the android:android_weight attribute from both buttons, add four more Button controls, set the android:layout_width attribute of all the five buttons to "match_parent", and change their android:textattribute to some newly created string resource. The final UI should look like that in Figure 50. (You have done all these before, so take it as a revision. ;P) Figure 50: The new Look The modified *activity_main.xml* should like that in Figure 51. Figure 51: Modified activity_main.xml Icon Caption It is more common for a Button control to be rendered with a text caption, but it can also be rendered with an icon or both. Open "activity_main.xml" in the Text view, follow the from Figures 52 to 54 to add an icon on top of the text caption of the LinearLayout button. We will use the default icon called "ic_launcher" provided by Android Studio. Figure 51: Add drawable to Button Figure 53: Add drawable to Button Figure 54: Add drawable to Button There you are, the ic_launcher icon has been added on top of the LinearLayout button (Figure 55).
Android%20UI%20and%20Controls%20New.docx