title: Nested weights are bad for performance in my XML code
body: <p>I want to display an organized grid. So I use LinearLayout and Layout Weight option, every thing works perfectly, but I don't understand how to avoid this warning in the Button A and the Button C:</p>
  
  <pre><code>Nested weights are bad for performance
  </code></pre>
  
  <p>And this is my XML code :</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="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical" &gt;
  
          &lt;!-- First row. --&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="horizontal"
              android:weightSum="2" &gt;
  
              &lt;Button
                  android:layout_width="0dip"
                  android:layout_height="fill_parent"
                  android:layout_weight="1"
                  android:text="A" /&gt;
  
              &lt;Button
                  android:layout_width="0dip"
                  android:layout_height="fill_parent"
                  android:layout_marginTop="10dp"
                  android:layout_weight="1"
                  android:text="B" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;!-- Second row. --&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="horizontal"
              android:weightSum="2" &gt;
  
              &lt;Button
                  android:layout_width="0dip"
                  android:layout_height="fill_parent"
                  android:layout_marginTop="10dp"
                  android:layout_weight="1"
                  android:text="C" /&gt;
  
              &lt;Button
                  android:layout_width="0dip"
                  android:layout_height="fill_parent"
                  android:layout_marginTop="10dp"
                  android:layout_weight="1"
                  android:text="D" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>How can I avoid this error please ? </p>