问题
- CoordinatorLayout 嵌套 RecyclerView 滑动联动没问题,但是在 RecylerView 中再嵌套一层 RecyclerView 就会出现不联动的问题。
解决
- 给最内层的 RecyclerView 设置属性:nestedScrollingEnabled = false,使其不参与联动
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"/>