title: Android: Footer in a ListView
body: <p>I have a listview as below</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="fill_parent" android:layout_height="fill_parent"
      android:orientation="horizontal"
      android:background="#E6E7E2"&gt;
      &lt;ImageView android:id="@+id/Thumbnail" android:layout_width="wrap_content"
          android:layout_height="wrap_content" android:src="@drawable/icon" /&gt;
      &lt;TextView android:id="@+id/FilePath" android:layout_width="wrap_content"
          android:layout_height="wrap_content" 
          android:textColor="#E6E7E2"
          /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and I have the footer as below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent" android:layout_gravity="bottom"&gt;
      &lt;LinearLayout android:layout_width="fill_parent" 
              android:layout_alignParentBottom="true" 
              android:layout_height="wrap_content"
              android:id="@+id/layoutfooterbutton" android:layout_gravity="bottom"&gt;
  
              &lt;Button android:layout_weight=".30" android:layout_margin="2dp"
                  android:layout_height="60dp" android:layout_width="100dp"
                  android:textColor="#FFF" android:gravity="bottom|center"
                  android:textSize="12dp" android:id="@+id/ButtonAudio" android:background="@drawable/vid_red"/&gt;
  
              &lt;Button android:layout_weight=".30" android:layout_height="60dp" android:layout_width="100dp"
                  android:gravity="bottom|center" android:background="@drawable/redblank"
                  android:textColor="#E6E7E2" android:id="@+id/ButtonBrowse" android:layout_marginTop="2dp"/&gt;
              &lt;Button android:layout_weight=".30" android:layout_margin="2dp"
                  android:layout_height="60dp" android:layout_width="100dp"
                  android:textColor="#FFF" android:gravity="bottom|center"
                  android:textSize="12dp" android:background="@drawable/reddelete" android:id="@+id/ButtonDelete"/&gt;
  
          &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>When I add the footer to the listview using </p>
  
  <pre><code>View header = getLayoutInflater().inflate(R.layout.header, null);
  View footer = getLayoutInflater().inflate(R.layout.footer, null);
  ListView lv = getListView();
  
  // setting header for the list view
  lv.addHeaderView(header);
  lv.addFooterView(footer);
  setListAdapter(new ArrayAdapter&lt;String&gt;(AudioListActivity.this, R.layout.row_audio,  R.id.label, db_results));
  </code></pre>
  
  <p>It goes to right below the last listview item. I want the footer to be in the bottom. How can I acheive it??</p>
  
  <p>PS: Header perfectly sits on the top.</p>
  
  <p>thanks for your time in advance.</p>