You can do that by :
- Creating an ImageView widget and handling onTouch events for panning
- Creating your zoom widget ( linear layout with two buttons), handling the onclick event for the zoomin and zoomout buttons.
- use the following function for changing what is displayed in the image :
Matrix.setRectToRect(sourceRect, destinationRect, Matrix.ScaleToFit.FILL); where sourcerect is a RectF selecting what you want to display on your image and destinationRect is the imageView widget size.
I use it in a project I'm currently writting and it works fine
Last edited by Hebus
on Thu Apr 16, 2009 3:26 pm, edited 1 time in total.