AnimatorVectorParserpublic class AnimatorGroup extends Animator
| 限定符和类型 | 类 | 说明 |
|---|---|---|
class |
AnimatorGroup.Builder |
Builder class of AnimatorGroup, used to build complex animator group.
|
Animator.CurveType, Animator.LoopedListener, Animator.StateChangedListener, Animator.TimelineCurve| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected AnimatorGroup.Builder |
mBuilder |
Indicates a
Builder object, which is used to create a complex animator group. |
INFINITE, mLoopedListener, mPauseListener, mStartListener| 构造器 | 说明 |
|---|---|
AnimatorGroup() |
Default constructor used to create an animator group.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
AnimatorGroup.Builder |
build() |
Obtains a builder that assists in creating an animator group, calling this method will clear previously added
animations.
|
void |
clear() |
Clears the animations in an animator group.
|
ArrayList<Animator> |
getAnimatorsAt(int round) |
Obtains animators used in a round of an animator group.
|
int |
getRoundCount() |
Obtains the total rounds of animator groups.
|
void |
runParallel(Animator... items) |
Specifies a group of animations that are played in parallel.
|
void |
runSerially(Animator... items) |
Specifies a group of animations that are played in series.
|
void |
setCurve(Animator.TimelineCurve curve) |
Sets a timeline curve for all animations in this
AnimatorGroup object. |
void |
setCurveType(int curveType) |
Sets an curveType used by an animator group.
|
void |
setDelay(long startDelay) |
Sets the startup delay of an animator group.
|
void |
setDuration(long duration) |
Sets the duration of an animator group.
|
void |
setLoopedCount(int loopedCount) |
Sets the repetition times of an animator group.
|
void |
setLoopedListener(Animator.LoopedListener listener) |
Sets the repeat listener for animator groups.
|
void |
setStateChangedListener(Animator.StateChangedListener listener) |
Sets the state changed listener for animator groups.
|
cancel, end, getCurveType, getDelay, getDuration, getLoopedCount, isPaused, isRunning, pause, release, resume, setCurveInternal, setCurveTypeInternal, setDelayInternal, setDurationInternal, setLoopedCountInternal, setLoopedListenerInternal, setPauseListenerInternal, setStartListenerInternal, start, stopprotected AnimatorGroup.Builder mBuilder
Builder object, which is used to create a complex animator group.public void runParallel(Animator... items)
items - Specifies a group of animations that are played in parallel.public void runSerially(Animator... items)
items - Specifies a group of animations that are played in series.public int getRoundCount()
public ArrayList<Animator> getAnimatorsAt(int round)
round - Specifies the index (starting from 0) of animations in an animator group.public void clear()
public AnimatorGroup.Builder build()
public void setDuration(long duration)
getDuration method in AnimatorGroup will return -1.duration - Specifies the duration for animations in an animator group.
The value must be greater than or equal to 0, in unit of milliseconds.public void setDelay(long startDelay)
startDelay - Specifies the startup delay for animations in an animator group.
The value must be greater than or equal to 0, in unit of milliseconds.public void setLoopedCount(int loopedCount)
loopedCount - Specifies the repetition times of animations in an animator group.
The value must be greater than or equal to 0, or INFINITE.
If the value is 0, the animation will be played only once.public void setCurveType(int curveType)
getCurveType method in AnimatorGroup
will return -1. For details, see Animator.CurveType.INVALID.curveType - Specifies the curveType type.Animator.CurveTypepublic void setStateChangedListener(Animator.StateChangedListener listener)
listener - Specifies the pause and resume listener for animator groups.
You can set it to null to clear the existing listener.public void setLoopedListener(Animator.LoopedListener listener)
listener - Specifies the repeat listener for animator groups.
You can set it to null to clear the existing listener.public void setCurve(Animator.TimelineCurve curve)
AnimatorGroup object.curve - Indicates the curve to set.Animator.TimelineCurve