API Review: update the createRevealAnimator to the new API design
b/15451650
Change-Id: Ice87799c475af589be93ab5b849f71b0abe0b9c9
diff --git a/src/com/android/calculator2/CalculatorActivity.java b/src/com/android/calculator2/CalculatorActivity.java
index 5c47535..f368ce8 100644
--- a/src/com/android/calculator2/CalculatorActivity.java
+++ b/src/com/android/calculator2/CalculatorActivity.java
@@ -30,6 +30,7 @@
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
+import android.view.ViewAnimationUtils;
import android.view.View.OnLongClickListener;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.Button;
@@ -216,8 +217,9 @@
final double y_2 = Math.pow(mRevealView.getTop() - revealCenterY, 2);
final float revealRadius = (float) Math.max(Math.sqrt(x1_2 + y_2), Math.sqrt(x2_2 + y_2));
- final Animator clearAnimator = mRevealView.createRevealAnimator(
- revealCenterX, revealCenterY, 0.0f, revealRadius);
+ final Animator clearAnimator =
+ ViewAnimationUtils.createCircularReveal(mRevealView,
+ revealCenterX, revealCenterY, 0.0f, revealRadius);
clearAnimator.setDuration(
getResources().getInteger(android.R.integer.config_longAnimTime));
clearAnimator.addListener(new AnimatorListenerAdapter() {