From d8991c4ab02449e78745d7ecc521ca0b41ea4c53 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Wed, 24 Aug 2011 07:20:53 -0700 Subject: [PATCH] Fix docs for fill behavior in Animation class. Change-Id: I9230e9b9841dbecead51a6716195749b0c5a0e39 --- .../android/view/animation/Animation.java | 29 ++++++++++--------- 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 b7dfabcbed0f6..f4b92523594a1 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 aa3397fac6ab2..817578fd70feb 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -3929,15 +3929,14 @@ - + - + + 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.--> @@ -4095,7 +4094,6 @@ -