3

I am trying to implement pinch zoom and double tap feature on NetworkImageView inside a ViewPager. I referred to this tutorial: http://www.androidhive.info/2013/09/android-fullscreen-image-slider-with-swipe-and-pinch-zoom-gestures/

Images are loading fine using Volley and NetworkImageView. Even the pinch zoom is working but its not smooth at all. After zooming, the current image is zooming under the next and previous image in ViewPager. Also, the previous image zoom is not resetting.

I tried using Mike Ortiz's new version of TouchImageView code but images are not loading for NetworkImageView.

So,

  • Do I need to use new version of TouchImageView for better pinch zoom experience and enabling double tap?
  • If yes, will it work for NetworkImageView?
  • How to fix the issue of zooming under next and previous image?
  • How to reset the zoom of previous image?

Thanks.

Rishabh Srivastava
  • 3,683
  • 2
  • 30
  • 58
johnk1
  • 247
  • 8
  • 19

3 Answers3

2

Use this NetworkImageView instead of the NetworkImageView from volley: https://github.com/geeknizer/Volley-Flickr-Gson-List-GridView-example/blob/master/src/com/androidng/flickr/view/NetworkImageView.java

It is the same but with the corrections to work!

Guilherme Simão Couto
  • 1,016
  • 2
  • 12
  • 24
1

It is doable!
I have used the codebase from android imageview zoom. All you need to do is in ImageViewTouchBase.java you need to replace class extension by NetworkImageView. Works like charm.
You might want to alter the onDoubleTap function to have just one level zoom in/out feature.

user1036908
  • 831
  • 1
  • 12
  • 16
-3

Fixed it by using ImageView along with new version of TouchImageView.

johnk1
  • 247
  • 8
  • 19