안드 5-2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
android:background="#ff0000">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"></LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#fff200"
android:orientation="vertical"></LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#000000"
android:orientation="vertical"> </LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
android:gravity="center"
android:background="#1d2f89" ></LinearLayout>
</LinearLayout>
1: 가장 최상위 레이아웃
2: 를 반으로 나눠 새빨갛게
3: 한 다음, horizontal로 정렬된 그 레이아웃의 절반(1)을 경계로 삼음
4: 남은 절반(1)을 다시 레이아웃화
5: 이 절반(총 4분의1)을 다시 weight1로 나눠 노란 색을 칠하고
6: 남은 weight1만큼을 다시 검정으로 칠한다
7: 2에서 반을 새빨갛게 칠하고 남은 만큼을 다시 파랗게 칠한다. 비중은 1로