ListActivity 中的 Android TouchEvent..!

发布于 2024-09-01 18:54:58 字数 195 浏览 4 评论 0原文

我创建了一个列表活动,我在其中放置了一些项目并且正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑,眼淚并存 2024-09-08 18:54:58

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文