diff options
author | Chet Haase <chet@google.com> | 2011-08-24 07:20:53 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2011-08-24 07:20:53 -0700 |
commit | d8991c4ab02449e78745d7ecc521ca0b41ea4c53 (patch) | |
tree | 53c46f9ccaa082a80f901f0ce15abcfd26ab271b | |
parent | 5e82bc038385edcb669b44659401fb83dab9c880 (diff) | |
download | frameworks_base-d8991c4ab02449e78745d7ecc521ca0b41ea4c53.zip frameworks_base-d8991c4ab02449e78745d7ecc521ca0b41ea4c53.tar.gz frameworks_base-d8991c4ab02449e78745d7ecc521ca0b41ea4c53.tar.bz2 |
Fix docs for fill behavior in Animation class.
Change-Id: I9230e9b9841dbecead51a6716195749b0c5a0e39
-rw-r--r-- | core/java/android/view/animation/Animation.java | 29 | ||||
-rwxr-xr-x | core/res/res/values/attrs.xml | 12 |
2 files changed, 21 insertions, 20 deletions
diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java index b7dfabc..f4b9252 100644 --- a/core/java/android/view/animation/Animation.java +++ b/core/java/android/view/animation/Animation.java @@ -116,7 +116,8 @@ public abstract class Animation implements Cloneable { /** * Indicates whether the animation transformation should be applied before the - * animation starts. + * animation starts. The value of this variable is only relevant if mFillEnabled is true; + * otherwise it is assumed to be true. */ boolean mFillBefore = true; @@ -127,7 +128,7 @@ public abstract class Animation implements Cloneable { boolean mFillAfter = false; /** - * Indicates whether fillAfter should be taken into account. + * Indicates whether fillBefore should be taken into account. */ boolean mFillEnabled = false; @@ -505,9 +506,9 @@ public abstract class Animation implements Cloneable { } /** - * If fillEnabled is true, this animation will apply fillBefore and fillAfter. + * If fillEnabled is true, this animation will apply the value of fillBefore. * - * @return true if the animation will take fillBefore and fillAfter into account + * @return true if the animation will take fillBefore into account * @attr ref android.R.styleable#Animation_fillEnabled */ public boolean isFillEnabled() { @@ -515,11 +516,11 @@ public abstract class Animation implements Cloneable { } /** - * If fillEnabled is true, the animation will apply the value of fillBefore and - * fillAfter. Otherwise, fillBefore and fillAfter are ignored and the animation - * transformation is always applied. + * If fillEnabled is true, the animation will apply the value of fillBefore. + * Otherwise, fillBefore is ignored and the animation + * transformation is always applied until the animation ends. * - * @param fillEnabled true if the animation should take fillBefore and fillAfter into account + * @param fillEnabled true if the animation should take the value of fillBefore into account * @attr ref android.R.styleable#Animation_fillEnabled * * @see #setFillBefore(boolean) @@ -531,7 +532,8 @@ public abstract class Animation implements Cloneable { /** * If fillBefore is true, this animation will apply its transformation - * before the start time of the animation. Defaults to true if not set. + * before the start time of the animation. Defaults to true if + * {@link #setFillEnabled(boolean)} is not set to true. * Note that this applies when using an {@link * android.view.animation.AnimationSet AnimationSet} to chain * animations. The transformation is not applied before the AnimationSet @@ -549,10 +551,9 @@ public abstract class Animation implements Cloneable { /** * If fillAfter is true, the transformation that this animation performed * will persist when it is finished. Defaults to false if not set. - * Note that this applies when using an {@link + * Note that this applies to individual animations and when using an {@link * android.view.animation.AnimationSet AnimationSet} to chain - * animations. The transformation is not applied before the AnimationSet - * itself starts. + * animations. * * @param fillAfter true if the animation should apply its transformation after it ends * @attr ref android.R.styleable#Animation_fillAfter @@ -674,7 +675,9 @@ public abstract class Animation implements Cloneable { /** * If fillBefore is true, this animation will apply its transformation - * before the start time of the animation. + * before the start time of the animation. If fillBefore is false and + * {@link #isFillEnabled() fillEnabled} is true, the transformation will not be applied until + * the start time of the animation. * * @return true if the animation applies its transformation before it starts * @attr ref android.R.styleable#Animation_fillBefore diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index aa3397f..817578f 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -3929,15 +3929,14 @@ <declare-styleable name="Animation"> <!-- Defines the interpolator used to smooth the animation movement in time. --> <attr name="interpolator" /> - <!-- When set to true, fillAfter is taken into account. --> + <!-- When set to true, the value of fillBefore is taken into account. --> <attr name="fillEnabled" format="boolean" /> - <!-- When set to true, the animation transformation is applied before the animation has - started. The default value is true. If fillEnabled is not set to true, fillBefore - is assumed to be true. --> + <!-- When set to true or when fillEnabled is not set to true, the animation transformation + is applied before the animation has started. The default value is true. --> <attr name="fillBefore" format="boolean" /> <!-- When set to true, the animation transformation is applied after the animation is - over. The default value is false. If fillEnabled is not set to true and the animation - is not set on a View, fillAfter is assumed to be true. --> + over. The default value is false. If fillEnabled is not set to true and the + animation is not set on a View, fillAfter is assumed to be true.--> <attr name="fillAfter" format="boolean" /> <!-- Amount of time (in milliseconds) for the animation to run. --> <attr name="duration" /> @@ -4095,7 +4094,6 @@ <declare-styleable name="Animator"> <!-- Defines the interpolator used to smooth the animation movement in time. --> <attr name="interpolator" /> - <!-- When set to true, fillAfter is taken into account. --> <!-- Amount of time (in milliseconds) for the animation to run. --> <attr name="duration" /> <!-- Delay in milliseconds before the animation runs, once start time is reached. --> |