LinearLayout下面的布局
gravity:文本在控件中的位置
padding* 设置内边距,调整空间里面的内容与边框的距离
padding="3dp"
paddingLeft
paddingRight
paddingTop
paddingBottom
![](https://images2015.cnblogs.com/blog/623218/201604/623218-20160412203353035-1429951065.png)
![](https://images2015.cnblogs.com/blog/623218/201604/623218-20160412203412707-2071193657.png)
sigleLine="true"控件的内容在同一行显示
background:背景,可以使用RGB的颜色:“#aa0000”前两位红色,中间两位绿色,后两位蓝色
layout_weight 权重
TableLayout
<TableRow></TableRow>就定义了一行,里面定义了三列
看第五行代码,android:stretchColumns="1"意思就是说,如果定义的行不能占满屏幕,就拉伸第二列(也就是列1)
layout_span ="2" 占据两列空间
![](https://images2015.cnblogs.com/blog/623218/201604/623218-20160412203444566-92574111.png)
![](https://images2015.cnblogs.com/blog/623218/201604/623218-20160412203503926-1105397925.png)
![](https://images2015.cnblogs.com/blog/623218/201604/623218-20160412203522473-1264299505.png)
RelativeLayout
![](https://images2015.cnblogs.com/blog/623218/201604/623218-20160412203549301-1782382303.png)