summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2016-07-11 18:59:18 -0700
committerPeter Schiller <peterschiller@google.com>2016-07-12 12:16:26 -0700
commitb655b8850064cc4f8e59652b4e3bffc09090769a (patch)
tree35903c193119dbea9f704ad0449f45398ffd1d3e /src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java
parent7ed42af3398c1764424ebbf2dd6e2a51e05eaf5f (diff)
downloadandroid_packages_apps_Trebuchet-b655b8850064cc4f8e59652b4e3bffc09090769a.tar.gz
android_packages_apps_Trebuchet-b655b8850064cc4f8e59652b4e3bffc09090769a.tar.bz2
android_packages_apps_Trebuchet-b655b8850064cc4f8e59652b4e3bffc09090769a.zip
Cleaning up scrollbar logic to properly calculate stable extents.
- Removing old logic which assumed that views were the same size, especially now we can have variable dividers, etc. - Simplifying old scroll position logic. - Removing unnecessary prediction icon layout (same as normal icon) Bug: 30023608 Change-Id: I39e1126fa586a76a9bdd3ff38cd6e360ac3021e6
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java b/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java
index 73de45e39..6d9094f78 100644
--- a/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java
+++ b/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java
@@ -18,7 +18,6 @@ package com.android.launcher3.allapps;
import android.support.v7.widget.RecyclerView;
import android.view.View;
-import com.android.launcher3.BaseRecyclerView;
import com.android.launcher3.BaseRecyclerViewFastScrollBar;
import com.android.launcher3.FastBitmapDrawable;
import com.android.launcher3.util.Thunk;
@@ -144,8 +143,8 @@ public class AllAppsFastScrollHelper implements AllAppsGridAdapter.BindViewCallb
// Calculate the full animation from the current scroll position to the final scroll
// position, and then run the animation for the duration.
- int newScrollY = Math.min(availableScrollHeight,
- mRv.getPaddingTop() + mRv.getTop(info.fastScrollToItem.rowIndex));
+ int newPosition = info.fastScrollToItem.position;
+ int newScrollY = Math.min(availableScrollHeight, mRv.getCurrentScrollY(newPosition, 0));
int numFrames = mFastScrollFrames.length;
for (int i = 0; i < numFrames; i++) {
// TODO(winsonc): We can interpolate this as well.