前言:
写给自己的备忘录。
简单介绍一些常见的RelativeLayout相对布局的属性。
正文:
android:layout_marginLeft =“xdp”:意思是距离左边框的距离为x
android:layout_marginRight:距离右边框
android:layout_marginTop: 距离上边框
android:layout_marginBottom: 距离下边框
android:layout_alignParentRight=”true” :使当前控件的右端和父控件的右端对齐。
android:layout_alignParentBottom 贴紧父元素的下边缘
android:layout_alignParentLeft 贴紧父元素的左边缘
android:layout_alignParentRight 贴紧父元素的右边缘
android:layout_centerVertical:垂直 居中
android:layout_centerHrizontal:水平居中