Альтернатива вложенным весам с LinearLayouts

Я хочу добиться следующего:

enter image description here

Он работает со следующей компоновкой:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">

    <LinearLayout
        android:layout_weight="3"
        android:layout_width="0dp"
        android:layout_height="fill_parent"
        android:orientation="vertical" >

        <fragment 
            android:name="com.bobjohn.DetailsMenuFragment"
            android:id="@+id/detailsMenuFragment"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="6"
            />

        <fragment 
            android:name="com.bobjohn.SummaryFragment"
            android:id="@+id/summaryFragment"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_margin="10dp"
            android:layout_weight="4"/>
    </LinearLayout>

    <TextView 
        android:layout_width="0dp"
        android:layout_weight="7"
        android:layout_height="fill_parent"
        android:text="Test Text"/>
</LinearLayout>

Однако я получаю предупреждение о том, что вложенные веса вредны для производительности. Я понимаю ошибку, но не знаю, как выразить этот макет по-другому. Какова альтернатива?

7
задан nhaarman 28 June 2012 в 09:13
поделиться