title: Hiding Toolbar on scroll with recyclerview inside fragment
body: <p>I'm trying to get the toolbar to collapse on scroll when a recyclerview inside a fragment is scrolled. To start, heres my main layout:</p>
  
  <pre><code>&lt;DrawerLayout&gt;
  
       &lt;RelativeLayout
          android:id="@+id/mainRelativeLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          &gt;
  
          &lt;android.support.design.widget.CoordinatorLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"  
              &gt;
  
              &lt;android.support.design.widget.AppBarLayout
                  android:id="@+id/appBarLayout"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  &gt;
  
                  &lt;Toolbar
                      android:id="@+id/toolbar"
                      android:layout_width="match_parent"
                      android:layout_height="?attr/actionBarSize"
                      android:elevation="5dp"
                      app:layout_scrollFlags="scroll|enterAlways"
                      &gt;
  
                  &lt;/Toolbar&gt;
  
              &lt;/android.support.design.widget.AppBarLayout&gt;
  
              &lt;FrameLayout
                  android:id="@+id/container"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  /&gt;
  
          &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;!-- ignore --&gt;
  &lt;drawercontents&gt;
  &lt;/DrawerLayout&gt;
  </code></pre>
  
  <p>So as you can probably guess my fragments are being loaded into <code>@id/container</code>. My first fragment contains the recyclerview, and I set <code>app:layout_behavior="@string/appbar_scrolling_view_behavior"</code> on that recyclerview. This does work, and the toolbar collapses on scroll. The issue is the toolbar covers the top contents of the fragment when its not collapsed. Adding a top margin to the fragment container equal to the size of the toolbar just causes a blank space to be left when the toolbar collapses (obviously).</p>
  
  <p>Whats missing here? Any ideas?</p>
  
  <p><strong>EDIT:</strong> As requested, here is the layout for the fragment containing the recyclerview:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/feed"
      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="#00000000"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"/&gt;
  </code></pre>