相对布局ralative layout

相对布局ralative layout_第1张图片
S01E13_相对布局(上)_20160409164947.JPG

相对布局:先指定其中一个控件的位置,再相对指定的控件的位置来指定另一个控件的位置。
可以减少布局的嵌套

相对布局ralative layout_第2张图片
S01E13_相对布局(上)_20160409165445.JPG
相对布局ralative layout_第3张图片
S01E13_相对布局(上)_20160409170014.JPG
相对布局ralative layout_第4张图片
S01E14_相对布局(中)_20160409170830.JPG
相对布局ralative layout_第5张图片
S01E14_相对布局(中)_20160409170922.JPG

对齐到父控件的时候用 ture
eg:
android:layout_alignParentLeft = "ture"

相对布局ralative layout_第6张图片
S01E14_相对布局(中)_20160409203053.JPG
相对布局ralative layout_第7张图片
S01E14_相对布局(中)_20160409203527.JPG

Android4.2的相对布局的新属性

相对布局ralative layout_第8张图片
S01E15_相对布局(下)_20160409204202.JPG

你可能感兴趣的:(相对布局ralative layout)