Android: CoordinatorLayout and SwipeRefreshLayout

后端 未结 1 1557
臣服心动
臣服心动 2020-12-12 22:20

I try to implement auto hiding toolbar feature from the new support library 22.2.0. Without SwipeRefreshLayout is working fine:

相关标签:
1条回答
  • 2020-12-12 22:52

    Set the scroll behavior to the SwipeRefreshLayout not the RecyclerView.

        <android.support.v4.widget.SwipeRefreshLayout
            android:id="@+id/swipe_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">
    
            <android.support.v7.widget.RecyclerView
                android:id="@+id/cardList"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scrollbars="vertical" />
    
        </android.support.v4.widget.SwipeRefreshLayout>
    
    0 讨论(0)
提交回复
热议问题