- UI Layouts are subclasses of ViewGroup class.
- Typical layout defines the visual structure for and Android user interface and can be created either at run time using view/ViewGroup objects or you can declare your layout using XML file main_layout.xml which is located in res/layout folder of your project.
There are number of layouts provided by Android which you will use
in almost all the Android applications to provide different view, look
- Linear Layout- aligns children in single direction, vetically or
- Relative Layout- Displays child views in relative position
- Table Layout- Table Layout enables you views into rows and
- Absolute Layout- Absolute layout enables you to specify the
exact location of its children.
- Frame Layout- The Frame layout is a placeholder on screen
that you can use to display a single view.
- List view- It displays a list of scrollable items.
- Grid view- It is a Viewgroup that displays items in a two
dimensional, scrollable grid.
Layouts has a set of attributes which defines the visual properties of
android : id, android : layout_width
android : layout_height, android : layout_marginTop,
android : layout_marginleft, android : layout_marginright