Java android.animation ValueAnimator fields, constructors, methods, implement or subclass

Example usage for Java android.animation ValueAnimator fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.animation ValueAnimator.

The text is from its open source code.

Field

intRESTART
When the animation reaches the end and repeatCount is INFINITE or a positive value, the animation restarts from the beginning.
intREVERSE
When the animation reaches the end and repeatCount is INFINITE or a positive value, the animation reverses direction on every iteration.
intINFINITE
This value used used with the #setRepeatCount(int) property to repeat the animation indefinitely.

Constructor

ValueAnimator()
Creates a new ValueAnimator object.

Method

voidaddListener(AnimatorListener listener)
Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.
voidaddUpdateListener(AnimatorUpdateListener listener)
Adds a listener to the set of listeners that are sent update events through the life of an animation.
voidcancel()
voidend()
floatgetAnimatedFraction()
Returns the current animation fraction, which is the elapsed/interpolated fraction used in the most recent frame update on the animation.
ObjectgetAnimatedValue()
The most recent value calculated by this ValueAnimator when there is just one property being animated.
ObjectgetAnimatedValue(String propertyName)
The most recent value calculated by this ValueAnimator for propertyName.
longgetCurrentPlayTime()
Gets the current position of the animation in time, which is equal to the current time minus the time that the animation started.
longgetDuration()
Gets the length of the animation.
TimeInterpolatorgetInterpolator()
Returns the timing interpolator that this ValueAnimator uses.
PropertyValuesHolder[]getValues()
Returns the values that this ValueAnimator animates between.
booleanisRunning()
booleanisStarted()
ValueAnimatorofArgb(int... values)
Constructs and returns a ValueAnimator that animates between color values.
ValueAnimatorofFloat(float... values)
Constructs and returns a ValueAnimator that animates between float values.
ValueAnimatorofInt(int... values)
Constructs and returns a ValueAnimator that animates between int values.
ValueAnimatorofPropertyValuesHolder(PropertyValuesHolder... values)
Constructs and returns a ValueAnimator that animates between the values specified in the PropertyValuesHolder objects.
voidremoveAllListeners()
Removes all #addListener(android.animation.Animator.AnimatorListener) listeners and #addPauseListener(android.animation.Animator.AnimatorPauseListener) pauseListeners from this object.
voidremoveAllUpdateListeners()
Removes all listeners from the set listening to frame updates for this animation.
voidsetCurrentFraction(float fraction)
Sets the position of the animation to the specified fraction.
voidsetCurrentPlayTime(long playTime)
Sets the position of the animation to the specified point in time.
ValueAnimatorsetDuration(long duration)
Sets the length of the animation.
voidsetEvaluator(TypeEvaluator value)
The type evaluator to be used when calculating the animated values of this animation.
voidsetFloatValues(float... values)
Sets float values that will be animated between.
voidsetInterpolator(TimeInterpolator value)
The time interpolator used in calculating the elapsed fraction of this animation.
voidsetIntValues(int... values)
Sets int values that will be animated between.
voidsetRepeatCount(int value)
Sets how many times the animation should be repeated.
voidsetRepeatMode(@RepeatMode int value)
Defines what this animation should do when it reaches the end.
voidsetStartDelay(long startDelay)
The amount of time, in milliseconds, to delay starting the animation after #start() is called.
voidsetTarget(@Nullable Object target)
Sets the target object whose property will be animated by this animation.
voidsetValues(PropertyValuesHolder... values)
Sets the values, per property, being animated between.
voidstart()