title: RecyclerView inside SwipeRefreshLayout inside NestedScrollViewLayout cannot scroll
body: <p>I have an activity with collapsing toolbar and a nested scroll view with a <code>FrameLayout</code> that I place the fragments in it. Initially, I place in it a <code>FragmentA</code> with a <b> CardView </b>.</p>
  <p>Works great. When I click a button though I replace that <code>FragmentB</code> with another one containing a <b> RecyclerView </b>.</p>
  <p>When I add the <code>FragmentB</code> I cant scroll to the bottom of the list.</p>
  <p><strong>Host Activity Layout:</strong></p>
  <pre><code>&lt;android.support.design.widget.AppBarLayout
      android:id=&quot;@+id/appbar&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;340dp&quot;
      android:theme=&quot;@style/ThemeOverlay.AppCompat.Dark.ActionBar&quot;
      android:fitsSystemWindows=&quot;true&quot;&gt;
  
  
      &lt;android.support.design.widget.CollapsingToolbarLayout
          android:id=&quot;@+id/collapsing_toolbar&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          app:layout_scrollFlags=&quot;scroll|exitUntilCollapsed|enterAlwaysCollapsed&quot;
          android:fitsSystemWindows=&quot;true&quot;
          app:contentScrim=&quot;?attr/colorPrimary&quot;
          app:expandedTitleMarginStart=&quot;48dp&quot;
          app:expandedTitleMarginEnd=&quot;64dp&quot;&gt;
  
          .........
            ......
      &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;android.support.v4.widget.NestedScrollView
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:layout_gravity=&quot;fill_vertical&quot;
      android:fillViewport=&quot;true&quot;
      app:layout_behavior=&quot;@string/appbar_scrolling_view_behavior&quot;
      &gt;
  
      &lt;!-- the layout which will be the content of the activity (which will be hosted inside the drawer (NOT the list of the drawer)) --&gt;
      &lt;FrameLayout
          android:id=&quot;@+id/frame_container&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_behavior=&quot;@string/appbar_scrolling_view_behavior&quot;
          &gt;
  
      &lt;/FrameLayout&gt;
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>
  <p><strong>FragmentB Layout:</strong></p>
  <pre><code>&lt;android.support.v4.widget.SwipeRefreshLayout
      android:id=&quot;@+id/contentView&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      app:layout_behavior=&quot;@string/appbar_scrolling_view_behavior&quot;&gt;
  
  
      &lt;android.support.v7.widget.RecyclerView
          android:id=&quot;@+id/rv_users&quot;
          app:layout_behavior=&quot;@string/appbar_scrolling_view_behavior&quot;
          android:layout_width=&quot;match_parent&quot;
  
          android:layout_height=&quot;wrap_content&quot; /&gt;
  
      &lt;include
          layout=&quot;@layout/view_progress&quot;
          /&gt;
  
      &lt;include
          layout=&quot;@layout/view_retry&quot;
          /&gt;
  
      &lt;!--&lt;/LinearLayout&gt;--&gt;
  
  &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  </code></pre>