相对布局中一些常用属性
android:layout_above 将该控件的底部至于给定ID的控件之上
android:layout_below 将该控件的底部至于给定ID的控件之下
android:layout_toLeftOf 将该控件至于给定ID的控件的左边
android:layout_toRightOf 将该控件至于给定ID的控件的右边
android:layout_alignBaseline 将该控件的baseline和给定ID的控件的baseline对齐
android:layout_alignBottom 将该控件的底部边缘与给定ID控件的底部边缘对齐
android:layout_alignLeft 将该控件的左边缘与给定ID控件的左边缘对齐
android:layout_alignRight 将该控件的右边缘与给定ID控件的右边缘对齐
android:layout_alignParentBottom 如果该值为true,则将该控件的底部和父控件的底部对齐
android:layout_alignParentLeft 如果该值为true,则将该控件的左边和父控件的左边对齐
android:layout_alignParentRight 如果该值为true,则将该控件的右边和父控件的右边对齐
android:layout_alignParentTop 如果该值为true,则将该控件的顶部和父控件的顶部对齐
android:layout_centerHorizontal 如果该值为true,则该控件将被至于水平方向的中央
android:layout_centerInParent 如果该值为true,则该控件将被至于父控件水平方向和垂直方向的中央
android:layout_centerVertical 如果该值为true,则该控件将被至于垂直方向的中央
android:layout_margin 该控件的外边框距离周围控件的距离
android:layout_marginLeft 该控件的左边框距离它左边控件的距离
android:layout_marginRight 该控件的右边框距离它右边控件的距离
android:layout_marginTop 该控件的上边框距离它上边控件的距离
android:layout_marginBottom 该控件的下边框距离它下边控件的距离
android:layout_marginStart
android:layout_marginEnd
更多相关文章
- android开发之布局常用属性
- 安卓中RelativeLayout布局
- Android中的布局属性
- Android(安卓)RelativeLayout 属性
- 【Android】四种基本布局
- Android基础控件使用指南
- 初学Android学到的关于LinearLayout的知识
- 说说 Android(安卓)的常见 UI 控件
- Android(安卓)常用UI控件的一些属性设置(在.xml文件里进行的设置