开发者

Android: How to change ListView's scrolling trigger "sensibility"?

When vertically sliding finger开发者_如何学JAVA on a ListView, it starts to scroll after a small move.

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜