Search code examples
javascriptjqueryswipegestures

Is there a javascript gesture library that works with the Samsung galaxy tab?


i have been experimenting with javascript gesture libraries. They all work great with the iPad mini, however, when I try them on my Samsung Galaxy Tab (GT-P7510, Android 4.04), the results are at best intermittent.

The best results I get are in portrait mode. In landscape mode, virtually nothing works.

I have tried, amongst others, the following libraries, all of which I found from this post: http://www.queness.com/post/11755/11-multi-touch-and-touch-events-javascript-libraries

  • hammer.js
  • quo.js
  • touchy
  • doubletap
  • jgestures
  • touchswipe

Touchswipe worked best, but all the others just didn't really play ball.

The Hammer page has a demo, which works fine on the ipad but not the android:

http://eightmedia.github.com/hammer.js/

So, does anybody know of any way I can get swipe gestures to play nice on my galaxy?

I have viewed the quirksmode page that a previous stackoverflow question pointed to, but that was out of date and no longer maintained, from what I could see. Also, it didn't actually mention any libraries.


Solution

  • I had good luck with this one:

    https://github.com/HotStudio/touchy

    It has long-press, pinch, rotate, and swipe gestures, and the code is fairly easy to customize.

    Note that the combinations of gestures need to be handled-- for example, a swipe will almost always trigger a long touch as well, so you have to set flags or otherwise handle that.