今天看啥  ›  专栏  ›  chen yu

Android之SwipeRefreshLayout嵌套RecyclerView遇到的坑

chen yu  · CSDN  ·  · 2020-01-01 00:00

1 、需求

RecyclerView多布局里面加入SwipeRefreshLayout实现下拉刷新

2、关键代码

        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
            android:id="@+id/mainRefresh"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/llRemind"
            app:layout_constraintVertical_bias="0.0"
            tools:layout_editor_absoluteX="0dp" >
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/list"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:



原文地址:访问原文地址
快照地址: 访问文章快照