Combining RelativeLayout attributes can simplify the creation of interesting

Combining relativelayout attributes can simplify the

This preview shows page 28 - 37 out of 78 pages.

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

Subscribe to view the full document.

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

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
Image of page 31