Có ai đã tìm ra cách để có được recyclerviews, AppbarLayouts và SwipeRefreshLayout để làm việc cùng nhau trên 23.2 chưa? Tôi đang sử dụng một phương pháp khá chuẩn mà tôi nghĩ, nhưng swiperefreshlayout giữ lấy cử chỉ di chuyển khi cố gắng di chuyển lên recyclerview.Recyclerviews và SwipeRefreshLayout sử dụng thư viện hỗ trợ 23.2.0
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?attr/toolbar_theme"
app:layout_scrollFlags="scroll|enterAlways"
android:elevation="4dp" />
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/fragment_container"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--fragment goes here -->
</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
với những điều sau bên trong nó
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/window_background">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_marginTop="-4dp"
android:layout_marginBottom="-8dp"
android:elevation="17dp"
android:indeterminate="true"
android:visibility="invisible" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout>
Bạn không cần áp dụng giải pháp này nữa, vì điều này được khắc phục trong 23.3.0. – segoh