title: Toolbar hides PagerTitleStrip and part of RecyclerView
body: <p><em><a href="http://i.stack.imgur.com/apHUT.png" rel="nofollow">Screenshot 1</a> and
  <a href="http://i.stack.imgur.com/zpIiY.png" rel="nofollow">Screenshot 2</a> of my app</em></p>
  
  <p>The problem is basically this: The PagerTitleStrip and the RecyclerView go below my Toolbar even though I have set layout_behaviour to my ViewPager.</p>
  
  <p><strong>More detail:</strong></p>
  
  <p>I have a main activity that uses the layout below and then from it I launch fragments. Before trying the CoordinatorLayout + ViewPager and all of the other fancy stuff I just had a FrameLayout in which I displayed my fragments. However, I decided that I want to use </p>
  
  <blockquote>
  <pre><code>app:layout_scrollFlags="scroll|enterAlways"
  </code></pre>
    
    <p>app:layout_behavior="@string/appbar_scrolling_view_behavior"</p>
  </blockquote>
  
  <p>so that my Toolbar disappears when I scroll the recyclerview. I found online that FrameLayout had no behaviour in it to allow me to fix the position of the recyclerView going under the Toolbar and that's why I changed to ViewPager + CoordinatorLayout to manage my fragments.</p>
  
  <p>However, that introduced a few problems. What I want to achieve is - A toolbar with a PagerTitleStrip attached to it, when I scroll the toolbar disappears leaving the PagerTitleStrip visible ideally, maybe it hides as well I don't care that much about that. But I want my Navigation Drawer to keep working and it doesn't. It's like it doesn't exist.</p>
  
  <p>Now, this first layout actually has all of the above features working, but the problem is the strip is below the toolbar and it's not visible unless the Toolbar hides when I scroll. Drawer works. Recycler view items are partially hidden below the Toolbar unfortunately - they don't start scrolling from the right point of the screen even though I have that set -  appbar_scrolling_view_behavior</p>
  
  <p>Layout m_drawerlayout.xml for my main activity to inflate:</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/coordinatorLayout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;android.support.v4.widget.DrawerLayout
      android:id="@+id/drawer"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/pager"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
          &lt;android.support.v4.view.PagerTitleStrip
              android:id="@+id/title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:paddingTop="6dp"
              android:paddingBottom="6dp"
              android:layout_gravity="top"
              android:textSize="15sp"
              android:textColor="@color/tealfifty"
              android:background="@color/teal"&gt;
  
          &lt;/android.support.v4.view.PagerTitleStrip&gt;
      &lt;/android.support.v4.view.ViewPager&gt;
      &lt;ListView
          android:id="@+id/drawer_list"
          android:background="@color/tealDark"
          android:cacheColorHint="@android:color/transparent"
          android:choiceMode="singleChoice"
          android:divider="@drawable/list_divider"
          android:dividerHeight="1dp"
          android:layout_width="280dp"
          android:layout_height="match_parent"
          android:layout_gravity="start"/&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:id="@+id/appBarLayout"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
      &lt;include layout="@layout/app_bar"/&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>And this is the code for my app_bar.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;android.support.v7.widget.Toolbar
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:id="@+id/top_toolbar"
  android:layout_width="match_parent"
  android:layout_height="?attr/actionBarSize"
  android:background="@color/teal"
  app:theme="@style/ToolbarTheme"
  app:popupTheme="@style/Green.Overlay.LightPopup"
  app:layout_scrollFlags="scroll|enterAlways" &gt;
  
  &lt;Spinner android:id="@+id/spinner"
      android:layout_gravity="right"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:drawSelectorOnTop="true"
      android:paddingRight="20dp"
      /&gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>I tried moving elements around, in and out of other components but no success. For example, it seems logical that to make the PagerTitleStrip attached to the Toolbar and share one behaviour I'd have to nest the PagerTitleStrip inside the AppBar layout but PagerTitleStrip has to be a direct child of ViewPager to work...Any suggestions guys about all this? I'm new to all these design functionalities and I researched a lot without success, there are similar topics here but not at all what I need. Seems there's almost nothing on the internet about things I'm trying to do above (there are a few) compared to other basic topics.</p>
  
  <p>If anyone is wondering why I'm using ViewPager when I have no tabs, it's because as I said, FrameLayout has no behaviour allowing me to use a disappearing Toolbar correctly and that's what I found is good to use. I also saw NestedScrollView could be used but I haven't used it ever so... I now want to possibly use the ViewPagerTitle which I guess limits me to ViewPager for the Fragments.</p>