线性布局常用属性
ayout_width:布局宽度(match_parent,wrap_conent)
layout_height:布局高度(match_parent,wrap_conent)
orietation:方向(vertical,horizontal)
gravity:对齐方式(left, right, center, top, bottom…)
background:背景(颜色、图片、选择器)
weight:比重(用于瓜分手机屏幕)
padding:内边距 (paddingLeft, paddingRight, paddingTop, paddingBottom)
margin:外边距 (marginLeft, marginRight, marginTop, marginBottom)
线性布局的初步尝试
线性布局的嵌套使用
效果展示图
总结
线性布局可以进行嵌套完成多种复杂的布局