Android - combine swipe and pinch-to-zoom

后端 未结 1 1076
失恋的感觉
失恋的感觉 2020-12-16 05:55
  • We have the Gallery, which support swiping.
  • We also have 3rd-party components that support pinch-to-zoom on ImageView, such as ImageViewTouch in ImageViewZoom
相关标签:
1条回答
  • 2020-12-16 06:51

    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.

    0 讨论(0)
提交回复
热议问题