Learn Archive:
1 <?XML version= "1.0" encoding= "Utf-8"?>2 <LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"3 android:orientation= "vertical"4 Android:layout_width= "Fill_parent"5 Android:layout_height= "Fill_parent">6 <ButtonAndroid:text= "button One"7 Android:layout_width= "Fill_parent"8 Android:layout_height= "Wrap_content"9 android:gravity= "Left"/>Ten <ButtonAndroid:text= "button Two" One Android:layout_width= "Fill_parent" A Android:layout_height= "Wrap_content" - android:gravity= "Center"/> - <ButtonAndroid:text= "button three" the Android:layout_width= "Fill_parent" - Android:layout_height= "Wrap_content" - android:gravity= "Right"/> - <LinearLayoutandroid:orientation= "Horizontal" + Android:layout_width= "Fill_parent" - Android:layout_height= "Wrap_content"> + <ButtonAndroid:text= "button Four" A Android:layout_width= "Wrap_content" at Android:layout_height= "Wrap_content" - Android:layout_weight= "0.25"/> - <ButtonAndroid:text= "button Five" - Android:layout_width= "Wrap_content" - Android:layout_height= "Wrap_content" - Android:layout_weight= "0.75"/> in </LinearLayout> - </LinearLayout>
The effect is as follows:
Android app uses two linearlayout to orchestrate 5 button controls