title: Hide Toolbar on scroll with CoordinatorLayout
body: <p>My app's action bar consists of a <code>Toolbar</code> and a tab view with a <code>ViewPager</code> to display the page's content. I am using a <code>CoordinatorLayout</code> so that I can hide the <code>Toolbar</code> on scroll, but it isn’t hiding. Here is my activity_main.xml:</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;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;android.support.design.widget.AppBarLayout
              android:id="@+id/appbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:layout_scrollFlags="scroll|enterAlways"&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  android:background="?attr/colorPrimary"
                  android:fitsSystemWindows="true"
                  app:contentInsetEnd="0dp"
                  app:contentInsetStart="0dp"
                  app:layout_scrollFlags="scroll|enterAlways"&gt;
  
                  &lt;include layout="@layout/actionbar" /&gt;
              &lt;/android.support.v7.widget.Toolbar&gt;
  
              &lt;com.whatsgoodly.views.SlidingTabLayout
                  android:id="@+id/tabs"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@color/purple"
                  app:layout_scrollFlags="scroll|enterAlways" /&gt;
          &lt;/android.support.design.widget.AppBarLayout&gt;
  
          &lt;android.support.v4.view.ViewPager
              android:id="@+id/pager"
              android:layout_width="match_parent"
              android:layout_height="0dp”
              android:layout_weight="1"
              app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>Any thoughts?</p>