Combining
RelativeLayout
attributes can
simplify the creation of interesting user interfaces
without resorting to multiple layout groups to
achieve a desired effect.

Subscribe to view the full document.
Using
RelativeLayout
(Cont’d)

Using
RelativeLayout
(Cont’d)
You can find the layout attributes available for
RelativeLayout
child
View
controls in
android.widget.RelativeLayout.LayoutParams.

Subscribe to view the full document.
Using
RelativeLayout
(Cont’d)
Attribute Name
Applies to
Value
gravity
Parent
View
One or more constants separated
by “|” such as
top
,
bottom
,
left
,
right
, and more
layout_centerInParent
Child
View True
or
false
layout_centerHorizontal
Child
View True
or
false
layout_centerVertical
Child
View True
or
false
layout_alignParentTop
Child
View True
or
false
layout_alignParentBottom
Child
View True
or
false
layout_alignParentLeft
Child
View True
or
false
layout_alignParentRight
Child
View True
or
false
layout_alignParentStart
Child
View True
or
false
Layout_alignParentEnd
Child
View True
or
false
