title: Fixed proportion of layout on screen
body: <p>In my app, I have 2 linear layouts: one at the top, one at the bottom.</p>
  
  <p>I'd like that <strong>whatever is inside these layout</strong>, the layout of the top occupies 60% of the height of the screen and the layout of the bottom 40%.
  Here 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="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:layout_weight="1.0" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0.6"
          android:orientation="vertical" 
           android:id="@+id/layout_top"&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:layout_weight="0.4" 
          android:id="@+id/layout_bottom"&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>When these layouts are empty, no problem, they have the good proportion.</p>
  
  <p>The problem is that if I put a small listview in the top layout for e.g. then the layout will take the size of the listview and won't preserve the 60/40% proportion.</p>
  
  <p>I'd like that even if my listview is small (only 3 item for eg), the layout preserve it's 60% and so put some empty space under my listview.</p>
  
  <p>I've tried to change <code>android:layout_height</code> to <code>match_parent</code> but it doesn't change anything.</p>