NestedScrollView嵌套 RecyclerView 冲突

NestedScrollView嵌套 RecyclerView 冲突

使用NestedScrollView嵌套 RecyclerView 滑动时RecyclerView 滑动效果
网络借图 :如有侵犯联系删除
NestedScrollView嵌套 RecyclerView 冲突_第1张图片

去掉RecyclerView 滑动效果

            <androidx.core.widget.NestedScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true">
				
				<androidx.recyclerview.widget.RecyclerView
                                android:id="@+id/recyclerView"
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:overScrollMode="never"
                                android:scrollbars="none" />
				</androidx.core.widget.NestedScrollView>

在NestedScrollView 增加 android:fillViewport=“true”
在RecyclerView 增加 android:overScrollMode=“never” android:scrollbars=“none”
这样NestedScrollView 滑动时RecyclerView就不在滑动了
开发小笔记希望能帮助大家

你可能感兴趣的:(Android,RecyclerView,android,android,studio)