From 5e48935344f71af24036f72484413d37795f841d Mon Sep 17 00:00:00 2001 From: Tony Mak Date: Tue, 16 Jan 2018 17:29:50 +0000 Subject: [PATCH] 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 --- src/com/android/launcher3/BaseRecyclerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/BaseRecyclerView.java b/src/com/android/launcher3/BaseRecyclerView.java index 76c7845325..cc13263382 100644 --- a/src/com/android/launcher3/BaseRecyclerView.java +++ b/src/com/android/launcher3/BaseRecyclerView.java @@ -91,7 +91,7 @@ public abstract class BaseRecyclerView extends RecyclerView // 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 {