LinearLayoutで、すべての子要素を1方向に整列させられます。その整列方向はandroid:orientationで指定し、水平または垂直方向のいずれかになります。1つのLinearLayoutは1方向にしか子要素を整列させられないため、複雑な配置をするには複数のLinearLayoutを組み合わせて使用します。
| 属性名 | 説明 |
|---|---|
| android:baselineAligned | When set to false, prevents the layout from aligning its children's baselines. |
| android:baselineAlignedChildIndex | When a linear layout is part of another layout that is baseline aligned, it can specify which of its children to baseline align to (that is, which child TextView). |
| android:gravity | Specifies how to place the content of an object, both on the x- and y-axis, within the object itself. |
| android:measureWithLargestChild | When set to true, all children with a weight will be considered having the minimum size of the largest child. |
| android:orientation | レイアウトを水平または垂直方向にするか指定する
|
| android:weightSum | Defines the maximum weight sum. |
2つのLinearLayoutで垂直と水平方向を組み合わせて、Viewを配置してみます。

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button android:text="Button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button android:text="Button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button android:text="Button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button android:text="Button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<Button android:text="Button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>