Closed qianyukun closed 8 years ago
Hey, just looked into that and didn't get onClick events. Could you please elaborate on the use-case and the actual problem? Thanks!!!
I have a listView to show message. The 'onClick' callbacks on list items are invoked while over-scrolling.
qianyukun thanks so much for this submission! I have indeed found the bug you've described when using ListView's setOnItemClickListener(). Fortunately, it can be easily fixed -- I'll get that done in my next release. In the meantime, here are two alternatives you can go by:
Thank you ! I have fixed the problem.
I have fixed and pushed the issue -- will be included in the next lib release. Thanks again!
Hi d4vidi, I know this issue has been closed a while ago but I still have the problem mentioned here while I implement it in a ListView, when I swipe the listview up so it bounces the list view item receives the click event. How could I avoid it? Im using the version 1.0.4. I would really appreciate some advice regarding this one, Thanks.
I have same problem as harolhiguera
Great, maybe that would help me get to the bottom of this! :-)
Are you assigning explicit listeners on each view or do you use ListView
's setOnItemClickListener()
?
I added the former technique to the demo project in this commit and it seems to be working well - wondering about the latter...
qianyukun 非常感谢您的提交!我确实发现了您在使用 ListView 的 setOnItemClickListener() 时所描述的错误。幸运的是,它可以轻松修复——我将在我的下一个版本中完成。 同时,您可以选择以下两种选择:
- 解决方法:使用 view.setOnClickListener() 分别实例化单击侦听器并将其注册到每个 ListView 项视图。使用它_代替_您当前拥有的全局列表项单击侦听器。
- 自己修复错误:fork 项目,编辑 OverScrollBounceEffectDecoratorBase.java,跳转到第 #250 行并将返回值更改为 'true'。这将导致 'touch-up' 事件被过度滚动而不是转移到 ListView 本身。 当然,这意味着您必须在本地编译项目(例如,在 build.gradle 中使用 'compile project(':overscroll')' - 如果您需要帮助,请告诉我)。
我已经修复并推送了这个问题——将包含在下一个 lib 版本中。再次感谢!
Hello, author, has listview been repaired? I use the package of 1.11 and will still call onclick event
Are you saying the 'onClick' callbacks on list items are invoked while over-scrolling?