You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
onPageScrolled returns zeros when scrolling between first and last item #4
LoopViewPager.onPageScrolled(...) has some logic whereby if the user scrolls left from the first item (i.e. looping across the first-last item boundary), then onPageScrolled returns zeros.
In my case I am scaling items depending on scroll position, but the problem would occur when anyone wants to use the onPageScrolled values. Basically whatever code logic the developer implements in his own onPageScrolled, this logic will fail when scroll transitions between first and last item in the list.
I have fixed this by having LoopViewPager.onPageScrolled always calling
I see your point, and it's completely valid - I added the "if" as I was using with circle pager indicator, and without the zeros last circle was going outside.
Probably it would be reasonable to allow user to set a flag if he wants to receive actual values between first and last element.
I will have a second look at this in spare time (which I don't usually have ;) )
Activity
imbryk commentedon Apr 8, 2014
I see your point, and it's completely valid - I added the "if" as I was using with circle pager indicator, and without the zeros last circle was going outside.
Probably it would be reasonable to allow user to set a flag if he wants to receive actual values between first and last element.
I will have a second look at this in spare time (which I don't usually have ;) )