SwipeRefreshLayout内的RecyclerView无法点击

1 人关注

我的应用程序中的刷新布局中有一个回收器视图,由于某些原因,如果回收器视图在最上面,滚动偏移量=0,只有第一个项目可以点击。 如果我把偏移量设置为1,如果滚动偏移量为0,所有项目都可以点击,但是,这使得滑动刷新停止工作。有谁知道为什么会发生这种情况吗?

<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
    android:id="@+id/exchanges_swipe_refresh"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintBottom_toBottomOf="parent">
    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_exchanges"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingVertical="8dp"
        android:visibility="invisible"
        android:clipToPadding="false"
        tools:listitem="@layout/exchanges_list_item"/>