title: Grow LinearLayout inside Scrollview for bigger phones on Android
body: <p>I have a Scrollview for the complete screen, so in small phones you can scroll and see the complete form.</p>
  
  <p>For big screen/hdpi phones, the screen has enough size so it fits. </p>
  
  <p>The problem is that since its a LinearLayout, all views are at the top, and there is white space at the bottom.</p>
  
  <p>I set the weight on one of the items items inside the linear layout, but it does not grow.</p>
  
  <p>my code:</p>
  
  <pre><code>  &lt;ScrollView&gt;
         &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
              &lt;RelativeLayout
                   android:id="@+id/header"
                   android:layout_width="match_parent"
                   android:layout_height="wrap_content"
                   android:orientation="vertical" &gt;
                   HEADER STUFF
              &lt;/RelativeLayout&gt;
  
  
               &lt;RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="1"
          android:orientation="vertical" &gt; 
             THIS PART I NEED TO GROW AS MUCH AS POSSIBLE SO THE FOOTER IS AT THE BOTTOM OF THE PAGE.
            &lt;/RelativeLayout&gt;
  
  
          &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/LightBlue"
          android:orientation="vertical"
          android:paddingBottom="10dp" &gt;
              FOOTER STUFF.  NEED THIS TO BE AT THE FOOTER IF THE PHONE IS BIG ENOUGH. 
              &lt;/RelativeLayout&gt;
         &lt;LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>