Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Fixed blinking header on a quick swipe #272

Merged
merged 1 commit into from
Aug 20, 2016
Merged

Conversation

TigerHix
Copy link
Contributor

@TigerHix TigerHix commented Aug 3, 2016

On a quick swipe between the tabs, due to a weird behavior of Android - onPageSelected will sometimes be triggered before onPageScrolled - the expected behavior:

...
Android calls: onPageSelected(0)
Android calls: onPageSelected(0)
Android calls: onPageSelected(1)
Android calls: onPageSelected(1)
...

would become:

...
Android calls: onPageSelected(0)
Android calls: onPageSelected(0)
Android calls: onPageSelected(1)
Android calls: onPageSelected(0) // ???
Android calls: onPageSelected(1)
Android calls: onPageSelected(1)
Android calls: onPageSelected(1)
...

Hence the header image "blinks". Thanks to: https://stackoverflow.com/questions/13819865/how-to-know-viewpager-has-scrolled-half-the-screen-in-android/30662470#30662470, this problem is now resolved.

@florent37 florent37 merged commit 85a1248 into florent37:master Aug 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants