overscroll-decor icon indicating copy to clipboard operation
overscroll-decor copied to clipboard

ViewPager with pageMargin over-scroll not work when scrolling forward and backward

Open tamhuynhit opened this issue 5 years ago • 0 comments

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

tamhuynhit avatar Apr 12 '19 15:04 tamhuynhit