Make the selection indicator and the focus indicator in 3d all apps different colors. Bug 2239818.
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index d5dd063..b77e00a 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -54,7 +54,8 @@
private static final Paint sPaint = new Paint();
private static final Paint sBlurPaint = new Paint();
- private static final Paint sGlowColorPaint = new Paint();
+ private static final Paint sGlowColorSelectedPaint = new Paint();
+ private static final Paint sGlowColorFocusedPaint = new Paint();
private static final Paint sEmptyPaint = new Paint();
private static final Rect sBounds = new Rect();
private static final Rect sOldBounds = new Rect();
@@ -245,7 +246,8 @@
}
}
- static void drawSelectedAllAppsBitmap(Canvas dest, int destWidth, int destHeight, Bitmap src) {
+ static void drawSelectedAllAppsBitmap(Canvas dest, int destWidth, int destHeight,
+ boolean selected, Bitmap src) {
synchronized (sCanvas) { // we share the statics :-(
if (sIconWidth == -1) {
// We can't have gotten to here without src being initialized, which
@@ -261,7 +263,8 @@
float px = (destWidth - src.getWidth()) / 2;
float py = (destHeight - src.getHeight()) / 2;
- dest.drawBitmap(mask, px + xy[0], py + xy[1], sGlowColorPaint);
+ dest.drawBitmap(mask, px + xy[0], py + xy[1],
+ selected ? sGlowColorSelectedPaint : sGlowColorFocusedPaint);
mask.recycle();
}
@@ -339,8 +342,10 @@
sIconTextureWidth = sIconTextureHeight = roundToPow2(sIconWidth);
sBlurPaint.setMaskFilter(new BlurMaskFilter(5 * density, BlurMaskFilter.Blur.NORMAL));
- sGlowColorPaint.setColor(0xffff9000);
- sGlowColorPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
+ sGlowColorSelectedPaint.setColor(0xffffc300);
+ sGlowColorSelectedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
+ sGlowColorFocusedPaint.setColor(0xffff8e00);
+ sGlowColorFocusedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
}
static class BubbleText {