一,线性布局(LinearLayout)

以线性方向显示它的子视图(view)元素,垂直或水平,

android:orientation值为“vertical”垂直排列,"horizontal"即为水平排列,

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:orientation="vertical" >      <Button android:layout_width="match_parent" android:layout_height="wrap_content"         android:id="@+id/button1" android:text="线"  ></Button>     <Button android:layout_width="match_parent" android:layout_height="wrap_content"         android:id="@+id/button2" android:text="性"  ></Button>     <Button android:layout_width="match_parent" android:layout_height="wrap_content"         android:id="@+id/button3" android:text="布"  ></Button>     <Button android:layout_width="match_parent" android:layout_height="wrap_content"         android:id="@+id/button4" android:text="局"  ></Button>  </LinearLayout> 

\"><br><br><br></p><p style=

更多相关文章

  1. android 水平(左右)滚动 HorizontalScrollView
  2. Android中TextView如何实现水平和垂直滚动
  3. Android控制水平方向字体缩放android:textScaleX
  4. Android四大布局之线性布局及其属性
  5. android线性布局控件之间的距离设置
  6. android中空的view,可以设置为水平线
  7. android的布局水平与垂直显示
  8. Android Studio App设置线性布局LinerLayout控件占屏幕长宽比例
  9. 【Android】线性布局和相对布局的比较

随机推荐

  1. 简述Android消息机制及解惑
  2. Android矢量图(二)--VectorDrawable所有
  3. Android应用项目绑定appcom_v7打包时,出现
  4. Android零基础入门第15节:掌握Android Stu
  5. Android 应用程序之间数据共享—ContentP
  6. Android 之 Looper、MessageQueue、Handl
  7. Android使用LayerDrawable资源
  8. [置顶] Android 位于底部的Tab
  9. android操作sim卡联系人信息
  10. android另一种访问包资源方式