| Modifier and Type | Class and Description |
|---|---|
static interface |
AnimatorWrapper.WrapperFeatures
Defines an annotation for determining set of allowed features for AnimatorWrapper.
|
Animator.AnimatorListener, Animator.AnimatorPauseListener| Modifier and Type | Field and Description |
|---|---|
static int |
ALL
Flag grouping all wrapper features in one.
|
static int |
CANCEL
Flag for indicating to the animator wrapper that it should support CANCEL feature for
its wrapped animator.
|
static int |
END
Flag for indicating to the animator wrapper that it should support END feature for
its wrapped animator.
|
static int |
PAUSE
Flag for indicating to the animator wrapper that it should support PAUSE feature for
its wrapped animator.
|
static int |
RESUME
Flag for indicating to the animator wrapper that it should support RESUME feature for
its wrapped animator.
|
static int |
START
Flag for indicating to the animator wrapper that it should support START feature for
its wrapped animator.
|
DURATION_INFINITE| Constructor and Description |
|---|
AnimatorWrapper(Animator animator)
Creates a new instance of AnimatorWrapper to wrap the given instance of animator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Animator.AnimatorListener listener) |
void |
addPauseListener(Animator.AnimatorPauseListener listener)
|
void |
cancel()
|
void |
end()
|
long |
getDuration() |
TimeInterpolator |
getInterpolator() |
ArrayList<Animator.AnimatorListener> |
getListeners() |
long |
getStartDelay() |
Animator |
getWrappedAnimator()
Returns the animator wrapped by this wrapper.
|
boolean |
hasFeature(int feature)
Checks whether the specified feature has been requested for this wrapper or not.
|
boolean |
isPaused() |
boolean |
isRunning() |
boolean |
isStarted() |
void |
pause()
Ignored if there is no
PAUSE feature requested. |
void |
removeAllListeners() |
void |
removeFeature(int feature)
Removes the specified feature from the registered ones.
|
void |
removeListener(Animator.AnimatorListener listener) |
void |
removePauseListener(Animator.AnimatorPauseListener listener) |
void |
requestFeature(int feature)
Adds the specified feature to the registered ones.
|
void |
requestFeatures(int features)
Specifies set of features for this wrapper.
|
void |
resume()
|
Animator |
setDuration(long duration) |
void |
setInterpolator(TimeInterpolator interpolator) |
void |
setStartDelay(long startDelay) |
void |
setTarget(Object target) |
void |
start()
Ignored if there is no
START feature requested. |
clone, getTotalDuration, setupEndValues, setupStartValuespublic static final int START
start(),
Constant Field Valuespublic static final int PAUSE
RESUME,
pause(),
Constant Field Valuespublic static final int RESUME
Note, that if there is no PAUSE feature requested, this feature flag is ignored.
resume(),
Constant Field Valuespublic static final int END
Note, that if there is no START feature requested, this feature flag is ignored.
end(),
Constant Field Valuespublic static final int CANCEL
Note, that if there is no START feature requested, this feature flag is ignored.
cancel(),
Constant Field Valuespublic static final int ALL
@NonNull public final Animator getWrappedAnimator()
AnimatorWrapper(Animator)public void requestFeatures(int features)
Note, that this will override all current features to the specified ones.
features - The desired features to be set for this wrapper.requestFeature(int),
hasFeature(int),
removeFeature(int)public void requestFeature(int feature)
feature - The desired feature to add.requestFeatures(int),
hasFeature(int),
removeFeature(int)public void removeFeature(int feature)
feature - The desired feature to remove.requestFeature(int),
hasFeature(int)public boolean hasFeature(int feature)
feature - The desired feature to check for.True if the feature has been requested via requestFeature(int) or
specified by default, false otherwise.requestFeature(int)public void addListener(Animator.AnimatorListener listener)
addListener in class Animatorpublic void removeListener(Animator.AnimatorListener listener)
removeListener in class Animatorpublic void addPauseListener(Animator.AnimatorPauseListener listener)
addPauseListener in class AnimatorrequestFeature(int),
removeFeature(int)public void removePauseListener(Animator.AnimatorPauseListener listener)
removePauseListener in class Animator@NonNull public ArrayList<Animator.AnimatorListener> getListeners()
getListeners in class Animatorpublic void removeAllListeners()
removeAllListeners in class Animatorpublic void setStartDelay(long startDelay)
setStartDelay in class Animatorpublic long getStartDelay()
getStartDelay in class Animatorpublic Animator setDuration(long duration)
setDuration in class Animatorpublic long getDuration()
getDuration in class Animatorpublic void setInterpolator(TimeInterpolator interpolator)
setInterpolator in class Animatorpublic TimeInterpolator getInterpolator()
getInterpolator in class Animatorpublic void start()
START feature requested.start in class AnimatorrequestFeature(int),
removeFeature(int)public void pause()
PAUSE feature requested.pause in class AnimatorrequestFeature(int),
removeFeature(int)public void resume()
resume in class AnimatorrequestFeature(int),
removeFeature(int)public void end()
end in class AnimatorrequestFeature(int),
removeFeature(int)public void cancel()
cancel in class AnimatorrequestFeature(int),
removeFeature(int)