线性布局管理器对存放其中的控件或布局采用线性方式管理
2.LinearLayout的常用属性gravity属性可以多个连用,用|隔开
3.用法
<span style="font-family:KaiTi_GB2312;"><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="第一个Button按钮"
android:id="@+id/button_first" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="第二个Button按钮"
android:id="@+id/button2"
android:layout_gravity="center_horizontal" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="实现跳转页面功能"
android:id="@+id/textView"
android:layout_gravity="center_horizontal" />
</LinearLayout></span>版权声明:本文为博主原创文章,未经博主允许不得转载。
Android自学笔记之 Android五大布局之线性布局的功能、常用属性、用法
原文:http://blog.csdn.net/j_a_v_a_guan/article/details/48152249