布局:  
   <LinearLayout></LinearLayout>
   <RelativeLayout></RelativeLayout>
   <FrameLayout></FrameLayout>
   <TableLayout></TableLayout>
四种布局的公共属性:            android:id="@+id/id_name"                        android:layout_width="wrap_content"                                ="match_parent"                                                     android:layout_height="wrap_content"                                 ="match_parent"                                                      android:text="message"                            ||显示文字                        android:src="@drawable/ic_launcher"              ||显示图片                        android:hint="tips"                                ||提示文字                        android:inputType="textPassword"                ||按照密文的方式输入,隐藏输入内容
       
       ...
<LinearLayout></LinearLayout> 属性: android:orientation="vertical"   ||垂直 ="horizontal" ||水平 android:layout_gravity="top" ="bottom" ="center" ="center_vertical" ="center_horizontal" ... android:layout_weight="1" ||权重 <RelativeLayout></RelativeLayout> 属性: android:layout_alignParentLeft="true" ||对齐于父类的左侧 ="false" android:layout_alignParentRight="true" ||对齐于父类的右侧 ="false" android:layout_alignParentTop="true" ||对齐于父类的上侧 ="false" android:layout_alignParentBottom="true" ||对齐于父类的底侧 ="false" android:layout_centerInParent="true" ||对齐于父类的中心 ="false" android:layout_above="@id/id_name" ||在某一控件的上方(注意要先定义被引用的控件) android:layout_below="@id/id_name" ||在某一控件的下方 android:layout_toLeftOf="@id/id_name" ||在某一控件的左方 android:layout_toRightOf="@id/id_name" ||在某一控件的右方 android:layout_alignLeft="@id/id_name" ||本控件的左边缘和某一控件的左边缘对齐 android:layout_alignRight="@id/id_name ||本控件的右边缘和某一控件的右边缘对齐 android:layout_alignTop="@id/id_name" ||本控件的上边缘和某一控件的上边缘对齐 android:layout_alignBottom="@id/id_name" ||本控件的下边缘和某一控件的下边缘对齐 <FrameLayout></FrameLayout> 属性: 全部控件均摆放在布局的左上角(碎片) <TableLayout></TableLayout> 属性: <TableRow></TableRow> 在表格中添加一行,TableRow中添加一个控件则增加一列 属性: android:layout_span="2" ||占据2列的空间 android:stretchColumns="1" ||拉伸第2列使的行充满父类 android:stretchColumns="0" ||拉伸第1列使的行充满父类

更多相关文章

  1. Android四大布局及其主要属性
  2. Android(安卓)相对布局
  3. RelativeLayout布局中控件常用布局属性
  4. android 开发中遇到的问题汇总
  5. android:layout_gravity和android:gravity的区别
  6. android text右对齐显示 并且 多余文字显示省略号
  7. android - XML布局大全
  8. Android中的ImageButton标签属性
  9. Android中的ImageButton标签属性

随机推荐

  1. Android(安卓)ART运行环境下Image文件格
  2. 四大组件之Broadcast Receiver
  3. Android 命令行签名打包,加固二次打包
  4. android 创建添加快捷方式
  5. android通过反射来获取系统属性SystemPro
  6. ScrollView中EditText导致自动滚动问题
  7. 短视频带货源码模仿QQ 测滑菜单
  8. 重载android返回键响应函数
  9. Android app 判断是手机还是平板
  10. Android剪贴板:复制粘贴文本