Skip to content
Search

Android.widget.RelativeLayout

lastmod 2018-08-17created 2016-07-023 edits

RelativeLayout is a way of determining a widget's position relative to other widgets/containers.

How to use

First, the attributes that determine a widget's own position inside the parent container are as follows:

RelativeLayout_parent.png

Second, the attributes used for placement relative to other widgets/containers are as follows:

RelativeLayout_standard.png

Positioning Views

android:layout_alignParentTop
If "true", makes the top edge of this view match the top edge of the parent.
android:layout_centerVertical
If "true", centers this child vertically within its parent.
android:layout_below
Positions the top edge of this view below the view specified with a resource ID.
android:layout_toRightOf
Positions the left edge of this view to the right of the view specified with a resource ID.

See also

Favorite site