Android:带有多个图像、缩放和切换的图库
我的任务是更改我的应用程序。目前,该应用程序在图库中显示 4 张图像(下载后)。图库允许通过滑动轻松切换图像。
现在,我应该实现一个 imagezoom,它本身并不太难,我仅在 Stackoverflow 上就找到了很多示例。但有一点让我觉得奇怪:我或我使用的小部件如何将放大图像的移动与切换到下一个图像的动作分开?
我想必须可以将事件分派到右侧处理程序:当图像完全缩小时,向左滑动应切换到下一个图像,而即使放大一点也会将图像移动到左侧。
有人能指出我如何实现这一目标吗?我应该在哪里自己处理触摸事件,以及在上面描述的两种情况下我应该在哪里传播它们?
非常感谢。
I'm tasked to alter an application of mine. Currently, the app displays 4 images (after downloading them) in a gallery. The gallery allows for easy image switching via swipe.
Now, I should implement an imagezoom, which in itself isn't too hard, I've found plenty of examples on Stackoverflow alone. But one thing strikes me as odd: How do I or the widgets I use separate a moving of the zoomed in image from a motion to switch to the next image?
I imagine that it must be possible to dispatch the events to the right handler: When the image is zoomed out full, the left swipe should switch to the next image, while zoomed in even a little would move the image to the left.
Can anybody point me in the direction of how to accomplish this? Where do I hop on to handle the touch events myself, and where do I propagate them in the two cases I described above?
Thanks a bunch.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论