Now I would like to combine them both.
The problem is that the swipe events get consumed by the ImageViewTouch and missed by the Gallery.
How can consume events by both components?
That would solve my problem, because, eventually, after a few events, each component will know how to react accordingly. For example, if the first event is ACTION_DOWN, it can be part of a pinch-to-zoom or part of a swipe. Both components (Gallery and ImageViewTouch) should consume it in order to know what to do in following events.
I combined both components by changing some code in ImageViewZoom. The change was for the events to return a value if they were consumed by the ImageViewTouch. If so, than the event should not be passed to the gallery. If the event is not consumed by the ImageView, than the gallery should consume it (if it can).
There are still some small issues, but it's functional. Hopefully other people in the community can help.
Here's the fork on github: https://github.com/kilaka/ImageViewZoom
Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With