Ensuring that fast scrolling to predictions scrolls list to the top
- Fixes a long standing issue with fast-scrolling to the predicted apps
not quite scrolling the list to the top of the screen.
- Fixes an issue where we don’t scroll exactly to the fast scroll
position due to rounding
- Also fixes a small issue where the thumb would not update when the
fast scroll popup was no longer showing, even while dragging.
Bug: 30023608
Change-Id: I6b5080c6aea521ff03dca24317f0405c02725061
diff --git a/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java b/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
index 4ab0ea3..89f7286 100644
--- a/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
+++ b/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
@@ -156,10 +156,6 @@
return mThumbMaxWidth;
}
- public float getLastTouchY() {
- return mLastTouchY;
- }
-
public boolean isDraggingThumb() {
return mIsDragging;
}
@@ -210,6 +206,7 @@
mPopup.animateVisibility(!sectionName.isEmpty());
mRv.invalidate(mPopup.updateFastScrollerBounds(lastY));
mLastTouchY = boundedY;
+ setThumbOffset(mRv.getScrollBarX(), (int) mLastTouchY);
}
break;
case MotionEvent.ACTION_UP: