title: LinearLayout weights not filling parent
body: <p>After looking around for some time, I've yet to find a question that matches my problem. My issue is this, I have a ListView whose entries adhere to 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="wrap_content"
      android:baselineAligned="false"
      android:paddingTop="5dp"
      android:paddingBottom="5dp"
      android:orientation="horizontal"
      android:descendantFocusability="blocksDescendants" &gt;
  
      &lt;LinearLayout 
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          amdroid:layout_weight="1"
          android:orientation="vertical" &gt;
          ...
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout 
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:orientation="vertical" &gt;
          ...
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout 
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:orientation="vertical" &gt;
          ...
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I would expect this to produce an entry in which the 1st nested layout gets 1/4 of the available width, the 2nd gets 1/2 of the width, and the 3rd gets 1/4 of the width. This isn't what happens, though; instead, the width of each nested layout is wrapped for some reason.</p>
  
  <p>Interestingly, if I specify a particular width in the parent LinearLayout instead of "match_parent", the nested layout widths obey the weights as expected. For example, the following produces the expected result:</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="290dp"
      android:layout_height="wrap_content"
      android:baselineAligned="false"
      android:paddingTop="5dp"
      android:paddingBottom="5dp"
      android:orientation="horizontal"
      android:descendantFocusability="blocksDescendants" &gt;
  
      &lt;LinearLayout 
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          amdroid:layout_weight="1"
          android:orientation="vertical" &gt;
          ...
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout 
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:orientation="vertical" &gt;
          ...
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout 
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:orientation="vertical" &gt;
          ...
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Obviously, though, specifying a particular width ignores the whole point of weights. So my question is this: why aren't the weights actually filling the parent LinearLayout when "match_parent" is used, and how can this be corrected?</p>
  
  <p>Oh and one final point of interest, the graphical layout preview in Eclipse produces expected results when "match_parent" is used for the parent LinearLayout width. It's only when emulated or used on an actual device that the contents of the nested LinearLayouts get width-wrapped. I'm guessing that this is due to the layout's use inside of a ListView, but who knows?</p>
  
  <p>Thanks</p>