From 3c8598399638c90da69e14fde824385fdb582e1d Mon Sep 17 00:00:00 2001 From: Doris Liu Date: Fri, 27 May 2016 15:03:39 -0700 Subject: [PATCH] Add more doc for Object animators defined with a single value Bug: 28104516 Change-Id: I181b2817ceda5dfaf87e12c81b21e7d0d2f002fc --- .../android/animation/ObjectAnimator.java | 85 ++++++++++--------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/core/java/android/animation/ObjectAnimator.java b/core/java/android/animation/ObjectAnimator.java index 1d1086049fddd..5c4b979ccb3cb 100644 --- a/core/java/android/animation/ObjectAnimator.java +++ b/core/java/android/animation/ObjectAnimator.java @@ -227,10 +227,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between int values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * * @param target The object whose property is to be animated. This object should * have a public method on it called setName(), where name is @@ -274,10 +275,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between int values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * * @param target The object whose property is to be animated. * @param property The property being animated. @@ -383,10 +385,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between color values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * * @param target The object whose property is to be animated. This object should * have a public method on it called setName(), where name is @@ -403,10 +406,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between color values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * * @param target The object whose property is to be animated. * @param property The property being animated. @@ -422,10 +426,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between float values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * * @param target The object whose property is to be animated. This object should * have a public method on it called setName(), where name is @@ -469,10 +474,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between float values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * * @param target The object whose property is to be animated. * @param property The property being animated. @@ -580,10 +586,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between Object values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * *

Note: The values are stored as references to the original * objects, which means that changes to those objects after this method is called will @@ -635,10 +642,11 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between Object values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). * *

Note: The values are stored as references to the original * objects, which means that changes to those objects after this method is called will @@ -665,12 +673,13 @@ public final class ObjectAnimator extends ValueAnimator { /** * Constructs and returns an ObjectAnimator that animates between Object values. A single - * value implies that that value is the one being animated to. Two values imply starting - * and ending values. More than two values imply a starting value, values to animate through - * along the way, and an ending value (these values will be distributed evenly across - * the duration of the animation). This variant supplies a TypeConverter to - * convert from the animated values to the type of the property. If only one value is - * supplied, the TypeConverter must be a + * value implies that that value is the one being animated to, in which case the start value + * will be derived from the property being animated and the target object when {@link #start()} + * is called for the first time. Two values imply starting and ending values. More than two + * values imply a starting value, values to animate through along the way, and an ending value + * (these values will be distributed evenly across the duration of the animation). + * This variant supplies a TypeConverter to convert from the animated values to the + * type of the property. If only one value is supplied, the TypeConverter must be a * {@link android.animation.BidirectionalTypeConverter} to retrieve the current value. * *

Note: The values are stored as references to the original