title: How can I make my Android LinearLayout weights work with values of 1 and 2?
body: <p>I'm trying to make a LinearLayout that has three rows, each of equal height. I am making this using 3 LinearLayouts inside the main one, each with a layout_weight of 1.</p>
  
  <p>The middle LinearLayout should contain an ImageView, TextView, ImageView, with weights of 1,2,1. To do this, inside the middle LinearLayout I created another 3.</p>
  
  <p>I want the TextView to be double the size of each ImageView. If you see the code below, when layout_weight is 1 for the inner LinearLayouts I have no problems, the three appear of equal size. However when I set the middle one (with id=textLayout) to <code>layout_weight=2</code>, it completely disappears (as seen in the Eclipse graphical layout viewer) and only the two others are visible.</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"
      android:background="@drawable/fondo"
      android:gravity="center_vertical|center_horizontal"&gt;
  
      &lt;LinearLayout
          android:id="@+id/LayoutTop"
          android:orientation="horizontal"
          android:layout_height="fill_parent"
          android:layout_width="fill_parent"
          android:layout_weight="1"&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/LayoutMid"
          android:orientation="horizontal"
          android:layout_height="fill_parent"
          android:layout_width="fill_parent"
          android:layout_weight="1"&gt;
  
          &lt;LinearLayout
              android:orientation="horizontal"
              android:layout_height="fill_parent"
              android:layout_width="fill_parent"
              android:layout_weight="1"&gt;
              &lt;ImageView
                  android:layout_height="fill_parent"
                  android:layout_width="fill_parent"&gt;
              &lt;/ImageView&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/textLayout"
              android:orientation="horizontal"
              android:layout_height="fill_parent"
              android:layout_width="fill_parent"
              android:layout_weight="2"&gt;
              &lt;TextView
                  android:text="Status"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"&gt;
              &lt;/TextView&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:orientation="horizontal"
              android:layout_height="fill_parent"
              android:layout_width="fill_parent"
              android:layout_weight="1"&gt;
              &lt;ImageView
                  android:layout_height="fill_parent"
                  android:layout_width="fill_parent"&gt;
              &lt;/ImageView&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/LayoutBottom"
          android:orientation="horizontal"
          android:layout_height="fill_parent"
          android:layout_width="fill_parent"
          android:layout_weight="1"&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>