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 with pageMargin over-scroll not work when scrolling forward and backward #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tamhuynhit
Copy link

@tamhuynhit tamhuynhit commented Apr 12, 2019

I face the same issue as the one mentioned in #35 and #23

The Over scroll effect does not work properly when I use a ViewPager with setPageMargin to a non-zero value. I found out the problem comes from the ViewPager because it doesn't give us the correct positionOffset in onPageScrolled. The offset is very small nearly to 0 but not 0, the same for 1.

So a way to fix this is to compare the float mLastPagerScrollOffset approximately and it works

Please test this and let me know if there is any issue

Add Page margin option in ViewPager demo
@tamhuynhit tamhuynhit force-pushed the fix-overscroll-disable-in-padding-viewpager branch from 8844234 to 80ad0fb Compare April 14, 2019 14:02
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

Successfully merging this pull request may close these issues.

1 participant