6

Does anybody know whether there's a 3rd paty (or built in) library that helps in detecting and handling a pinch zoom event?

Basically what I'm looking for is some class that takes coordinates from a touch event and returns whether its a pinch zoom event or not...

budsiya
  • 540
  • 3
  • 14
  • 22
  • 1
    Not a 3rd party lib but... have you looked at [this article](http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-6-implementing-the-pinch-zoom-gesture/1847)? – uTubeFan Apr 28 '11 at 21:16
  • @uTubeFan That's a nice article. The whole series. – Aleadam Apr 28 '11 at 21:23

4 Answers4

4

Take a look at this one: http://code.google.com/p/android-pinch/

Not a lot of activity there, but you can take a look a the code.

this question should help you also: Is there a built in API for handling pinch-zoom functionality in Android

Community
  • 1
  • 1
Aleadam
  • 40,203
  • 9
  • 86
  • 108
1

I guess you should have a look at this Library on Github https://github.com/sephiroth74/ImageViewZoom

the100rabh
  • 4,077
  • 4
  • 32
  • 40
1

The Android Developers Blog post at http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html explains general handling of multitouch events and also gives examples of ScaleGestureDetector, a component of the Android framework that detects pinch zoom gestures and calls back into your code to process it.

adamp
  • 28,862
  • 9
  • 81
  • 69
  • This looks great. I am gonna try that tonight. The only drawback is it is only supported by API Level 8+ which is a very limited market. – budsiya May 02 '11 at 21:09
  • Not as limited as you might think: http://d.android.com/resources/dashboard/platform-versions.html But if compatibility with older devices is critical, ScaleGestureDetector itself is open source like the rest of the core platform. You can get it from AOSP here: http://goo.gl/sOhqt change the package name, and bundle it in your app. – adamp May 02 '11 at 21:47
  • Thanks a lot... I will try that and let you know the results. – budsiya May 03 '11 at 15:26
0

Is this help? It may be a little more simple than you thought: Implementing the Pinch Zoom Gesture

Shinigamae
  • 854
  • 3
  • 18
  • 35