Android studio中相对布局组件排列方式

android:gravity--各子组件摆放方式
android:ignoreGravity--那个组件不受前面组件所影响


Relativelayout.LayoutParams

在组件上设置的属性
android:layout_above
位于另一个组件的上方
below下方
toLeftof左侧
toRightof右侧

与父容器(布局管理器)那一边对齐
android:layout_alignParentBottom
                          Left
                          Right
                          Top
android:layout_alignBottom与某一个组件的底边界对齐
alignLeft左对齐
alignRight右对齐
alignTop顶对齐

组件与哪个组件上下左右边界对齐
android:layout_centerHorizontal水平居中
Inparent中间位置
Vertical垂直居中

设置组件位于布局管理器哪个位置哪个位置

你可能感兴趣的:(Android studio中相对布局组件排列方式)