views:

1186

answers:

2

Can anyone help on how to use the matrix scaletype to zoom an imageview and also how to use the translate method so that it can be focused at the center? I have tried using webview to be able to use the zooming and scrolling functionalities i needed but it is not nice to look at.

A: 

Look at the ImageView implementation. It has Zoom-in and Zoom-out functionality.

Vinay
Sorry I can't find any mention of zoom in the imageview. Maybe I'm missing something.
Janusz
I deeply apologize for marking Vinay's answer as correct. I was supposed to mark a different question. Anyway, so far I haven't implemented the zooming functionality. But you can look at the "ViewImage.java" code under the camera package of the android OS found in the http://android.git.kernel.org/. You can found there how it was implemented by the developers of android. I just don't have much time to study their code so in the end, I used WebView.
M.A. Cape
+1  A: 

I found a tutorial divided into 4 parts from a blog on how to zoom and pan an image and it is quite nice. It has sample codes that can be downloaded and some explanations. Right now it is on its 3rd part. It also have other tutorials.

M.A. Cape