title: hide/show tab bar/tab layout on scrolling in coordinator layout
body: <p>I want to hide/show the tab bar(not action bar) while scrolling up/down in a coordinator layout.
  I have tried implementing the same technique used for action bar but it isn't fruitful</p>
  
  <p>here is my xml code snippet</p>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout
          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="wrap_content"
                  android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
                  &lt;android.support.v7.widget.Toolbar
                      android:id="@+id/drawer_toolbar"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:background="?attr/colorPrimaryDark"
                      android:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/&gt;
                  &lt;android.support.design.widget.TabLayout
                      android:id="@+id/tabs"
                      app:layout_scrollFlags="scroll"
                  app:layout_behavior="@string/appbar_scrolling_view_behavior"
                      android:layout_width="match_parent"
                      android:background = "?attr/colorPrimaryDark"
                      android:layout_height="wrap_content"
  
                      /&gt;
  
              &lt;/android.support.design.widget.AppBarLayout&gt;
  </code></pre>
  
  <p>It is working for the app bar but not for the tab bar.
  how can this be achieved?
  please advice?</p>
  
  <p>edit: i just want the tab bar to scroll and not the app bar.</p>