LinearLayout
Overview
LinearLayout is a commonly used layout in development. It arranges controls horizontally or vertically.
The linear layout manager allows each child view to specify a weight attribute to control how much space each child occupies.
The orientation attribute controls the arrangement direction.
android:orientation="vertical"— vertical linear arrangementandroid:orientation="horizontal"— horizontal linear arrangement
Example
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
Properties
Common Properties
Private Properties
| Property | Description | Values |
|---|---|---|
| orientation | Direction | vertical: vertical horizontal: horizontal |