layout的均分设置

来源:互联网 发布:外盘期货数据接口 编辑:程序博客网 时间:2024/05/08 07:08
<LinearLayout    android:id="@+id/id_tab_bottom_weixin"    android:layout_width="0dp"    android:layout_height="match_parent"    android:layout_weight="1"    android:gravity="center"    android:orientation="vertical" >

这段代码中,

android:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"

设置android:layout_width为0dp,表示由LinearLayout中的元素进行均分宽度,其中权重为1。

0 0
原创粉丝点击