summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tenghui Zhu <ztenghui@google.com> 2016-04-08 21:24:03 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-04-08 21:24:04 +0000
commit3cb5ba75b76dedc7a468d324e7875e805555827f (patch)
tree66ba6a1c128c7e2409e11e6ca24d392a913a903f
parent93bd44300c54de6d62258a4b8353d6cab5f543f1 (diff)
parent9b3be58403e030b43201a2d966b721f9ab8a805c (diff)
Merge "Update the documentation on createCircularReveal" into nyc-dev
-rw-r--r--core/java/android/view/ViewAnimationUtils.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/view/ViewAnimationUtils.java b/core/java/android/view/ViewAnimationUtils.java
index 4c75935d6e23..3e277eb47dd4 100644
--- a/core/java/android/view/ViewAnimationUtils.java
+++ b/core/java/android/view/ViewAnimationUtils.java
@@ -41,6 +41,22 @@ public final class ViewAnimationUtils {
* As a result {@link AnimatorListener#onAnimationEnd(Animator)}
* will occur after the animation has ended, but it may be delayed depending
* on thread responsiveness.
+ * <p>
+ * Note that if any start delay is set on the reveal animator, the start radius
+ * will not be applied to the reveal circle until the start delay has passed.
+ * If it's desired to set a start radius on the reveal circle during the start
+ * delay, one workaround could be adding an animator with the same start and
+ * end radius. For example:
+ * <pre><code>
+ * public static Animator createRevealWithDelay(View view, int centerX, int centerY, float startRadius, float endRadius) {
+ * Animator delayAnimator = ViewAnimationUtils.createCircularReveal(view, centerX, centerY, startRadius, startRadius);
+ * delayAnimator.setDuration(delayTimeMS);
+ * Animator revealAnimator = ViewAnimationUtils.createCircularReveal(view, centerX, centerY, startRadius, endRadius);
+ * AnimatorSet set = new AnimatorSet();
+ * set.playSequentially(delayAnimator, revealAnimator);
+ * return set;
+ * }
+ * </code></pre>
*
* @param view The View will be clipped to the animating circle.
* @param centerX The x coordinate of the center of the animating circle, relative to