Highlighting sectioned apps on fast-scroll.
- This CL fixes an old assumption we had about the height
of rows in AllApps, and ensures that we account for the
difference in height between the predictive icons and the
normal icons.
- In addition, we refactor FastBitmapDrawable to have multiple
states, which it manages in drawing itself, including the
press state and fast scroll focus states. And we also refactor
some of the fast scroll logic in the all apps recycler view
out to its own class.
Change-Id: I1988159b2767df733bbbfc7dc601859cde6c9943
diff --git a/src/com/android/launcher3/PreloadIconDrawable.java b/src/com/android/launcher3/PreloadIconDrawable.java
index 45e4b2c..908c8b9 100644
--- a/src/com/android/launcher3/PreloadIconDrawable.java
+++ b/src/com/android/launcher3/PreloadIconDrawable.java
@@ -179,7 +179,8 @@
mPaint.setColor(getIndicatorColor());
}
if (mIcon instanceof FastBitmapDrawable) {
- ((FastBitmapDrawable) mIcon).setGhostModeEnabled(level <= 0);
+ ((FastBitmapDrawable) mIcon).setState(level <= 0 ?
+ FastBitmapDrawable.State.DISABLED : FastBitmapDrawable.State.NORMAL);
}
invalidateSelf();