Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决原生ViewPager当页数为2时的滑动Bug #1

Closed
JocelynChung0114 opened this issue Oct 25, 2016 · 1 comment
Closed

解决原生ViewPager当页数为2时的滑动Bug #1

JocelynChung0114 opened this issue Oct 25, 2016 · 1 comment

Comments

@JocelynChung0114
Copy link

No work!!

@xingda920813
Copy link
Owner

现在的做法其实是比较 Tricky 的,页数正好为 2 时,会加倍为 4 页。

因为无限循环的存在,左右滑动时,看起来也是 2 页在交替切换。只是下方的指示器会变为 4 个。

若不加倍,页数为 2 时会有更严重的问题,即文档中说的“原生ViewPager当页数为2时的滑动Bug”。这个 Bug 的解决方式就是加倍了页数。

考虑到轮播图只有 2 页的情况比较罕见,所以 won't fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants