This layout method is similar to the CSS Div layout on the webpage.
1 < Relativelayout Xmlns: Android = "Http://schemas.android.com/apk/res/android" 2 Android: layout_width = "Fill_parent" 3 Android: layout_height = "Wrap_content" 4 Android: padding = "10px" > 5 6 < Textview 7 Android: ID = "@ + ID/label" 8 Android: layout_width = "Fill_parent" 9 Android: layout_height = "Wrap_content" 10 Android: Text = "Type here :" /> 11 12 < Edittext 13 Android: ID = "@ + ID/entry" 14 Android: layout_width = "Fill_parent" 15 Android: layout_height = "Wrap_content" 16 Android: layout_below = "@ ID/label" 17 Android: Background = "@ Android: drawable/editbox_background" /> 18 19 < Button 20 Android: ID = "@ + ID/OK" 21 Android: layout_width = "Wrap_content" 22 Android: layout_height = "Wrap_content" 23 Android: layout_alignparentright = "True" 24 Android: layout_below = "@ ID/entry" 25 Android: layout_marginleft = "10px" 26 Android: Text = "OK" /> 27 28 < Button 29 Android: layout_width = "Wrap_content" 30 Android: layout_height = "Wrap_content" 31 Android: layout_aligntop = "@ ID/OK" 32 Android: layout_toleftof = "@ ID/OK" 33 Android: Text = "Cancel" /> 34 35 </ Relativelayout >