Layout Attributes
Each layout has a set of attributes which define the visual properties of that layout. There are few common attributes among all the layouts and their are other attributes which are specific to that layout. Following are common attributes and will be applied to all the layouts:
| Sr.No | Attribute & Description |
|---|---|
| 1 |
android:id
This is the ID which uniquely identifies the view.
|
| 2 |
android:layout_width
This is the width of the layout.
|
| 3 |
android:layout_height
This is the height of the layout
|
| 4 |
android:layout_marginTop
This is the extra space on the top side of the layout.
|
| 5 |
android:layout_marginBottom
This is the extra space on the bottom side of the layout.
|
| 6 |
android:layout_marginLeft
This is the extra space on the left side of the layout.
|
| 7 |
android:layout_marginRight
This is the extra space on the right side of the layout.
|
| 8 |
android:layout_gravity
This specifies how child Views are positioned.
|
| 9 |
android:layout_weight
This specifies how much of the extra space in the layout should be allocated to the View.
|
| 10 |
android:layout_x
This specifies the x-coordinate of the layout.
|
| 11 |
android:layout_y
This specifies the y-coordinate of the layout.
|
| 12 |
android:layout_width
This is the width of the layout.
|
| 13 |
android:layout_width
This is the width of the layout.
|
| 14 |
android:paddingLeft
This is the left padding filled for the layout.
|
| 15 |
android:paddingRight
This is the right padding filled for the layout.
|
| 16 |
android:paddingTop
This is the top padding filled for the layout.
|
| 17 |
android:paddingBottom
This is the bottom padding filled for the layout.
|
Comments
Post a Comment