Relative layout: relativelayout
Relatively easy to implement complex layout of windows, see the following code
<? XML version = "1.0" encoding = "UTF-8"?> <! -- In the first type, the relative location of the sub-window is Android: layout_above ~~~~~~~~~~ Place the bottom of the control on the control with the given ID. Android: layout_below ~~~~~~~~~~ Place the top of the control under the control with the given ID. Android: layout_toleftof ~~~~~~~ Align the right edge of the control with the left edge of the control with the given ID to Android: layout_torightof ~~~~~~ Align the left edge of the control with the right edge of the control with the given ID. The second class alignbaseline of the child window with the edge alignbaseline of other child windows. Android: layout_alignbaseline ~~ The baseline of the control is aligned with the baseline of the control with the given ID. Android: layout_aligntop ~~~~~~~ The top edge of the control is aligned with the top edge of the control with the given ID. Android: layout_alignbottom ~~~~ The bottom edge of the control is aligned with the bottom edge of the control with the given ID. Android: layout_alignleft ~~~~~~ The left edge of the control is aligned with the left edge of the control with the given ID. Android: layout_alignright ~~~~~ The right edge of the control is aligned with the right edge of the given ID control. Category 3: alignparenttop ~~~~~ If the value is true, align the top of the control with the top of the parent control with Android: alignparentbottom ~~~~~ If the value is true, the bottom of the control and the bottom of the parent control are aligned with Android: alignparentleft ~~~~~~~ If the value is true, align the left side of the control with the left side of the parent control with Android: alignparentright ~~~~~ If the value is true, the right side of the control and the right side of the parent control are aligned with Android: layout_centerhorizontal. If the value is true, the control is placed in the central android in the horizontal direction: if layout_centerinparent is true, the control is placed in the central Android: layout_centervertical of the horizontal and vertical directions of the parent control. If it is true, the control will be placed in the center of the vertical --> <relativelayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: padding = "10px"> <textview Android: Id = "@ + ID/label" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: TEXT = "type here:"/> <edittext Android: Id = "@ + ID/entry" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: background = "@ Android: drawable/editbox_background" Android: layout_below = "@ + ID/label"/> <button Android: Id = "@ + ID/OK" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_below = "@ + ID/entry" Android: layout_alignparentright = "true" Android: layout_marginleft = "10px" Android: TEXT = "OK"/> <button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_below = "@ + ID/entry" Android: layout_toleftof = "@ + ID/OK" Android: layout_aligntop = "@ + ID/OK" Android: text = "cancel"/> </relativelayout>