title: ViewPager inside ScrollView not working
body: <p>I want to put a <code>ViewPager</code> inside a <code>CoordinatorLayout</code> withing a <code>NestedScrollView</code>. The viewpager houses 3 fragments.</p>
  
  <p>Problem is the fragments aren't visible. Tabs show up and the rest of the layout is visible and scrolls accordingly. </p>
  
  <p>Below is the code for my layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      android:orientation="vertical"&gt;
  
      &lt;include layout="@layout/toolbar" /&gt;
  
      &lt;android.support.design.widget.CoordinatorLayout
          android:id="@+id/coordinatorLayout"
          android:layout_below="@+id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/DarkBodyBackground"
          android:fitsSystemWindows="true"
          android:orientation="vertical"&gt;
  
          &lt;android.support.design.widget.AppBarLayout
              android:id="@+id/app_bar_layout"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:fitsSystemWindows="true"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
              &lt;android.support.design.widget.CollapsingToolbarLayout
                  android:id="@+id/collapsing_toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="500dp"
                  android:background="@color/DarkBodyBackground"
                  android:fitsSystemWindows="true"
                  app:contentScrim="?attr/colorPrimary"
                  app:expandedTitleMarginEnd="64dp"
                  app:expandedTitleMarginStart="48dp"
                  app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
                  &lt;include layout="@layout/artist_header" /&gt;
  
              &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
          &lt;/android.support.design.widget.AppBarLayout&gt;
  
          &lt;android.support.v4.widget.NestedScrollView
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
              &lt;RelativeLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical"&gt;
  
                  &lt;include layout="@layout/loading_indicator" /&gt;
  
                  &lt;android.support.design.widget.TabLayout
                      android:id="@+id/tabLayout"
                      style="@style/TabLayoutStyle"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      app:layout_scrollFlags="scroll|enterAlways"
                      app:tabGravity="fill"
                      app:tabMode="fixed" /&gt;
  
                  &lt;android.support.v4.view.ViewPager
                      android:id="@+id/viewpager"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:visibility="gone" /&gt;
  
              &lt;/RelativeLayout&gt;
          &lt;/android.support.v4.widget.NestedScrollView&gt;
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>