嵌套Scrollview滚动中的Recyclerview滚动,但不能像普通的Recyclerview或Nested Scrollview一样快速滚动 [英] Recyclerview inside Nested Scrollview scroll but does not fast scroll like normal Recyclerview or Nested Scrollview

查看:68
本文介绍了嵌套Scrollview滚动中的Recyclerview滚动,但不能像普通的Recyclerview或Nested Scrollview一样快速滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在NestedScrollView内使用RecyclerView,它可以工作.但是,当我在LinearLayout内使用RecyclerView时,它会根据手势以各种速度滚动.滚动倾听手势,如果我仅向上滑动一点,则滚动一点;而如果我非常快速地滑动,则滚动非常快.现在我的问题是NestedScrollView中的RecyclerView当然可以滚动,但是快速滚动不起作用.但是,我向上或向下滑动时,RecyclerViewNestedScrollView只能滚动一点.

I am using RecyclerView inside NestedScrollView and it works. But when I use RecyclerView inside LinearLayout or something, it scroll in various speed depending on gesture. The scroll listen to gesture and if I slide up only a bit, then it scroll a little bit while if I slide up really fast, then it scroll really fast. Now my problem is that RecyclerView inside NestedScrollView certainly scroll but fast scroll does not work. However I slide up fast or slow, RecyclerView or NestedScrollView only scroll a little bit.

如何使滚动视图内的NestedScrollViewRecyclerView以不同的速度滚动?

How can I make my NestedScrollView or RecyclerView inside that scroll view scroll in various speed?

推荐答案

尝试

recyclerView.setNestedScrollingEnabled(false);

这篇关于嵌套Scrollview滚动中的Recyclerview滚动,但不能像普通的Recyclerview或Nested Scrollview一样快速滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆