title: ScrollView inside RelativeLayout
body: <p>
  I have a Coordinator Layout, where I have on top of it a player info bar and at the bottom a navigation bar, which are fixed there. In the middle I have a relative layout which contains a scroll view and the problem is, that the scroll view doesnt scroll. Additionally to that I have put for test purposes a  border around the relative layout inside of the scroll view and as you can see, the size of the layout is way smaller than it should be.</p>
  
  
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/mainCoordinator"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context="com.example.felix043.thedungeon.Main.MainActivity"&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;!-- Player Infos --&gt;
      &lt;include layout="@layout/layout_playerinfo"&gt;&lt;/include&gt;
  
      &lt;!-- ViewPager --&gt;
      &lt;RelativeLayout
          android:id="@+id/QuestRelLayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
          &lt;include
              layout="@layout/layout_viewpager"&gt;
          &lt;/include&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/playerinfo"
          android:layout_above="@+id/bottomNavLayout"&gt;
              &lt;ScrollView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/playerinfo"
                  android:layout_above="@+id/bottomNavLayout"&gt;
  
                  &lt;RelativeLayout
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_above="@+id/bottomNavLayout"
                      android:layout_below="@+id/playerinfo"
                      android:background="@drawable/text_border"&gt;
  
                      &lt;Button
                          android:id="@+id/button8"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_above="@+id/button7"
                          android:layout_marginBottom="28dp"
                          android:layout_marginStart="72dp"
                          android:layout_toEndOf="@+id/button7"
                          android:text="Button" /&gt;
  
                      &lt;Button
                          android:id="@+id/button7"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_alignParentBottom="true"
                          android:layout_alignParentStart="true"
                          android:layout_marginBottom="50dp"
                          android:layout_marginStart="41dp"
                          android:text="Button" /&gt;
  
                      &lt;Button
                          android:id="@+id/button9"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_above="@+id/button8"
                          android:layout_marginBottom="29dp"
                          android:layout_marginEnd="12dp"
                          android:layout_toStartOf="@+id/button8"
                          android:text="Button" /&gt;
  
                      &lt;Button
                          android:id="@+id/button10"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_above="@+id/button9"
                          android:layout_alignStart="@+id/button8"
                          android:layout_marginBottom="46dp"
                          android:layout_marginStart="24dp"
                          android:text="Button" /&gt;
  
                      &lt;Button
                          android:id="@+id/button11"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_above="@+id/button10"
                          android:layout_toStartOf="@+id/button8"
                          android:text="Button" /&gt;
  
                      &lt;Button
                          android:id="@+id/button12"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_alignParentBottom="true"
                          android:layout_alignParentEnd="true"
                          android:text="Button" /&gt;
  
                  &lt;/RelativeLayout&gt;
              &lt;/ScrollView&gt;
      &lt;/RelativeLayout&gt;
      &lt;!-- BottomNav --&gt;
      &lt;include layout="@layout/layout_navbar"&gt;&lt;/include&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p><a href="https://i.stack.imgur.com/yIva2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yIva2.png" alt=""></a>
  As the blue lines showes, there are more buttons above the scroll view, but I cant scroll.</p>
  
  <p>
  Expected result: The scroll view is as big as the screen without the player info and the navigation bar and it should be scrollable.
  </p>