Fixes for fast-scrollbar when using work profile tabs in all apps.
- do not hide scrollbar between switching tabs
- full scrollbar height
- show predictionrow only when fully scrolled to top
Bug: 70037972
Bug: 68713881
Change-Id: Icaa434ce2726b75d22ec4ac3287ab2b0e18ce42b
diff --git a/src/com/android/launcher3/BaseRecyclerView.java b/src/com/android/launcher3/BaseRecyclerView.java
index b315980..bce0e2e 100644
--- a/src/com/android/launcher3/BaseRecyclerView.java
+++ b/src/com/android/launcher3/BaseRecyclerView.java
@@ -68,6 +68,7 @@
ViewGroup parent = (ViewGroup) getParent().getParent();
mScrollbar = parent.findViewById(R.id.fast_scroller);
mScrollbar.setRecyclerView(this, parent.findViewById(R.id.fast_scroller_popup));
+ onUpdateScrollbar(0);
}
/**
@@ -112,7 +113,7 @@
* Returns the height of the fast scroll bar
*/
public int getScrollbarTrackHeight() {
- return getHeight() - getScrollBarTop() - getPaddingBottom();
+ return mScrollbar.getHeight() - getScrollBarTop() - getPaddingBottom();
}
/**
@@ -130,12 +131,6 @@
return availableScrollBarHeight;
}
- @Override
- protected void dispatchDraw(Canvas canvas) {
- onUpdateScrollbar(0);
- super.dispatchDraw(canvas);
- }
-
/**
* Updates the scrollbar thumb offset to match the visible scroll of the recycler view. It does
* this by mapping the available scroll area of the recycler view to the available space for the