快速单击时 Listview 中的 OnClickListener 行为奇怪
我的帖子提到了这个问题:OnClickListener in Listview populated with a CursorAdapter 。
当我快速且长时间地单击 ListView 中的同一个按钮时,过了一会儿,我的应用程序的行为就好像我单击了另一行... 这就像按钮在它们被激活后被激活一样父母被回收(请注意,当我单击按钮时,列表的内容会刷新)。
还有一种奇怪的“镜子效应”......。假设 Listview 有 12 个项目,项目 3 到 11 显示在屏幕上。如果我(快速)单击位置 X 的按钮,过了一会儿,应用程序的行为就像我单击位于 Y 的按钮一样:
- X:03, Y:11
- X:04, Y:10
- X:05, Y :09
- X:06, Y:08
- X:11, Y:03
- X:10, Y:04
- X:09, Y:05
- X:08, Y:06
有什么解释或建议吗?
My post refers to this question: OnClickListener in Listview populated with a CursorAdapter.
When I click fast and a lot of time on the same button in my ListView, after a moment my app behaves as if I clicked on another row... It is like if the buttons were activated AFTER their parents were recycled (note that, when I click on the buttons, the content of my list is refreshed).
There is a weird 'mirror effect' too.... Let's say the Listview has 12 items and the items 3 to 11 are shown on the screen. if I click (fast) on the button at positon X, after a moment the application behaves as if I clicked on the button positionned at Y with:
- X:03, Y:11
- X:04, Y:10
- X:05, Y:09
- X:06, Y:08
- X:11, Y:03
- X:10, Y:04
- X:09, Y:05
- X:08, Y:06
Any explanation or suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论