public class AnimatorProperty extends Animator
Animator.CurveType, Animator.LoopedListener, Animator.StateChangedListener, Animator.TimelineCurve| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected Component |
mComponent |
Indicates the target component of the current property animator.
|
INFINITE, mLoopedListener, mPauseListener, mStartListener| 构造器 | 说明 |
|---|---|
AnimatorProperty() |
A constructor with no Component specified for the property animator.
|
AnimatorProperty(Component component) |
A constructor with a Component specified for the property animator.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
AnimatorProperty |
alpha(float alpha) |
Sets the target transparent gradient of an animator.
|
AnimatorProperty |
alphaFrom(float alpha) |
Sets the start alpha value for this animator.
|
Component |
getTarget() |
Obtains the target Component of the current property animator.
|
AnimatorProperty |
moveByX(float deltaValue) |
Sets the relative distance of horizontal movement for an animator.
|
AnimatorProperty |
moveByY(float deltaValue) |
Sets the relative distance of vertical movement for an animator.
|
AnimatorProperty |
moveFromX(float value) |
Sets the start point of an animator in horizontal movement.
|
AnimatorProperty |
moveFromY(float value) |
Sets the start point of an animator in vertical movement.
|
AnimatorProperty |
moveToX(float value) |
Sets the destination of an animator in horizontal movement.
|
AnimatorProperty |
moveToY(float value) |
Sets the destination of an animator in vertical movement.
|
void |
reset() |
Stops an animator and resets the target Component to the initial state.
|
AnimatorProperty |
rotate(float rotation) |
Sets the target tilt angle for plane rotation of an animator.
|
AnimatorProperty |
scaleX(float scale) |
Sets the horizontal scaling ratio of an animator.
|
AnimatorProperty |
scaleXBy(float deltaScale) |
Sets the variation for the horizontal scaling ratio of an animator.
|
AnimatorProperty |
scaleXFrom(float scale) |
Sets the start horizontal scale for this animator.
|
AnimatorProperty |
scaleY(float scale) |
Sets the vertical scaling ratio of an animator.
|
AnimatorProperty |
scaleYBy(float deltaScale) |
Sets the variation for the vertical scaling ratio of an animator.
|
AnimatorProperty |
scaleYFrom(float scale) |
Sets the start vertical scale for this animator.
|
void |
setCurve(Animator.TimelineCurve curve) |
Sets a timeline curve for this
AnimatorProperty object to reflect the changes of component properties. |
AnimatorProperty |
setCurveType(int curveType) |
Sets the interpolator used by an animator, which is a linear interpolator by default.
|
AnimatorProperty |
setDelay(long startDelay) |
Sets the startup delay of an animator.
|
AnimatorProperty |
setDuration(long duration) |
Sets the duration of an animator.
|
AnimatorProperty |
setLoopedCount(int loopedCount) |
Sets the repetition times of an animator.
|
AnimatorProperty |
setLoopedListener(Animator.LoopedListener listener) |
Sets the repeat listener for animators.
|
AnimatorProperty |
setStateChangedListener(Animator.StateChangedListener listener) |
Sets a listener for animator state changes (pause or resumption).
|
AnimatorProperty |
setTarget(Component component) |
Sets the target Component of the property animator.
|
cancel, end, getCurveType, getDelay, getDuration, getLoopedCount, isPaused, isRunning, pause, release, resume, setCurveInternal, setCurveTypeInternal, setDelayInternal, setDurationInternal, setLoopedCountInternal, setLoopedListenerInternal, setPauseListenerInternal, setStartListenerInternal, start, stopprotected Component mComponent
public AnimatorProperty()
public AnimatorProperty(Component component)
component - Specifies the Component to implement the property animator.public AnimatorProperty setTarget(Component component)
component - Specifies the Component to implement the property animator.public Component getTarget()
public AnimatorProperty setDuration(long duration)
duration - Specifies the duration of an animator.
The value must be greater than or equal to 0, in unit of milliseconds.public AnimatorProperty setDelay(long startDelay)
startDelay - Specifies the startup delay of an animator.
The value must be greater than or equal to 0, in unit of milliseconds.public AnimatorProperty setCurveType(int curveType)
curveType - Specifies the curve type.Animator.CurveTypepublic void reset()
public AnimatorProperty setLoopedCount(int loopedCount)
loopedCount - Specifies the repetition times of an animator.
The value must be greater than or equal to 0, or INFINITE.
If the value is 0, the animator will be played only once.Animator.INFINITEpublic AnimatorProperty setLoopedListener(Animator.LoopedListener listener)
listener - Specifies the repeat listener for animators.
You can set it to null to clear the existing listener.public AnimatorProperty setStateChangedListener(Animator.StateChangedListener listener)
listener - Indicates the listener to set. If it is set to null, existing listeners will be cleared.public void setCurve(Animator.TimelineCurve curve)
AnimatorProperty object to reflect the changes of component properties.curve - Indicates the curve to set.Animator.TimelineCurvepublic AnimatorProperty moveFromX(float value)
value - Specifies the start point of an animator in horizontal movement,
which is a relative position in a layout.public AnimatorProperty moveToX(float value)
moveToX and moveByX are set, the latter will take effect.value - Specifies the destination of an animator in horizontal movement,
which is a relative position in a layout.public AnimatorProperty moveByX(float deltaValue)
moveToX and moveByX are set, the latter will take effect.deltaValue - Specifies the relative distance of horizontal movement for an animator.public AnimatorProperty moveFromY(float value)
value - Specifies the start point of an animator in vertical movement,
which is a relative position in a layout.public AnimatorProperty moveToY(float value)
moveToY and moveByY are set, the latter will take effect.value - Specifies the destination of an animator in vertical movement,
which is a relative position in a layout.public AnimatorProperty moveByY(float deltaValue)
moveToY and moveByY are set, the latter will take effect.deltaValue - Specifies the relative distance of vertical movement for an animator.public AnimatorProperty alpha(float alpha)
alpha - Specifies the target transparent gradient for an animator.
The animator is transparent if the value is 0;
the animator is not transparent if the value is 1.Component.setAlpha(float)public AnimatorProperty alphaFrom(float alpha)
alpha - Indicates the start alpha value to set. The value 0 indicates that the animator is
transparent, and 1 indicates the opposite.Component.setScaleX(float)public AnimatorProperty scaleX(float scale)
scale - Specifies the horizontal scaling ratio of an animator.Component.setScaleX(float)public AnimatorProperty scaleXFrom(float scale)
scale - Indicates the start horizontal scale to set.Component.setScaleX(float)public AnimatorProperty scaleXBy(float deltaScale)
scaleX and scaleXBy are set, the latter will take effect.deltaScale - Specifies the variation for the horizontal scaling ratio of an animator.Component.setScaleX(float)public AnimatorProperty scaleY(float scale)
scale - Specifies the vertical scaling ratio of the animator.Component.setScaleY(float)public AnimatorProperty scaleYFrom(float scale)
scale - Indicates the start vertical scale to set.Component.setScaleY(float)public AnimatorProperty scaleYBy(float deltaScale)
scaleY and scaleYBy are set, the latter will take effect.deltaScale - Specifies the variation for the vertical scaling ratio of an animator.Component.setScaleY(float)public AnimatorProperty rotate(float rotation)
rotation - Specifies the target tilt angle for plane rotation of an animator.Component.setRotation(float)