Layout in simple terms determines how the items are being
displayed for the user in an activity in the app or widget. The layout can be
fixed either at the design time or at the run time. Following are the few basic
layouts in Android
1.
Linear
Layout
Linear layout is
used to align all its child elements in a specific direction either
horizontally or vertically.
2.
Relative
Layout
Relative layout is
used to align all its child elements based on the position of other element
within it. If no relative positioning is given all the elements will be in the
same place.
3.
Table
Layout
Table layout is
used to group the elements as rows and columns. Where each rows has zero or one
cells, where each cell can have a view object.
4.
Grid
Layout
Grid layout is used
to display a 2-dimensional scrollable grid, generally the items to the list are
added using a List Adapter.
5.
Frame
Layout
Frame layout is generally
used to as a placeholder on the screen for displaying an item. It generally
blocks out an area in the screen to display the single item.
6.
List
View
List layout is
used to display a list of items with a scrollable option, generally the items
to the list are generally added using an Adapter. The list of items can be a text
or custom designed by extending the Base Adapter.
These are the main layout which we will be
working on.
No comments:
Post a Comment