Skip to content

Conversation

@darzul
Copy link
Contributor

@darzul darzul commented May 31, 2016

There were two places in the code to compute the scrolling position. As it is the same code I factorized it in a method -> setBubbleAndHandlePosition()

In this PR the ViewTreeObserver on RecyclerView is replaced by a call to setBubbleAndHandlePosition() in onSizeChanged(). When the RecyclerViewFastScroller size changes we have to compute the new handle position.

What do you think about these changes ?

@AndroidDeveloperLB
Copy link
Owner

Nice. So it's only refactoring, right?
I'd name the new function differently thought. Maybe "updateBubbleAndHandlePosition".
When having a "set", this prefix is usually for setters.

@darzul
Copy link
Contributor Author

darzul commented Jun 2, 2016

Yes it is.
You're right, it's fixed :)

@AndroidDeveloperLB AndroidDeveloperLB merged commit 228eef1 into AndroidDeveloperLB:master Jun 3, 2016
@AndroidDeveloperLB
Copy link
Owner

ok then. thanks for helping.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants