ListActivity 中的 Android TouchEvent..!
我创建了一个列表活动,我在其中放置了一些项目并且正在使用 OnListItemClick 通过方向键和 KeyLeft 和 KeyRight 按钮获得所需的操作, 在模拟器中 TouchEvent 不起作用,我想知道它是否在真实手机中起作用??? 我怎样才能启用 TOuchEvent,任何人都可以帮我解决这个问题。
感谢您的帮助
提前致谢
I have created a list activity where i have placed some items and i am using
OnListItemClick to get the desired actions through D-pad and KeyLeft and KeyRight Buttons,
In Emulator TouchEvent is not working , I want to know whether it works in real Handsets???
How can i enable the TOuchEvent also, Can anyone please help me out in this.
Appreciate your Help
Thanks in Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
onListItemClicked 也应该适用于触摸事件。对于模拟器来说,行为可能有些不同,因为我编写了一个带有 ListActivity 的应用程序,当我在手机上运行它时,它会注册触摸事件。尝试一下,在模拟器中运行时,按住鼠标按钮再松开。我之前在模拟器中遇到过问题,如果按住按钮的时间不够长,按钮就不会触发。
onListItemClicked should work for touch events, too. Perhaps the behavior is somewhat different for emulators because I wrote an app with a ListActivity and it registers touch events when I run it on my phone. Try this, when running in the emulator, hold down the mouse button a little longer before letting go. I've had problems before in the emulator where buttons don't trigger if you don't hold them down long enough.