<LinearLayout android:id="@+id/lnLayoutBottom" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1" /> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1" android:enabled="false"/> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1" /> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1" android:enabled="false"/> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1" android:enabled="false"/> </LinearLayout>
如果 五个Button的android:layout_width 属性 设置为 "fill_parent" 则 在android:layout_weight 的影响下, 起五个button的长度将相等,
如果设置为 wrap_content , 则其长度不等。。。。。