Skip to content

Factorize positon computation + Removed ViewTreeObserver - #15

Merged
AndroidDeveloperLB merged 1 commit into
AndroidDeveloperLB:masterfrom
darzul:master
Jun 3, 2016
Merged

Factorize positon computation + Removed ViewTreeObserver#15
AndroidDeveloperLB merged 1 commit into
AndroidDeveloperLB:masterfrom
darzul:master

Conversation

@darzul

@darzul darzul commented May 31, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

darzul commented Jun 2, 2016

Copy link
Copy Markdown
Contributor Author

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

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

Copy link
Copy Markdown
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