常 用的RelativeLayoutxml属性
应该都知道的:
android:layout_width
android:layout_height
设置为true或false的
android:layout_alignPraentBottom 设置在父控件的底部
android:layout_alignPraentEnd 将控件的结束位置与父控件的结束位置紧贴
android:layout_alignPraentStart 将控件的起始位置从父控件的起始位置开始
android:layout_alignPraentLeft 设置在父控件的左部
android:layout_alignPraentRight 设置在父控件的右边
android:layout_alignPraentTop 将控件的上边与父控件紧贴
android:layout_centerInParent 放在父控件的中心(水平居中+垂直居中)
android:layout_centerVertical 设置垂直居中
android:layout_centerHorizontal 设置水平居中
需要指定控件id的
android:layout_alignBaseLine 将给定id的控件的位置作基线,然后让两个空间在同一条线上
android:layout_alignBottom 将当前控件的底部匹配给定控件的底部
android:layout_alignLeft 将当前控件的左边匹配给定控件的左边
android:layout_alignEnd 将当前控件的底部匹配给定控件的底部
android:layout_alignRight 将当前控件的右边与给定控件的右边匹配
android:layout_alignStart 将当前控件的起始部分与给定控件的起始部分对齐
android:layout_alignTop 将当前控件的上边与给定控件的上边对齐
android:layout_above 将当前控件放在指定控件的上方
android:layout_below 将当前控件放在指定控件的下方
android:layout_toLeftOf 将当前控件放在指定控件的左边
android:layout_toRightOf 将当前控件放在指定控件的右方
android:layout_toStartOf 将当前控件放在指定控件的前边
需要指定维度值的
android:layout_margin
android:layout_marginBottom (Specifies extra space on the bottom side of this view.)
android:layout_marginLeft 指定这个控件底部左边的空间(Specifies extra space on the left side of this view. )
android:layout_marginRight 指定这个控件底部右边的空间(Specifies extra space on the right side of this view. )
android:layout_marginTop 指定这个控件底部上边的空间(Specifies extra space on the top side of this view. )
android:layout_marginStart (Specifies extra space on the startside of this view.)
android:layout_marginEnd (Specifies extra space on the endside of this view. )