Android的线性布局
简介:
线性布局是Android UI中使用最为频繁的一种,使用类LinearLayout进行管理。LinearLayout属于ViewGroup,LinearLayout线性布局有两种,一种为Vertical垂直分布,另一种为Horizontal水平分布。
实例:
下面将举两个栗子
介绍线性布局的垂直分布
<!--vertical垂直分布-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="垂直分布1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="垂直分布2"/>
&