Closed dimbslmh closed 9 years ago
Is this really fixed?
@AndroidDeveloperLB Yes, please try it out first if you don't wan't to accept the PR right away.
Note: You need to update your SDK/BuildTool versions to 23/23.0.1
Yes, for me it is fixed, good job @dimbslmh!! I didn't know about those 2 compute functions of the RecyclerView. Maybe the code could be improved a little bit in this point:
@Override
public void onScrolled(final RecyclerView recyclerView, final int dx, final int dy) {
if (handle.isSelected()) return;
float proportion = (float) recyclerView.computeVerticalScrollOffset()
/ (float) (recyclerView.computeVerticalScrollRange() - height);
setBubbleAndHandlePosition(height * proportion);
}
Also, all logs should be commented!
Thank you guys. However, there is still an issue with this fix (maybe it was before too):
The bug: it shows the scrollber very far from its previous position.
Also, about the removal of variables, this does not improve performance, as the runtime will use the temporary variables whether you declare them or not (they are stored in registers). It's better to separate variables in order to make them more readable.
Fix for issue #3 Scrolling RecyclerView, handle is not smooth