title: ImageView Pinch-zoom Scale Limits and pan bounds
body: <p>I wanted to create a gallery with images.
  The images within the gallery should be zoomable and pannable. I could able to pinch-zoom an image but could not able to set zoom limits and prevent the image from being panned off the screen.
  I used the following <a href="http://code.google.com/p/4chan-image-browser/source/browse/src/se/robertfoss/MultiTouch/TouchImageView.java?spec=svnd3e623ddeb6f9e97d9eba2c7aaa7c4567a3822b5&amp;r=d3e623ddeb6f9e97d9eba2c7aaa7c4567a3822b5" rel="nofollow noreferrer">code</a> to zoom an image:</p>
  
  <p>First approach : 
  I used TouchImageView to supply images to the gallery, this allows me to pinch-zoom but I can't scroll the gallery, i.e. I can't differentiate between 'single tab event' and 'tab to scroll event'.</p>
  
  <p>Second approach :
  Used ImageView to supply images to gallery, and if user clicks on any of the gallery items display the selected image in TouchImageView, where the user can Pinch-Zoom an image. But this also prevents me from scrolling the gallery view. And also how to set zoom limits and pan bounds on the selected image?</p>