Android布局的高按照比例来分布

来源:互联网 发布:linux 删除匹配文件 编辑:程序博客网 时间:2024/05/10 04:40

线性布局(五比一):

<LinearLayout        android:layout_width="match_parent"        android:layout_height="match_parent"        android:orientation="vertical" >        <LinearLayout            android:layout_weight="5"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:background="#FF0000" >        </LinearLayout>        <LinearLayout             android:layout_weight="1"            android:layout_width="match_parent"            android:layout_height="wrap_content" >        </LinearLayout>    </LinearLayout>
0 0