PhotoView in ViewPager "jumping" issue
- 主要语言
- Java
- 星标
- 18.8k
- 派生
- 3.9k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello, I have noticed an issue when using PhotoView with ViewPager. When zoomed in and you try to navigate to the next page, the PhotoView is first scrolled to the edge as expected, but after that the next ViewPager page just sort of jumps into view. I also recorded a gif to demonstrate this issue: https://media.giphy.com/media/xyH3Dqr5mZroI/giphy.gif
I realise, that this is also ViewPager's (VP) fault because it intercepts the DOWN event which is actually meant for the PhotoView (PV) and when PV starts passing MOVE events to the VP then VP just thinks that the person has dragged the screen really fast.
Do you think this is something PV could address? I would suggest starting to pass MOVE events to the parent only if PV is already scrolled to the edge when the DOWN event occurs - then the DOWN event that VP intercepts would actually be with the correct X and Y.
贡献指南
调研方向
首先使用链接的 GIF 作为行为参考,在 Android ViewPager 中复现报告的 PhotoView 交互。阅读 PhotoView 和 ViewPager 的触摸事件处理路径,然后验证从缩放后的边缘进行导航不再导致下一页跳动。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, java
- 领域
- mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100