Android的:如何改变ListView的滚动触发"灵敏度"? [英] Android: How to change ListView's scrolling trigger "sensibility"?

查看:207
本文介绍了Android的:如何改变ListView的滚动触发"灵敏度"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在上一个ListView垂直滑动手指,在启动后一小动滚动。

When vertically sliding finger on a ListView, it starts to scroll after a small move.

有什么办法来增加这个缺口,因此这将是一个需要更大的举动引发ListView的滚动?

Is there any way to increase this "gap", so it would be necessary a "larger" move to trigger the ListView's scrolling?

推荐答案

有什么明确的如 setSensitivity ,但您可能能够设置一个标志来检测的ListView ISN时T滚动。所以然后onScroll如果该标志被设置为true时,(即它已经开始从固定位置滚动),将该标志设置为假,并在滚动的方法的重写只允许它滚动一次量超过10dip为例如...

There's nothing explicit like setSensitivity but you might be able to set a flag to detect when the ListView isn't scrolling. So then onScroll if the flag is set to true, (meaning that it has started scrolling from a fixed position), set the flag to false, and in the override of the scroll method only allow it to scroll once the amount is over 10dip for example...

然后,当它再次停止滚动,设置标志回真。

Then when it stops scrolling again, set the flag back to true.

这只是一个抽象的概念,但它听起来像它可以工作。

It's just an abstract idea but it sounds like it could work.

这篇关于Android的:如何改变ListView的滚动触发"灵敏度"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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