Merge "Don't bind scrollbar if current recycler view isn't changed." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
780ce64f68
@@ -295,8 +295,11 @@ public class WidgetsFullSheet extends BaseWidgetSheet
|
||||
}
|
||||
|
||||
private void attachScrollbarToRecyclerView(WidgetsRecyclerView recyclerView) {
|
||||
recyclerView.bindFastScrollbar(mFastScroller, WIDGET_SCROLLER);
|
||||
if (mCurrentWidgetsRecyclerView != recyclerView) {
|
||||
// Bind scrollbar if changing the recycler view. If widgets list updates, since
|
||||
// scrollbar is already attached to the recycler view, it will automatically adjust as
|
||||
// needed with recycler view's onScrollListener.
|
||||
recyclerView.bindFastScrollbar(mFastScroller, WIDGET_SCROLLER);
|
||||
// Only reset the scroll position & expanded apps if the currently shown recycler view
|
||||
// has been updated.
|
||||
reset();
|
||||
|
||||
Reference in New Issue
Block a user