title: LinearLayout background colour filling whole page
body: <p>I'm trying to fill a LinearLayout with a background colour, however at the bottom of the screen I have a footer with a ListView, which the background colour with covering.</p>
  
  <p><img src="https://i.stack.imgur.com/gnEvd.png" alt="http://i.imgur.com/k8CzOyJ.jpg"> </p>
  
  <p>Code:</p>
  
  <pre><code> &lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:fillViewport="true"&gt;
  
      &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content" android:background="#ffffff"&gt;
  
          &lt;!--  Header Starts--&gt;
          &lt;LinearLayout android:id="@+id/header"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="@layout/header_gradient"
              android:paddingTop="5dip"
              android:paddingBottom="5dip"&gt;
              &lt;!-- Logo Start--&gt;
              &lt;ImageView android:src="@drawable/reglogo"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="10dip"/&gt;
              &lt;!-- Logo Ends --&gt;
          &lt;/LinearLayout&gt;
          &lt;!--  Header Ends --&gt;
  
          &lt;!-- Footer Start --&gt;
          &lt;LinearLayout android:id="@+id/footer"
              android:layout_width="fill_parent"
              android:layout_height="90dip"
              android:orientation="vertical"
              android:layout_alignParentBottom="true"&gt;
              &lt;!-- List Starts --&gt;
              &lt;ListView
                  android:id="@+id/list"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"&gt;
              &lt;/ListView&gt;
          &lt;/LinearLayout&gt;
          &lt;!-- Footer Ends --&gt;
  
          &lt;LinearLayout
              xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="fill_parent"
              android:layout_below="@id/header"
              android:background="@color/blue"&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/RelativeLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>I understand <code>android:layout_width="fill_parent"</code> is what is causing the problem, but when I used <code>wrap_content</code> it didn't fill the area I wanted it to.</p>
  
  <p>How do I stop the background colour continuing to the bottom of the page?</p>