1

There is "double tap to zoom" / "pinch to zoom" ImageView (ImageViewTouch) from here.
And there is "Horizontal Pager" by Yoni Samlan here.

Please help me how to embed pinch-zoom imageview (ImageViewTouch) inside "HorizontalPager". I am facing difficulty in this as both classes uses onTouchEvent().

Note: Multiple ImageViewTouch objects inside HorizontalPager object (which is expected to allow pinch-zooming and sliding to another image (ImageViewTouch)

1 Answer 1

0

It's done, this way... HorizontalPager will trap the onTouchEvent() first. It will pass the event to child view which is ImageViewTouch. If it handled the event (determined by boolean value returned by onTouchEvent()), It will also simply return from onTouchEvent() as handled. If child view (ImageViewTouch) did not handle event, it will handle this event by taking necessary action related to the event and return as handled.

Of course I have done some modifications to HorizontalPager and ImageViewTouch classes to co-ordinate this.

1
  • Did you get the code (ImageViewTouch & Horizontal Pager) from the links I've provide in question? If Yes, Kindly spare me some time, I'll definitely provide some excerpts from my code.
    – Mazhar
    Feb 13, 2012 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.