Several animation calls cleanup
> Using View property instead of strings to avoid extra reflection step > Using ViewPropertyAnimator when several properties are being animated Change-Id: I41625643b38b70bac11e2c81d18058ec878d73bd
This commit is contained in:
@@ -196,15 +196,6 @@ public class DragView extends View {
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
@SuppressWarnings("all") // suppress dead code warning
|
||||
final boolean debug = false;
|
||||
if (debug) {
|
||||
Paint p = new Paint();
|
||||
p.setStyle(Paint.Style.FILL);
|
||||
p.setColor(0x66ffffff);
|
||||
canvas.drawRect(0, 0, getWidth(), getHeight(), p);
|
||||
}
|
||||
|
||||
mHasDrawn = true;
|
||||
boolean crossFade = mCrossFadeProgress > 0 && mCrossFadeBitmap != null;
|
||||
if (crossFade) {
|
||||
@@ -235,6 +226,7 @@ public class DragView extends View {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
mCrossFadeProgress = animation.getAnimatedFraction();
|
||||
invalidate();
|
||||
}
|
||||
});
|
||||
va.start();
|
||||
|
||||
Reference in New Issue
Block a user