android multitouch image zooming?

后端 未结 5 2003
栀梦
栀梦 2020-12-10 12:56

I\'m displaying an image on full screen now i want to zoom it in or out. Any one guide on how I can implement multi touch image zooming?

I am using the 2.1 sdk versi

相关标签:
5条回答
  • 2020-12-10 13:08

    I have a working implementation for 2.1+

    WebView solution caused problems for me on 4.0.x (lot's of weird white spaces appearing)

    https://github.com/jasonpolites/gesture-imageview

    Might be useful for someone...

    0 讨论(0)
  • 2020-12-10 13:11

    Have you tried using the intent "android.intent.action.VIEW" and letting the phone's built in image viewer display your image? It will probably use multi-touch controls if the phone supports it.

    http://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW

    0 讨论(0)
  • 2020-12-10 13:16

    Regarding gesture-imageview lib: https://github.com/jasonpolites/gesture-imageview

    it's in fact useful, but unfortunatelly it has some bugs, like: https://github.com/jasonpolites/gesture-imageview/issues/37

    Anyway, good lib to try. It solved my usecase.

    0 讨论(0)
  • 2020-12-10 13:22

    There is the possibility to use a webview to display a local file. The Webview has integrated multitouch zooming. Have a look at my question regarding this topic.

    0 讨论(0)
  • 2020-12-10 13:24

    A recent post on the Android Developers Blog includes an example that does exactly what you ask. Unfortunately, it relies upon ScaleGestureDetecter which makes its first appearance in Froyo.

    0 讨论(0)
提交回复
热议问题