Package icyllis.modernui.animation
Class StateListAnimator
java.lang.Object
icyllis.modernui.animation.StateListAnimator
- All Implemented Interfaces:
Cloneable
Lets you define a number of Animators that will run on the attached View depending on the View's
drawable state.
- Since:
- 3.3.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAssociates the given animator with the provided drawable state spec so that it will be run when the View's drawable state matches the spec.clone()voidIf there is an animation running for a recent state change, ends it.voidsetState(int[] state) Called by ViewvoidCalled by View
-
Constructor Details
-
StateListAnimator
public StateListAnimator()
-
-
Method Details
-
addState
Associates the given animator with the provided drawable state spec so that it will be run when the View's drawable state matches the spec.- Parameters:
spec- The drawable state spec to match againstanimator- The animator to run when the spec match
-
setTarget
Called by View -
setState
@Internal public void setState(@Nonnull int[] state) Called by View -
jumpToCurrentState
public void jumpToCurrentState()If there is an animation running for a recent state change, ends it.This causes the animation to assign the end value(s) to the View.
-
clone
-