android multitouch image zooming?

拈花ヽ惹草 提交于 2019-11-28 10:54:06
Janusz

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.

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...

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.

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!