=================================
* 相对布局 RelativeLayout
* 线性布局 LinearLayout
* 表格布局 TableLayout
* 帧布局 FrameLayout
* 网格布局 GridLayout
相对布局 RelativeLayout
* 停靠父控件边界
alignParentTop 上边
alignParentRight 右边
alignParentBottom 底边
alignParentLeft 左边
* 相对父控件居中
centerInParent 正中间
centerHorizontal 水平居中
centerVertical 垂直居中
* 停靠周围控件边界
toLeftOf 停靠在左边
toRightOf 停靠在右边
above 停靠在上边
below 停靠在下边
* 与周围控件边界对齐
alignTop 对齐上边
alignRight 对齐右边
alignBottom 对齐下边
alignLeft 对齐左边
alignBaseline 对齐基线
线性布局 LinearLayout
* orientation
布局方向
水平线性布局(默认)
orientation="horizontal"
垂直线性布局
orientation="vertical"
* weight
比重(比例)
*) 剩余空间按比例分配给控件
*) 垂直布局中, 高度应设置成 0dp
*) 水平布局中, 宽度应设置成 0dp
* gravity
重力引力
*) 垂直布局中
left
center_horizontal
right
*) 水平布局中
top
center_vertical
bottom
表格布局 TableLayout
* <TableRow>
表格行
* stretchColumns
拉伸的列
stretchColumns="3"
stretchColumns="0,2,3"
stretchColumns="0,1,2"
帧布局 FrameLayout
* gravity
重力引力
top
right
bottom
left
center
center_horizontal
center_vertical
right|center_vertical
bottom|center_horizontal
right|bottom
* 融合
<merge>
窗口中存在一个默认
的 FrameLayout 布局控件,
可以将自己的界面帧布局
中的控件,放入默认的帧布局中
网格布局 GridLayout
* columnCount
列数量
* column
设置控件放置的列
column="3"
* rowSpan
跨行
* columnSpan
跨列
* gravity
重力引力
向四周的引力,使控件充满空间
fill
fill_horizontal
fill_vertical
* <Space>
添加空白