title: ScrollView adds large space at the bottom
body: <p>My main Activity has a number of buttons, that fit below each other on a large Tablet screen, but not on a smaller Phone screen. I added a ScrollView, so that the user can scroll down to the other buttons if the screen size requires it:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:background="@drawable/bg"
            android:gravity="center_horizontal"&gt;
  
      &lt;TextView
          android:id="@+id/trackSelectorText"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:gravity="center_horizontal"/&gt;
  
      &lt;ScrollView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"                
              android:gravity="center_horizontal"&gt;
  
          &lt;Button                    
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="foo" /&gt;
          &lt;!-- More buttons --&gt;
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This kinda works, however I have a large blank space below the last button (i.e. the ScrollView can scroll down too far). Both on an actual Tablet and on the emulator with a Phone configuration. If I <code>center</code> the inner LinearLayout (instead of <code>center_horizontal</code>), the space is evenly spread between the top and the bottom, which I don't want neither. How do I fix this layout?</p>
  
  <p>I hope this image makes it more clear, imagine that the ScrollView has been completely scrolled down and showing the last buttons. The blank space I mean is the one below <em>Button 6</em> on the right image:</p>
  
  <p><img src="https://i.stack.imgur.com/Ykq9D.png" alt="enter image description here"></p>