Home » Android » RelativeLayout layout

RelativeLayout layout

RelativeLayout layout >

android:layout_centerHorizontal= "true" - place the control in the center of the horizontal direction >



other attributes are:

android:layout_above= "@id/xxx" - place the control above a given ID control >

android:layout_below= "@id/xxx" - place the control under a given ID control,

android:layout_toLeftOf= "@id/xxx" - aligns the right edge of the control with the left edge of the given ID control,

android:layout_toRightOf= "@id/xxx" - aligns the left edge of the control with the right edge of the given ID control --

android:layout_alignLeft= "@id/xxx" - aligns the left edge of the control with the left edge of the given ID control --

android:layout_alignTop= "@id/xxx" - aligns the top edge of the control with the top edge of the given ID control --

android:layout_alignRight= "@id/xxx" - aligns the right edge of the control with the right edge of the given ID control --

android:layout_alignBottom= "@id/xxx" - aligns the bottom edge of the control with the bottom edge of the given ID control.

android:layout_alignParentLeft= "true" - aligns the left edge of the control with the left edge of the parent control.

android:layout_alignParentTop= "true" - aligns the top edge of the control with the upper edge of the parent control.

android:layout_alignParentRight= "true" - aligns the right edge of the control with the right edge of the parent control --

android:layout_alignParentBottom= "true" - aligns the bottom edge of the control with the bottom edge of the parent control.

android:layout_centerInParent= "true" - place the control at the center of the parent control,

android:layout_centerVertical= "true" - place the control in the center of the vertical

Latest