views:

785

answers:

4

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

+1  A: 

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.

Tim Kryger
b ut it is for 2.2 sdk version
UMMA
is there any way to implement it through 2.1?
UMMA
+1  A: 

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.

Janusz
facebook app for 2.1 and 1.5 using zooming buttons. i want to use that..
UMMA
means zoomcontrols not the webview.
UMMA
sorry I can't understand your comments. If you want multitouch zooming and zoom controls for an Image you can show the image in an webview this will add multitouch zooming for the image and also show the zoom controls after the first touch event on the view
Janusz
A web view is the best way to do it.
gregm
A: 

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

James