title: SwipeRefreshLayout obstructs the scroll of recycleview at the time of scrolling up
body: <p>In my recycleview when I scroll up in the list, the swiperefreshlayout is triggered which hinders the movement of my list in the upward direction. I went through <a href="http://nlopez.io/swiperefreshlayout-with-listview-done-right/" rel="nofollow">this</a> blog but it solves this problem for listview. Is there any similar work around for this problem for recycleview as onscrollListener is deprecated which is used in this blog. </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"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/main_content"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      app:layout_scrollFlags="scroll|exitUntilCollapsed"
      tools:context="com.morpho.innovationlab.trustwall.Dashboard"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar"
          android:layout_width="match_parent"
          android:layout_height="250dp"
          android:fitsSystemWindows="true"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/collapsing_toolbar"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:fitsSystemWindows="true"
              app:contentScrim="?attr/colorPrimary"
              app:expandedTitleMarginEnd="64dp"
              app:expandedTitleMarginStart="48dp"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:orientation="horizontal"
                  app:layout_collapseMode="parallax"
                  app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"&gt;
  
                  &lt;ImageView
                      android:id="@+id/backdrop"
                      android:layout_width="100dp"
                      android:layout_height="100dp"
                      android:layout_margin="10dp"
                      android:importantForAccessibility="no"
                      android:src="@drawable/tw_logo"
                      app:layout_collapseMode="parallax"
                      app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" /&gt;
  
                  &lt;LinearLayout
                      android:layout_width="0dp"
                      android:layout_height="match_parent"
                      android:layout_margin="40dp"
                      android:layout_weight="1"
                      android:orientation="vertical"&gt;
  
  
                      &lt;TextView
                          android:id="@android:id/text1"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:text="Trustwall"
                          android:textColor="@android:color/white"
                          android:textSize="24sp"
                          app:layout_collapseMode="parallax"
                          app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" /&gt;
  
                      &lt;TextView
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:text="Your Privacy is our priority"
                          android:textColor="@android:color/white"
                          android:textSize="12sp"
                          app:layout_collapseMode="parallax"
                          app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" /&gt;
                  &lt;/LinearLayout&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  app:layout_collapseMode="pin"
                  app:layout_scrollFlags="scroll|enterAlways"
                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
  
          &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.widget.SwipeRefreshLayout
          android:id="@+id/swipeRefreshLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
  
          &lt;FrameLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
              &lt;TextView
  
                  android:id="@+id/emptyview"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_margin="50dp"
                  android:gravity="center_horizontal"
                  android:text="Click on the Add button to add websites to trustwall secure zone."
                  android:visibility="gone" /&gt;
  
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/rv"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:scrollbars="vertical"
                  app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
  
          &lt;/FrameLayout&gt;
      &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/add_website"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="bottom|end"
          android:layout_marginBottom="20dp"
          android:layout_marginRight="20dp"
          android:src="@drawable/ic_add"
          app:elevation="12dp"
          app:pressedTranslationZ="12dp" /&gt;
      /&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>