Fix fast scrolling is not "enabled" in work tab
We should just take the ViewPager.getLeft() into account, but not the
recycler view itself.
Test: Fast scroll in both personal and work tab.
Fix: 71702218
Change-Id: Iaf508c852f197f93f8cd1d1e0c30d9f2fd7fa980
diff --git a/src/com/android/launcher3/BaseRecyclerView.java b/src/com/android/launcher3/BaseRecyclerView.java
index 76c7845..cc13263 100644
--- a/src/com/android/launcher3/BaseRecyclerView.java
+++ b/src/com/android/launcher3/BaseRecyclerView.java
@@ -91,7 +91,7 @@
// Move to mScrollbar's coordinate system.
// We need to take parent into account (view pager's location)
ViewGroup parent = (ViewGroup) getParent();
- int left = parent.getLeft() + getLeft() - mScrollbar.getLeft();
+ int left = parent.getLeft() - mScrollbar.getLeft();
int top = parent.getTop() + getTop() - mScrollbar.getTop() - getScrollBarTop();
ev.offsetLocation(left, top);
try {