如何在我的 Android 应用程序上支持多点触控?
我的 Android 应用程序遇到一些困难。我有一些计时器(4 或 5 个),我需要能够触摸多个计时器并记录时间。 例如。: 当我触摸两个计时器时,两个计时器应该显示相同的时间。
我尝试将计时器放在列表视图上,也将其作为表格布局中的表格行。在这两种情况下,如果触摸计时器一次一个,我就能够记录时间,但当我同时触摸两个计时器时,只有其中一个记录事件。
我不知道是否有必要,但我的清单文件中有这个:
<uses-feature
android:name="android.hardware.touchscreen.multitouch.jazzhand"
android:required="false"
/>
有人知道如何修复它吗?我是否必须设置一些配置以允许我的应用程序进行多点触控? (我正在开发 android 3.1,如果有一个仅适用于 3.x 的解决方案,我可以接受)
非常感谢!
I'm having some difficulties on my android application. I have some chronometers (4 or 5) and I need to be able to touch more than one of then and record the time.
eg.:
When i touch two of the chronometers both of then should display the same time.
I tried putting the chronometers on a listview, and also as table rows in a tablelayout. On both situations I'm able to record times if a touch chronometers one at a time but when i touch two at the same time only one of then recordes the event.
I don't know if it's necessary but i have this on my manifest file:
<uses-feature
android:name="android.hardware.touchscreen.multitouch.jazzhand"
android:required="false"
/>
Any one knows how to fix it? Do I have to set some configuration allowing multitouch for my aplication?
(I'm working on android 3.1, if there's a solution that works only on 3.x i'm ok with that)
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也是多点触控的新手。我直接查看了 krio 提供的链接,我还发现此链接有助于理解它:
http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html
I am new to multi-touch as well. I was direct to check out the link krio provided and I also found this link helpful in understanding it:
http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html