public class StateAnimator
extends java.lang.Object
Constructor and Description |
---|
StateAnimator(AnimatedView target) |
Modifier and Type | Method and Description |
---|---|
void |
addState(int[] specs,
android.animation.Animator animation,
android.animation.Animator.AnimatorListener listener)
Associates the given Animation with the provided drawable state specs so that it will be run
when the View's drawable state matches the specs.
|
void |
jumpToCurrentState()
If there is an animation running for a recent state change, ends it.
|
void |
setState(int[] state)
Called by View
|
public StateAnimator(AnimatedView target)
public void addState(int[] specs, android.animation.Animator animation, android.animation.Animator.AnimatorListener listener)
specs
- drawable state specs to match againstanimation
- The Animation to run when the specs matchpublic void setState(int[] state)
public void jumpToCurrentState()
This causes the animation to assign the end value(s) to the View.