注意四点
第一:设置LinearLayout 设置水平horizontal
第二:设置LinearLayout 高宽为match_parent
第三:设置控件 android:layout_weight=“1”
第四:设置控件 高宽为wrap_content
参考下面
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"<!--注意设置horizontal-->
android:background="@android:color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">
<控件
android:layout_weight="1" <!--注意设置weight-->
android:text="aaaaaaaaaaaa"
android:layout_width="wrap_content"<!--注意设置wrap_content-->
android:layout_height="wrap_content"/><!--注意设置wrap_content-->
<控件
android:layout_weight="1"
android:text="bbbbb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<控件
android:layout_weight="1"
android:text="c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>