title: Alternative to nested weights with LinearLayouts
body: <p>I want to achieve the following:</p>
  
  <p><img src="https://i.stack.imgur.com/9zWua.png" alt="enter image description here"></p>
  
  <p>It works with the following layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal"&gt;
  
      &lt;LinearLayout
          android:layout_weight="3"
          android:layout_width="0dp"
          android:layout_height="fill_parent"
          android:orientation="vertical" &gt;
  
          &lt;fragment 
              android:name="com.bobjohn.DetailsMenuFragment"
              android:id="@+id/detailsMenuFragment"
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:layout_weight="6"
              /&gt;
  
          &lt;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"/&gt;
      &lt;/LinearLayout&gt;
  
      &lt;TextView 
          android:layout_width="0dp"
          android:layout_weight="7"
          android:layout_height="fill_parent"
          android:text="Test Text"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>However, I get the warning about nested weights being bad for performance. I understand the error but I don't know how to express this layout in another way. What is the alternative?</p>