Removing click-feedback shadow generation logic in BubbleTextView
Instead of animating the shadow, animating the icon scale. This avoids unnecessary bitmap creating at app-launch and also plays nice with the app-launch transition Change-Id: I1d3d24bc7212a6d659855ff1002a45388e269e52
This commit is contained in:
1 parent
85f1eed52d
commit
726bee7d5d
13 files changed
+68
-522
No files matched your search
@@ -162,7 +162,7 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
public void drawInternal(Canvas canvas, Rect bounds) {
|
||||
if (mRanFinishAnimation) {
|
||||
super.draw(canvas);
|
||||
return;
|
||||
@@ -172,13 +172,11 @@ public class PreloadIconDrawable extends FastBitmapDrawable {
|
||||
mProgressPaint.setColor(mIndicatorColor);
|
||||
mProgressPaint.setAlpha(mTrackAlpha);
|
||||
if (mShadowBitmap != null) {
|
||||
canvas.drawBitmap(mShadowBitmap, getBounds().left, getBounds().top, mProgressPaint);
|
||||
canvas.drawBitmap(mShadowBitmap, bounds.left, bounds.top, mProgressPaint);
|
||||
}
|
||||
canvas.drawPath(mScaledProgressPath, mProgressPaint);
|
||||
|
||||
int saveCount = canvas.save();
|
||||
Rect bounds = getBounds();
|
||||
|
||||
canvas.scale(mIconScale, mIconScale, bounds.exactCenterX(), bounds.exactCenterY());
|
||||
super.draw(canvas);
|
||||
canvas.restoreToCount(saveCount);
|
||||
|
||||
Reference in new issue
Block a user