同步两个图库
我有两个画廊的活动。我想同步两个画廊,因此当我移动一个画廊时,我应该移动另一个画廊以匹配相同的项目。
我不知道如何实现这一点。我虽然可以通过同步 onScroll 事件来完成,但我对此进行了很好的尝试,但它不起作用。我认为这是因为我对滚动事件不感兴趣,也许对投掷事件不感兴趣?
无论如何,我不知道哪个是观察的正确事件以及如何实现它。你能帮我一下吗?
I have an activity with two galleries. I want to synchronise both galleries so when I'm moving in one gallery, I should move the other gallery to match the same item.
I don't know how to accomplish this. I though it could be done by synchronising the onScroll event, I followed a good attempt on this, but it doesn't work. I assume it's because I'm not interested on the scroll event, maybe on the fling event?
Anyway, I don't know which is the proper event to observe and how to implement this. Can you help me out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是否可以只使用一个
Gallery
并让它显示的View
显示您的两个项目?Is it possible to just use one
Gallery
and have theView
that it displays display both your items?