Skip to main content

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 arrangement
  • android:orientation="horizontal" — horizontal linear arrangement

Example

<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>

Properties

Common Properties

See Common Properties

Private Properties

PropertyDescriptionValues
orientationDirectionvertical: vertical
horizontal: horizontal