I have created a image slideshow using ViewFlipper. I have used imageFrame.setOnTouchListener(gestureListener); to listen user touch events like single tap,long tap
But now i want to zoom in/out on current image in slideshow (ViewFlipper) ,on doubletap by user.I have searched internet for this but wasn't able to find a solution.Please help me out.
There are a number of ways you can do this, but a simple way is to use the platform's ZoomControls widget, which is a simple widget consisting of a +/- button. You can attach
onZoomInClickListener
and anonZoomOutClickListener
to handle touches to the ZoomControls widget.In your handler, you can scale your image. Here's some sample code that uses a ScaleAnimation to do the zooming: