title: show toolbar when switching page in ViewPager
body: <p>I have search the Stack Overflow beforewise, but haven't found an appropriate answer to my problem. </p>
  
  <p>I have an Android application with the coordinator layout that has a nested ViewPager inside. If I scroll a RecyclerView that is inside of the first fragment in a View pager, the Toolbar is hidden and shown as intended. However, my other fragments in the ViewPager do not have nested scroll, so I would like to show Toolbar if it is hidden on ViewPager page change. I wonder if I can extend the CoordinatorLayout behavior to have it nicely done. </p>
  
  <p>Thanks in advance! I will be happy to provide more details if needed.</p>
  
  <p>The approximate code is (tried to strip all the unnecessary stuff): <code>main_activity.xml</code></p>
  
  <pre><code>&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/coordinator_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"&gt;
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/app_bar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              app:layout_scrollFlags="scroll|enterAlways" /&gt;
          &lt;android.support.design.widget.TabLayout
              android:id="@+id/tab_layout"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_below="@id/toolbar" /&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="match_parent"
          android:layout_below="@id/tab_layout"
          app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>and a scrolling fragment: <code>fragment.xml</code></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"&gt;
  
  &lt;android.support.v7.widget.CardView
      android:id="@+id/add_word_card"
      android:orientation="horizontal"
      android:layout_height="wrap_content"
      android:layout_width="match_parent"&gt;
      &lt;RelativeLayout
          android:id="@+id/add_word_layout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/highlight"&gt;
          &lt;!-- some unrelated stuff --&gt;
      &lt;/RelativeLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/list"
          android:layout_below="@id/add_word_card"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:context=".MainActivity"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have found a couple of related questions like: <a href="https://stackoverflow.com/questions/31869406/viewpager-with-coordinator-layout">this</a> or <a href="https://stackoverflow.com/questions/31582420/non-scrolling-fragment-in-a-viewpager-inside-coordinatorlayout">this</a>. But they focus mostly on layout problems, while I want to understand if it is real to have a nice solution to triggering Toolbar movement on demand.</p>