title: Toolbar not collapsing with TabLayout
body: <p>I would like to let the <code>Toolbar</code> collapse when the user scrolls in one of the <code>TabLayout</code>'s tabs (supplied by <code>ViewPager</code>).</p>
  
  <p>This is the functionality I desire:</p>
  
  <p><a href="https://i.stack.imgur.com/PgguT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PgguT.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/zQPG2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zQPG2.png" alt="enter image description here"></a></p>
  
  <p><strong>However, my layout does not only not scroll, but also <em>cuts off</em> content at the bottom</strong> (to be exact, it cuts off 48dp - the height of a toolbar):</p>
  
  <p><a href="https://i.stack.imgur.com/1I0rR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1I0rR.png" alt="enter image description here"></a></p>
  
  <p>I use the ViewPager to display each Fragment as a tab. The Fragments consist of a simple <code>ScrollView</code> holding a <code>TextView</code>. Here is the layout:</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"
      android:fitsSystemWindows="true"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/ueber_toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              android:background="?attr/colorPrimary"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
              app:layout_scrollFlags="scroll|enterAlways" /&gt;
  
          &lt;android.support.design.widget.TabLayout
              android:id="@+id/ueber_tabLayout"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:tabMode="fixed"
              app:tabGravity="fill"
              android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
              app:tabIndicatorColor="@android:color/white"/&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/ueber_viewpager"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"/&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>Each fragment has the following layout:</p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
      &lt;TextView
          android:id="@+id/ueber_text"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textSize="14sp"
          android:textColor="#000000"
          android:linksClickable="false"
          android:textColorLink="#000000"
          android:fontFamily="serif"
          android:padding="16dp"/&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>The ViewPager is set up by a ViewPagerAdapter:</p>
  
  <pre><code>ViewPager viewPager = (ViewPager) findViewById(R.id.ueber_viewpager);
  
  ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
  adapter.addFrag(new ContentFragment(), "Über");
  adapter.addFrag(new ContentFragment(), "Impressum");
  adapter.addFrag(new ContentFragment(), "Lizenzen");
  viewPager.setAdapter(adapter);
  
  TabLayout tabLayout = (TabLayout) findViewById(R.id.ueber_tabLayout);
  tabLayout.setupWithViewPager(viewPager);
  </code></pre>