title: Attaching layout directly to listview bottom
body: <p>I have three layouts in my page. Two linearlayouts which represent 2 stripes with information in them and a listview in the third linear layout. I succesfully attached one of the linearlayouts to the top of the page, however I want the second linearlayout (bottom control bar) to be attached to the bottom of the listview, NOT to the bottom of the screen. Can someone please help me fix this... Here is my XML code. </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@color/grey05"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context="com.example.albert.betterapp.MyBets"&gt;
  
  &lt;LinearLayout
      android:id="@+id/top_control_bar"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:background="#C9C193"
      android:orientation="horizontal"
      android:weightSum="1"&gt;
  
  &lt;TextView
      android:id="@+id/textView91"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="0.5"
      android:text="Accumulator(5)"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:textSize="16dp"
      android:textStyle="bold" /&gt;
  
  &lt;TextView
      android:id="@+id/textView101"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="0.3"
      android:text="Token:"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:textSize="16dp"
      android:textStyle="bold" /&gt;
  &lt;TextView
      android:id="@+id/textView121"
      android:layout_width="wrap_content"
      android:layout_height="18dp"
      android:layout_gravity="top"
      android:layout_weight="0.2"
      android:layout_marginBottom="-5dp"
      android:includeFontPadding="false"
      android:text=""
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:textColor="@color/wingreen"
      android:textStyle="bold" /&gt;
  
  
  &lt;/LinearLayout&gt;
  &lt;LinearLayout
      android:id="@+id/bottom_control_bar"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:background="#C9C193"
      android:orientation="horizontal"
      android:weightSum="1"&gt;
  
      &lt;TextView
          android:id="@+id/textView9"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="0.2"
          android:text="@string/stake"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:textSize="16dp"
          android:textStyle="bold" /&gt;
  
      &lt;TextView
          android:id="@+id/textView10"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="0.3"
          android:text="500"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:textSize="16dp"
          android:textStyle="bold" /&gt;
      &lt;TextView
          android:id="@+id/textView12"
          android:layout_width="wrap_content"
          android:layout_height="18dp"
          android:layout_gravity="top"
          android:layout_weight="0.2"
          android:layout_marginBottom="-5dp"
          android:includeFontPadding="false"
          android:text="@string/potentialwinnings"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:textColor="@color/wingreen"
          android:textStyle="bold" /&gt;
  
      &lt;TextView
          android:id="@+id/textView13"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="0.3"
          android:text="6000"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:textSize="16dp"
          android:textStyle="bold" /&gt;
  
  
  
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/linearLayout"
      android:layout_width="fill_parent"
      android:layout_height="0dp"
      android:layout_above="@id/bottom_control_bar"
      android:layout_alignParentRight="true"
      android:layout_below="@id/top_control_bar"
      android:orientation="vertical"&gt;
      &lt;!-- Main ListView
           Always give id value as list(@android:id/list)
      --&gt;
      &lt;ListView
          android:id="@+id/betslistview"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="@color/betcolor"&gt;&lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>