title: Fill vertical space between two views (+scroll)
body: <p>I have 3 views.<br>
  1. View A has a fixed height and aligned to the top of the screen.<br>
  2. View B has a fixed height and aligned to the bottom of the screen.<br>
  3. View C has to fill a vertical space between views A and B but has to be minimum X height. <strong>If the vertical space between A and B is less than Xdp, the vertical scroll bar has to appear</strong> (and view B has to scroll, not to be sticked to bottom).</p>
  
  <p>What I have so far (a bit simplified), it may be completely wrong:</p>
  
  <pre><code>&lt;ScrollView
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_height="match_parent"
      android:layout_width="match_parent"
      android:fillViewport="true"&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;RelativeLayout
              android:id="@+id/layout_banner_top"
              android:layout_width="match_parent"
              android:layout_alignParentTop="true"
              android:layout_height="@dimen/statistics_probanner_height"&gt;
  
           &lt;/RelativeLayout&gt;
  
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content" &lt;!-- UPD here as McAdam331 suggested --&gt;
              android:minHeight="@dimen/statistics_circular_progress_container_height"
              android:layout_below="@+id/layout_banner_top"
              android:layout_above="@+id/layout_banner_bottom"&gt;
  
              &lt;!-- here is some content --&gt;
  
           &lt;/RelativeLayout&gt;
  
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="@dimen/statistics_bottom_bar_height"
              android:id="@+id/layout_banner_bottom"
              android:layout_alignParentBottom="true"&gt;
  
          &lt;/RelativeLayout&gt;
      &lt;/RelativeLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>How it looks:<br>
  <a href="https://dl.pushbulletusercontent.com/dqt37inQjQ2IIxxWyvCHahzr3mC0GsIQ/Screenshot_2015-05-04-21-41-35.png" rel="nofollow">Picture 1</a><br>
  <a href="https://dl.pushbulletusercontent.com/U99jtvIa7SeaLQ1FJwSJtAur3238AFMW/Screenshot_2015-05-04-21-41-44.png" rel="nofollow">Picture 2</a>  </p>
  
  <p>Currently minHeight of the view in between (view C) is set to 600dp, but as you see on Picture 2 view C is filling an available space between top and bottom views, height is too small and scroll not appearing.</p>
  
  <p>Is it possible to implement? How can I achieve that behaviour?</p>