title: How to tell Android relative layout to take all space left betwean two elements. Does not matter how much is that space
body: <p>How to tell Android relative layout to take all space left between two elements. Does not matter how much is that space.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"&gt;
  
  
  
  &lt;TableLayout android:layout_below="@id/title_container"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:id = "@+id/usb_config_title"&gt;
  
      &lt;TableRow android:layout_gravity="center_horizontal"&gt;
          &lt;TextView android:layout_width="398dp"
              android:layout_height="4px"
              android:text="     "/&gt;
          &lt;TextView android:layout_width="4px"
              android:layout_height="4px"
              android:text="     "
              android:background="@color/title_background"/&gt;
          &lt;TextView android:layout_width="398dp"
              android:layout_height="4px"
              android:text="     "/&gt;
      &lt;/TableRow&gt;
  
  
      &lt;TableRow android:layout_gravity="center_horizontal"&gt;
          &lt;TextView android:text="@string/usb_stick"
              android:layout_width="398dp" 
  
              android:gravity="center"
              android:layout_height="wrap_content"
              android:textSize="22dp"/&gt;
          &lt;TextView android:layout_width="4px"
              android:layout_height="fill_parent"
              android:text="     "
              android:background="@color/title_background"/&gt;
          &lt;TextView android:text = "@string/usb_internal_memory"
  
          android:layout_width="398dp" 
              android:gravity="center"
                  android:layout_height="wrap_content"
              android:textSize="22dp"/&gt;
      &lt;/TableRow&gt;
  
      &lt;TableRow android:layout_gravity="center_horizontal"&gt;
          &lt;TextView android:layout_width="398dp"
              android:layout_height="5px"
              android:text="     "/&gt;
          &lt;TextView android:layout_width="4px"
              android:layout_height="5px"
              android:text="     "
              android:background="@color/title_background"/&gt;
          &lt;TextView android:layout_width="398dp"
              android:layout_height="5px"
              android:text="     "/&gt;
      &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  
  
  &lt;LinearLayout android:orientation="horizontal"
              android:layout_below="@id/usb_config_title"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      &gt;
      &lt;ListView
          android:id="@+id/list3"
          android:layout_width="398px"
          android:layout_height="wrap_content"
  
          android:drawSelectorOnTop="false"
          android:scrollbarAlwaysDrawVerticalTrack="true"
      /&gt;
  
      &lt;TextView android:layout_width="4px"
          android:layout_height="fill_parent"
          android:text="     "
          android:background="@color/title_background"/&gt;
      &lt;ListView
          android:id="@+id/list4"
          android:layout_width="398px"
          android:layout_height="wrap_content"
          android:drawSelectorOnTop="false"
          android:scrollbarAlwaysDrawVerticalTrack="true"
      /&gt;
  &lt;/LinearLayout&gt;
  &lt;include layout="@layout/buttons_bottom_with_relative"/&gt;      
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>So i need id/list3 to last till button bar which is. At the moment id/list3 is covered by button bar.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:gravity="bottom"
              android:layout_weight="1"
      android:id="@+id/controls" 
      android:orientation="horizontal"
              android:layout_width="fill_parent" 
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:baselineAligned="false"
      style="@android:style/ButtonBar"
      android:background="@drawable/bottom_layout_selector"
  &gt;
      &lt;Button 
          android:layout_width="100px" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/startButton"
          android:text="@string/start" 
          android:visibility="invisible"
      /&gt;
  
      &lt;Button 
          android:layout_width="100px" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/stopButton"
          android:text="@string/stop" 
          android:visibility="invisible"
      /&gt;
  
      &lt;Button 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/nextButton"
          android:text="@string/next"
          android:visibility="invisible"
      /&gt;
  
      &lt;Button 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/resetStatistics"
          android:text="@string/reset_statistics"
          android:visibility="invisible" 
      /&gt;
  
      &lt;Button 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/histogramSettings"
          android:text="@string/histogram_settings"
          android:visibility="invisible" 
      /&gt;
  
      &lt;Button 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/saveButton"
          android:text="@string/save"
          android:visibility="invisible"
      /&gt;
  
      &lt;Button 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/loadConfig"
          android:text="@string/load_config"
          android:visibility="invisible" 
      /&gt;
  
      &lt;Button 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:layout_weight="1" 
          android:id="@+id/saveConfig"
          android:text="@string/save_config"
          android:visibility="invisible" 
      /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>