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

Fix fast scroll up blank screen issue #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

insacc
Copy link

@insacc insacc commented Nov 3, 2017

The GreedoLayoutManager was not able to fill the screen with views on fast scroll, because the layout manager was assuming that each call to scrollVerticallyBy(), the mFirstVisibleRow value should increase/decrease at most by one, but if you scroll too fast and/or if you are processing some other tasks on the main thread then the calls to the scrollVerticallyBy() might delay and in that case the mFirstVisibleRow might be wrong and it could cause the layout manager to stop filling the screen with views (Because it checks the position of the first visible object on the mFirstVisibleRow and if that position is greater than the screen height than it stops filling the screen)

  • With this PR the GreedoLayoutManager checks the position of the first visible item and if it is greater than zero than it means that the mFirstVisibleRow should be updated and the GreedoLayoutManager loops through the rows to find the first visible row and updates the mFirstVisibleRow

@playscforever
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants