title: how to show tabs on top in collapsing toolbar while scrolling
body: <p>I have a layout with collapsing toolbar and tabs as shown in attached image below 
  <a href="https://i.stack.imgur.com/hvZHp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hvZHp.jpg" alt="enter image description here"></a></p>
  
  <p>I want to show my tab layout on top  while scrolling the list in anyone of the tabs <br>
  I have tried some links <a href="https://stackoverflow.com/questions/32865957/scrolling-with-collapsing-toolbar-and-tabs">link1</a> and end with below result as shown in image below <br>
  <br>
  <br></p>
  
  <p><a href="https://i.stack.imgur.com/R4Vxx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R4Vxx.png" alt="enter image description here"></a> </p>
  
  <p><br>
  <br>
  I want to hide my toolbar ,profile image and textview completely while scrolling the list in any tabs <br>
  <br>
  following is the layout xml code  that I used <br>
  <br></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"
      android:background="@android:color/background_light"
      android:fitsSystemWindows="true"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/main.appbar"
          android:layout_width="match_parent"
          android:layout_height="256dp"
          android:fitsSystemWindows="true"&gt;
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/main.collapsing"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:fitsSystemWindows="true"
              app:contentScrim="@color/background_color"
              app:expandedTitleMarginEnd="64dp"
              app:expandedTitleMarginStart="48dp"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
              &lt;ImageView
                  android:id="@+id/main.backdrop"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:fitsSystemWindows="true"
                  android:scaleType="centerCrop"
                  android:src="@drawable/mobilebanner"
                  app:layout_collapseMode="parallax" /&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/main.toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  app:layout_collapseMode="pin" /&gt;
          &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.widget.NestedScrollView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fillViewport="true"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
  
              &lt;TextView
                  android:id="@+id/user_name"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="40dp"
                  android:text="abc"
                  android:gravity="center_horizontal"
                  android:lineSpacingExtra="8dp"
                  android:textSize="20sp" /&gt;
  
              &lt;android.support.design.widget.TabLayout
                  android:id="@+id/tab_layout"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  app:tabIndicatorColor="@color/background_color"
                  app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
                  app:tabTextColor="@color/black" /&gt;
  
              &lt;android.support.v4.view.ViewPager
                  android:id="@+id/htab_viewpager"
                  android:layout_width="match_parent"
                  android:layout_height="400dp" /&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  
  
  
          &lt;android.support.design.widget.FloatingActionButton
              android:layout_width="80dp"
              android:layout_height="80dp"
              app:layout_anchor="@id/main.appbar"
              app:layout_anchorGravity="bottom|center_horizontal|center"
              android:layout_margin="@dimen/activity_horizontal_margin"
              android:src="@drawable/user" /&gt;
  
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>