title: ViewPager in a NestedScrollView
body: <p>I need to create an interface like Google Newsstand which is a sort of ViewPager (horizontal scroll) over a collapsing header (vertical scroll). One of my requirements is to use the new Design Support Library presented at the Google IO 2015.
  (<a href="http://android-developers.blogspot.ca/2015/05/android-design-support-library.html">http://android-developers.blogspot.ca/2015/05/android-design-support-library.html</a>)</p>
  
  <p>Based on the sample created by Chris Banes (<a href="https://github.com/chrisbanes/cheesesquare">https://github.com/chrisbanes/cheesesquare</a>) I've reach the point that I'm able to do the collapsing behaviour but with a basic LinearLayout (without horizontal scroll).</p>
  
  <p>I tried to replace the LinearLayout by a ViewPager and I got a blank screen. I played with: width, weight and all kind of view groups but.... still a blank screen. It seems that ViewPager and NestedScrollView don't like each other.</p>
  
  <p>I tried a workaround by using an HorizontalScrollView: it works but I loose the benefit of the PagerTitleStrip feature and the focus on a single panel (I can stop the horizontally between 2 panels).</p>
  
  <p>Now I have no more ideas, if anyone can lead me to a solution... </p>
  
  <p>Thanks</p>
  
  <p>Here is my latest layout file :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      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"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="@dimen/header_height"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:contentScrim="?attr/colorPrimary"
              app:expandedTitleMarginEnd="64dp"
              app:expandedTitleMarginStart="48dp"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
              &lt;include
                  layout="@layout/part_header"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  app:layout_collapseMode="parallax"/&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/activity_main_toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  app:layout_collapseMode="pin"
                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/&gt;
  
          &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.widget.NestedScrollView
          android:id="@+id/activity_main_nestedscrollview"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fillViewport="true"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
          &lt;android.support.v4.view.ViewPager
              android:id="@+id/activity_main_viewpager"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="#FFA0"/&gt;
  
  
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>