如何禁用回收观点滚动,这样它监听滚动型布局? [英] how to disable recycler view scrolling so that it listens to Scrollview layout?

查看:168
本文介绍了如何禁用回收观点滚动,这样它监听滚动型布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个滚动型内回收视图。我想禁用回收观点滚动,使其侦听到其父的布局,滚动型!

I have a recycler view inside a ScrollView. I want to disable the recycler view scroll so that it listens to its parent layout, A ScrollView!

推荐答案

从逻辑上讲,这不是一个好主意,把的ListView 滚动型。但是,如果你坚持那么:

Logically, it is not a good idea to put ListView inside a ScrollView. However, if you insist then:

  • You may either increase the ListView height based on the sum of its rows height as mentioned here.
  • Or let the recycling in place but intercept the touch on ListView to redirect scrolling to its parent ScrollView as mentioned here.

这篇关于如何禁用回收观点滚动,这样它监听滚动型布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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