title: Hide/show Toolbar
body: <p>In my application, I want to hide/show the toolbar when the list is scrolling. In my opinion, I implemented everything like described in this how to show/hide under link:</p>
  
  <p><a href="https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling%28part3%29/" rel="nofollow">https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling%28part3%29/</a></p>
  
  <p>The problem is, when the list is scrolled, the toolbar isn't moving/hiding.</p>
  
  <p>Here is the code of the .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:id="@+id/main_content"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appBar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:theme="@style/ThemeOverlay.AppCompat.ActionBar"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="?attr/colorPrimary"
              android:minHeight="?attr/actionBarSize"
              app:layout_scrollFlags="scroll|enterAlways"
              app:titleTextColor="@android:color/white" /&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;se.emilsjolander.stickylistheaders.StickyListHeadersListView
          android:id="@+id/lvRef"
          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>Here are the dependencies:</p>
  
  <pre><code>dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.4.0'
      compile 'se.emilsjolander:stickylistheaders:2.7.0'
      compile 'com.android.support:recyclerview-v7:23.4.0'
      compile 'com.android.support:cardview-v7:23.4.0'
      compile 'com.android.support:design:23.4.0'
  }
  </code></pre>