因为种种原因导致嵌套使用,这里只记录解决办法。
1,xml中RecyclerView添加android:nestedScrollingEnabled="false"属性
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"/>
或
2,代码设置
mRecyclerView.setNestedScrollingEnabled(false);
本文介绍了解决嵌套使用RecyclerView时可能出现的滚动冲突问题,提供了两种禁用嵌套滚动的方法:一是在XML布局文件中添加属性android:nestedScrollingEnabled=false;二是通过代码调用setNestedScrollingEnabled(false)。
7114

被折叠的 条评论
为什么被折叠?



