title: layout_weight not working with LinearLayout inside Drawerlayout
body: <p>I'm struggling with LinearLayout when using DrawerLayout.  This is using the Android Studio template for DrawerLayout:</p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/drawer_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MyActivity"&gt;
  
  &lt;!-- As the main content view, the view below consumes the entire
       space available using match_parent in both dimensions. --&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
      &lt;LinearLayout
          android:background="#00f"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1"/&gt;
      &lt;LinearLayout
          android:background="#f00"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0"&gt;
          &lt;EditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="0" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  
  &lt;!-- android:layout_gravity="start" tells DrawerLayout to treat
       this as a sliding drawer on the left side for left-to-right
       languages and on the right side for right-to-left languages.
       If you're not building against API 17 or higher, use
       android:layout_gravity="left" instead. --&gt;
  &lt;!-- The drawer is given a fixed width in dp and extends the full height of
       the container. --&gt;
  &lt;fragment android:id="@+id/navigation_drawer"
      android:layout_width="@dimen/navigation_drawer_width"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      android:name="com.test.testdrawerlayout.NavigationDrawerFragment"
      tools:layout="@layout/fragment_navigation_drawer" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>The preview in Android Studio shows this:</p>
  
  <p><a href="http://imgur.com/UlPGzJS" rel="nofollow">http://imgur.com/UlPGzJS</a></p>
  
  <p>However, when running on my Nexus 5, the following shows:</p>
  
  <p><a href="http://imgur.com/w4QeGbB" rel="nofollow">http://imgur.com/w4QeGbB</a></p>
  
  <p>As you can see, the layout_weight="1" part is not showing at all.  When I create a blank project with the inner LinearLayout however, the layout works (with the blue layout taking most of the screen with the red layout at the bottom, just like the preview).</p>
  
  <p>Any ideas would be really appreciated, as I'm completely stumped right now.  Thanks in advance.</p>