title: How to divide screen into three parts vertically?
body: <p>I have screen with <code>ScrollView</code> and three different <code>LinearLayouts</code>.</p>
  
  <p>One <code>LinearLayout</code> contains a <code>Spinner</code> and second contains <code>ListView</code> and third contains two <code>Buttons</code> ( horizontal ). </p>
  
  <p>I want to display a screen that contains 3 <code>LinearLayouts</code> always displayed at bottom of screen and 1 <code>LinearLayout</code> always displayed on top. In middle part , i want to display <code>ListView</code> content. So that on whole screen there is no blank space present.</p>
  
  <p>I want to create screen for multiple devices which has different sizes.</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:background="@drawable/backrepeat"
  android:orientation="vertical" &gt;
  
  &lt;include
      android:id="@+id/include1"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      layout="@layout/actionbar" &gt;
  &lt;/include&gt;
  
  &lt;ScrollView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:scrollbars="horizontal" &gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:orientation="vertical"
          android:padding="10dp" &gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_weight=".2"
              android:background="@drawable/rounded_border"
              android:orientation="vertical"
              android:padding="15dp" &gt;
  
              &lt;TextView
                  android:id="@+id/tvDiaryData"
                  style="@style/greenstyle"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:background="@drawable/heading"
                  android:gravity="center_horizontal"
                  android:text="@string/tvDiaryData" &gt;
              &lt;/TextView&gt;
  
              &lt;TextView
                  android:layout_width="fill_parent"
                  android:layout_height="10dp"
                  android:gravity="center_horizontal" &gt;
              &lt;/TextView&gt;
  
              &lt;Spinner
                  android:id="@+id/spDiaryAllBooking"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:prompt="@string/select_diaryallbooking" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_weight="1.6"
              android:background="@drawable/layerlist"
              android:orientation="vertical"
              android:paddingBottom="5dp"
              android:paddingLeft="15dp"
              android:paddingRight="15dp"
              android:paddingTop="5dp" &gt;
  
              &lt;ListView
                  android:id="@+id/lvDiaryBooking"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:divider="#636466"
                    android:layout_weight="1"
                  android:dividerHeight="1dip"
                  android:scrollbarStyle="outsideOverlay"
                  android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_weight=".2"
              android:background="@drawable/rounded_border"
              android:orientation="horizontal"
              android:padding="10dp" &gt;
  
              &lt;Button
                  android:id="@+id/btnDiaryBook"
                  style="@style/greenButton"
                    android:layout_weight="1"
                  android:layout_width="wrap_content"
                  android:layout_height="fill_parent"                    
                  android:onClick="btnDiaryBook_Click"
                  android:text="@string/btnBook" &gt;
              &lt;/Button&gt;
  
              &lt;Button
                  android:id="@+id/btnDiaryBalance"
                  style="@style/greenButton"
                    android:layout_weight="1"
                  android:layout_width="wrap_content"
                  android:layout_height="fill_parent"
                  android:layout_marginLeft="10dp"                 
                  android:onClick="btnDiaryBalance_Click"
                  android:text="@string/btnDiaryBalance" &gt;
              &lt;/Button&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
           &lt;/ScrollView&gt;
  
       &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Screen Layout with what I want:</p>
  
  <p><img src="https://i.stack.imgur.com/aKbjQ.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/YaetS.png" alt="Current Layout - This give blank space on below of screen on tablet "></p>