Я хотел бы разделить мой текущий вид на 4 области (не делить экран на 4, а разделить вид) следующим образом:
Я хотел бы иметь макет следующего размера для вида:
![enter image description here](https://i.stack.imgur.com/YHPgz.png)
Это по горизонтали , разделенное на половину вида для каждого.по вертикали верхняя область имеет 1/3 высоту вида, а две нижние области имеют 2/3 высоту вида.
Я успешно разделил мой вид на 4 равные по размеру области на:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/top_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="horizontal"
>
<LinearLayout
android:id="@+id/top_left_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/content_blue_bg"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="TOP LEFT"/>
</LinearLayout>
<LinearLayout
android:id="@+id/top_right_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/content_blue_bg"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="TOP RIGHT"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:orientation="horizontal"
>
<LinearLayout
android:id="@+id/bottom_left_area"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="BOTTOM LEFT"/>
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_right_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/content_blue_bg"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="BOTTOM RIGHT"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Но как я могу получить высоту 1/3 для областей вверх и2/3 высоты обзора для нижних участков?