Fix fast scroll up blank screen issue #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
GreedoLayoutManager
was not able to fill the screen with views on fast scroll, because the layout manager was assuming that each call toscrollVerticallyBy()
, themFirstVisibleRow
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 thescrollVerticallyBy()
might delay and in that case themFirstVisibleRow
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 themFirstVisibleRow
and if that position is greater than the screen height than it stops filling the screen)GreedoLayoutManager
checks the position of the first visible item and if it is greater than zero than it means that themFirstVisibleRow
should be updated and theGreedoLayoutManager
loops through the rows to find the first visible row and updates themFirstVisibleRow