Merge "Separate color into app color and dot color; specify dot color" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
508fbbff56
@@ -180,7 +180,7 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView {
|
|||||||
: null;
|
: null;
|
||||||
super.applyFromWorkspaceItem(info, animate, staggerIndex);
|
super.applyFromWorkspaceItem(info, animate, staggerIndex);
|
||||||
int oldPlateColor = mPlateColor;
|
int oldPlateColor = mPlateColor;
|
||||||
int newPlateColor = ColorUtils.setAlphaComponent(mDotParams.color, 200);
|
int newPlateColor = ColorUtils.setAlphaComponent(mDotParams.appColor, 200);
|
||||||
if (!animate) {
|
if (!animate) {
|
||||||
mPlateColor = newPlateColor;
|
mPlateColor = newPlateColor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,7 +253,8 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
|||||||
*/
|
*/
|
||||||
public void reset() {
|
public void reset() {
|
||||||
mDotInfo = null;
|
mDotInfo = null;
|
||||||
mDotParams.color = Color.TRANSPARENT;
|
mDotParams.dotColor = Color.TRANSPARENT;
|
||||||
|
mDotParams.appColor = Color.TRANSPARENT;
|
||||||
cancelDotScaleAnim();
|
cancelDotScaleAnim();
|
||||||
mDotParams.scale = 0f;
|
mDotParams.scale = 0f;
|
||||||
mForceHideDot = false;
|
mForceHideDot = false;
|
||||||
@@ -381,7 +382,9 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
|||||||
flags |= FLAG_NO_BADGE;
|
flags |= FLAG_NO_BADGE;
|
||||||
}
|
}
|
||||||
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), flags);
|
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), flags);
|
||||||
mDotParams.color = iconDrawable.getIconColor();
|
mDotParams.appColor = iconDrawable.getIconColor();
|
||||||
|
mDotParams.dotColor = getContext().getResources()
|
||||||
|
.getColor(android.R.color.system_accent3_100, getContext().getTheme());
|
||||||
setIcon(iconDrawable);
|
setIcon(iconDrawable);
|
||||||
applyLabel(info);
|
applyLabel(info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -637,7 +637,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
|||||||
|
|
||||||
// If we are animating to the accepting state, animate the dot out.
|
// If we are animating to the accepting state, animate the dot out.
|
||||||
mDotParams.scale = Math.max(0, mDotScale - mBackground.getScaleProgress());
|
mDotParams.scale = Math.max(0, mDotScale - mBackground.getScaleProgress());
|
||||||
mDotParams.color = mBackground.getDotColor();
|
mDotParams.dotColor = mBackground.getDotColor();
|
||||||
mDotRenderer.draw(canvas, mDotParams);
|
mDotRenderer.draw(canvas, mDotParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user