android - Scrolling down triggers refresh instead of revealing the toolbar -


i started using new coordinatorlayout , ran issue:

demo

as can see when try scroll down when toolbar partially visible , recylcerview @ top position triggers refresh event instead of pulling down toolbar. user has scroll down again reveal it.

layout xml looks this: activity_main.xml:

<android.support.v4.widget.drawerlayout 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/drawer_layout"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:fitssystemwindows="true">      <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.support.design.widget.appbarlayout             android:layout_width="match_parent"             android:layout_height="wrap_content">              <android.support.v7.widget.toolbar                 android:id="@+id/toolbar"                 style="@style/customactionbar"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:background="?attr/colorprimary"                 android:minheight="?attr/actionbarsize"                 app:layout_scrollflags="scroll|enteralways"/>          </android.support.design.widget.appbarlayout>          <framelayout             android:id="@+id/container"             android:layout_width="match_parent"             android:layout_height="match_parent"             app:layout_behavior="@string/appbar_scrolling_view_behavior"/>      </android.support.design.widget.coordinatorlayout>      <android.support.design.widget.navigationview         android:id="@+id/navigation_view"         android:layout_width="wrap_content"         android:layout_height="match_parent"         android:layout_gravity="start"         android:background="@android:color/white"         app:headerlayout="@layout/navigation_drawer_header"         app:menu="@menu/navigation_items" />  </android.support.v4.widget.drawerlayout> 

fragment_main.xml:

<framelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent">      <android.support.v4.widget.swiperefreshlayout         android:id="@+id/swipe_refresh"         android:layout_width="match_parent"         android:layout_height="match_parent">          <android.support.v7.widget.recyclerview             android:id="@+id/recycler_view"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:cliptopadding="false"             android:padding="8dp"             android:scrollbars="none" />      </android.support.v4.widget.swiperefreshlayout>  </framelayout> 

ther swiperefreshlayout in framelayout becuase there more elements in fragment in app.

any appreciated.

update: issue has been fixed in in support library v23.1.1.

seems have enable/disable swiperefreshlayout when appbarlayout offset changes, using appbarlayout.onoffsetchangedlistener.

see https://stackoverflow.com/a/30822119/795820


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -