Observe the following attributes found in the various Button views:
➤ layout_alignParentLeft — Aligns the view to the left of the parent view
➤ layout_alignParentRight — Aligns the view to the right of the parent view
➤ layout_alignParentTop — Aligns the view to the top of the parent view
➤ layout_alignParentBottom — Aligns the view to the bottom of the parent view
➤ layout_centerVertical — Centers the view vertically within its parent view
➤ layout_centerHorizontal — Centers the view horizontally within its parent view
Figure shows the activity when viewed in portrait mode.
When the screen orientation changes to landscape mode, the four buttons are aligned to the four edges of the screen, and the center button is centered in the middle of the screen with its width fully stretched (see Figure)