When onPageScrolled is called, if we detect that the user is dragging the ViewPager (SCROLL_STATE_DRAGGING) and have reached the edge (positionOffset == 0f), we change the current item when the user stops dragging (when onPageScrollStateChanged is called).
The ViewPager doesn't scrolls back immediately to the first item anymore.
Fix issue #38
When
onPageScrolled
is called, if we detect that the user is dragging theViewPager
(SCROLL_STATE_DRAGGING
) and have reached the edge (positionOffset == 0f
), we change the current item when the user stops dragging (whenonPageScrollStateChanged
is called).The
ViewPager
doesn't scrolls back immediately to the first item anymore.