Modifier and Type | Class and Description |
---|---|
static interface |
AnimationProps.PropType |
Modifier and Type | Field and Description |
---|---|
static int |
ALL |
static int |
ALPHA |
static int |
BOUNDS |
static int |
DIM_ALPHA |
static int |
FOCUS_STATE |
static AnimationProps |
IMMEDIATE |
static int |
SCALE |
static int |
TRANSLATION_X |
static int |
TRANSLATION_Y |
static int |
TRANSLATION_Z |
Constructor and Description |
---|
AnimationProps()
The builder constructor.
|
AnimationProps(int duration,
Interpolator interpolator)
Creates an animation with a default and for all
properties in this animation.
|
AnimationProps(int duration,
Interpolator interpolator,
Animator.AnimatorListener listener)
Creates an animation with a default and for all
properties in this animation.
|
AnimationProps(int startDelay,
int duration,
Interpolator interpolator)
Creates an animation with a default , and
for all properties in this animation.
|
AnimationProps(int startDelay,
int duration,
Interpolator interpolator,
Animator.AnimatorListener listener)
Creates an animation with a default , and
for all properties in this animation.
|
Modifier and Type | Method and Description |
---|---|
<T extends ValueAnimator> |
apply(int propertyType,
T animator)
Applies the specific start delay, duration and interpolator to the given
for the specified .
|
AnimatorSet |
createAnimator(List<Animator> animators)
Creates a new
AnimatorSet that will animate the given animators. |
long |
getDuration(int propertyType)
Returns the duration for a specific property.
|
long |
getInitialPlayTime(int propertyType)
Returns the initial play time for a specific property, falling back to the general initial
play time if there is no specific property interpolator.
|
Interpolator |
getInterpolator(int propertyType)
Returns the interpolator for a specific property, falling back to the general interpolator
if there is no specific property interpolator.
|
Animator.AnimatorListener |
getListener()
Returns the animator listener for this animation.
|
long |
getStartDelay(int propertyType)
Returns the start delay for a specific property.
|
boolean |
isImmediate()
Returns whether this animation has any duration.
|
AnimationProps |
setDuration(int propertyType,
int duration)
Sets a duration for a specific property.
|
AnimationProps |
setInitialPlayTime(int propertyType,
int initialPlayTime)
Sets a initial play time for a specific property.
|
AnimationProps |
setInterpolator(int propertyType,
Interpolator interpolator)
Sets an interpolator for a specific property.
|
AnimationProps |
setListener(Animator.AnimatorListener listener)
Sets an animator listener for this animation.
|
AnimationProps |
setStartDelay(int propertyType,
int startDelay)
Sets a start delay for a specific property.
|
public static final AnimationProps IMMEDIATE
public static final int ALL
public static final int TRANSLATION_X
public static final int TRANSLATION_Y
public static final int TRANSLATION_Z
public static final int ALPHA
public static final int SCALE
public static final int BOUNDS
public static final int DIM_ALPHA
public static final int FOCUS_STATE
public AnimationProps()
public AnimationProps(int duration, Interpolator interpolator)
public AnimationProps(int duration, Interpolator interpolator, Animator.AnimatorListener listener)
public AnimationProps(int startDelay, int duration, Interpolator interpolator)
public AnimationProps(int startDelay, int duration, Interpolator interpolator, Animator.AnimatorListener listener)
public AnimatorSet createAnimator(List<Animator> animators)
AnimatorSet
that will animate the given animators. Callers need to
manually apply the individual animation properties for each of the animators respectively.public <T extends ValueAnimator> T apply(int propertyType, T animator)
public AnimationProps setStartDelay(int propertyType, int startDelay)
public AnimationProps setInitialPlayTime(int propertyType, int initialPlayTime)
public long getStartDelay(int propertyType)
public AnimationProps setDuration(int propertyType, int duration)
public long getDuration(int propertyType)
public AnimationProps setInterpolator(int propertyType, Interpolator interpolator)
public Interpolator getInterpolator(int propertyType)
public long getInitialPlayTime(int propertyType)
public AnimationProps setListener(Animator.AnimatorListener listener)
public Animator.AnimatorListener getListener()
public boolean isImmediate()