In this example, a Button is displayed on the top, bottom, left, and right of the screen. Its Layout is defined as follows:
<Button android: id = "@ + id/top"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentTop = "true"
Android: layout_centerHorizontal = "true"
Android: nextFocusDown = "@ + id/bottom"
Android: text = "@ string/focus_3_top"/>
<Button android: id = "@ + id/right"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentRight = "true"
Android: layout_centerVertical = "true"
Android: nextFocusLeft = "@ + id/left"
Android: text = "@ string/focus_3_right"/>
<Button android: id = "@ + id/bottom"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentBottom = "true"
Android: layout_centerHorizontal = "true"
Android: nextFocusUp = "@ + id/top"
Android: text = "@ string/focus_3_bottom"/>
<Button android: id = "@ + id/left"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: layout_alignParentLeft = "true"
Android: layout_centerVertical = "true"
Android: nextFocusRight = "@ + id/right"
Android: text = "@ string/focus_3_left"/>
Author: mapdigit