title: Show and hide Action bar while scrolling view pager content
body: <p>I want to show and hide the action bar /toolbar as the Google Play store app. I am using sliding tabs on  top and view pager to show the content of each tab. Here is the screenshot of Google play store app for the reference:</p>
  
  <p><img src="https://i.stack.imgur.com/0K5Ch.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/MUJAs.png" alt="enter image description here"></p>
  
  <p><strong>My layout XML :</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent" android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout style="@style/HeaderBar"
          android:id="@+id/headerbar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
  
          &lt;include layout="@layout/toolbar_no_bg"
              android:id="@+id/toolbar_actionbar"/&gt;
  
          &lt;com.fauzie.sample.tabsspinner.widget.SlidingTabLayout
              android:background="@color/tab_background"
              android:id="@+id/sliding_tabs"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/view_pager"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@id/headerbar"&gt;
  
      &lt;/android.support.v4.view.ViewPager&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>