简体   繁体   English

Android / webOS设备是否支持多点触控Javascript事件?

[英]Do Android/webOS devices support multi-touch Javascript events?

On iPhone, iPod touch and (presumably) iPad, Apple has multi-touch event handling available via JavaScript in Mobile Safari. 在iPhone,iPod touch和(可能是)iPad上,Apple通过Mobile Safari中的JavaScript提供多点触控事件处理功能 I know the Nexus One recently added multi-touch support via an update, and I believe webOS is also multi-touch enabled. 我知道Nexus One最近通过更新添加了多点触控支持,我相信webOS也支持多点触控。 Do Android 2.1 and/or webOS have access to multi-touch in the browser, or is this currently exclusive to Apple devices? Android 2.1和/或webOS是否可以在浏览器中访问多点触控,或者这是Apple目前独有的设备?

The best master tracking for touch events (other than multi-touch! - answered above) appears to be: 触摸事件的最佳主跟踪(除了多点触控! - 上面回答)似乎是:

http://quirksmode.org/mobile/tableTouch.html http://quirksmode.org/mobile/tableTouch.html

Right now, Android 2.1 gets you pinch/zoom, but that's it. 现在,Android 2.1可以让你捏/缩放,但就是这样。 There's no fine-grained multi-touch tracking, like you get on iPhone. 没有细粒度的多点触控跟踪,就像你上iPhone一样。

UPDATE: MAY 2011 - Android Honeycomb 3.0 and 3.1 browsers now have proper multitouch 更新:2011年5月 - Android Honeycomb 3.0和3.1浏览器现在有适当的多点触控

Please star this bug on the Android bug list: 在Android错误列表中标记此错误:

http://code.google.com/p/android/issues/detail?id=11909 http://code.google.com/p/android/issues/detail?id=11909

Let's see if we can raise awareness of this issue. 让我们看看我们是否可以提高对这个问题的认识。

On Palm webOS, you can get multiple touch events. 在Palm webOS上,您可以获得多个触摸事件。 You can receive up to five touch points at one time. 您一次最多可以接收五个接触点。

If you're doing native development using the PDK, handling multiple touches is described at http://developer.palm.com/index.php?option=com_content&view=article&id=1980&Itemid=337 . 如果您使用PDK进行本机开发,则在http://developer.palm.com/index.php?option=com_content&view=article&id=1980&Itemid=337中描述了处理多个触摸。 Each finger is tracked as a separate mouse in the SDL events. 在SDL事件中将每个手指作为单独的鼠标进行跟踪。

For Javascript developers using the standard SDK, there events that are sent to indicate that two fingers are in use. 对于使用标准SDK的Javascript开发人员,会发送一些事件来指示两个手指正在使用中。 "gesturestart" fires when the user puts 2 fingers on the screen, usually to pinch or rotate, "gesturechange" fires when 1 or both fingers move on the screen, and "gestureend" fires when the fingers are lifted from the screen. 当用户将2个手指放在屏幕上时,“gesturestart”会触发,通常是捏或旋转,当一个或两个手指在屏幕上移动时,“gesturechange”会触发,当手指从屏幕上抬起时,“gestureend”会触发。 These aren't well documented on the Palm developer site, but they're used in the mojomatters sample code. 这些在Palm开发人员站点上没有很好地记录,但是它们在mojomatters示例代码中使用。

Edit: looking at your question again, there is no "touch" event support in the browser on WebOS for applications delivered through web sites. 编辑:再次查看您的问题,WebOS上的浏览器中没有“触摸”事件支持,用于通过网站提供的应用程序。

It depends on the browser. 这取决于浏览器。 The browser on the HTC Hero, which currently runs Android 1.5 and HTC's customised TouchFlo interface, has always had multitouch. 目前运行Android 1.5和HTC自定义TouchFlo界面的HTC Hero上的浏览器一直都有多点触控功能。 The 'Dolphin' browser has also had multitouch since before the Android 2 update. 自从Android 2更新之前,'Dolphin'浏览器也进行了多点触控。 That said, I've never tried using the multitouch for anything but 'pinch zoom' so it might not work with a specific Javascript or something like that. 也就是说,我从来没有尝试过将多点触控用于“缩放缩放”,因此它可能不适用于特定的Javascript或类似的东西。

It depends on the device. 这取决于设备。 But I think the current Android 2.x device got all multitouch. 但我认为目前的Android 2.x设备都有多点触控功能。

On the Samsung Galaxy Tab I have tried the Android 2.2 Browser, Dolphin HD 4 and Opera Mini 5. The closest implementation to what I'm looking for is http://anders.com/cms/352/OpenLayers/iPhone/Android/Touch.Gestures (demo ending in '/touchmaps' on that page) which works with the Android 2.2 browser. 在三星Galaxy Tab上,我尝试过Android 2.2浏览器,Dolphin HD 4和Opera Mini 5.最接近我正在寻找的是http://anders.com/cms/352/OpenLayers/iPhone/Android/ Touch.Gestures (演示以该页面上的'/ touchmaps'结尾),适用于Android 2.2浏览器。 This does touch pan only with the Android device but no pinch zoom gesture capture in Javascript which is what I really need. 这只能用Android设备触摸平移,但在Javascript中没有捏缩放手势捕获,这是我真正需要的。

Firefox 4 has the best working and best documented javascript multi-touch API. Firefox 4拥有最好的工作和最好的javascript多点触控API。 This is currently implemented in Firefox 4 beta 3 (unfortunately only on Windows 7). 目前这在Firefox 4 beta 3中实现(不幸的是仅在Windows 7上实现)。 I have FF4 beta 2 running on the device but it doesn't have the multi-touch support yet. 我在设备上运行了FF4 beta 2,但它还没有支持多点触控功能。

I am hoping FF4 b3 for the Android will do what I want, and that the other browser implementation will follow suit. 我希望Android的FF4 b3可以做我想要的,其他浏览器实现也会效仿。 Until then it's just a wait and see. 在那之前,它只是一个观望。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM