Element.OnLayoutDirectionChangeListenerpublic class ImageAnimationElement extends FrameAnimationElement implements Element.OnLayoutDirectionChangeListener
Animations defined by the element objects are mainly used as the background of component objects.
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static interface |
ImageAnimationElement.ImageAnimationCallBack |
Animation start and end callback
|
Element.ConstantState, Element.OnBoundsChangeListener, Element.OnChangeListener, Element.OnLayoutDirectionChangeListener, Element.OnRankChangeListenerElementContainer.ElementState| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected ImageAnimationElement.ImageAnimationCallBack |
mEndListener |
Listener for the end of the animation
|
ALPHA_DEFAULT, ALPHA_MAX, ALPHA_MIN, DEFAULT_BOUNDS_RECT, MAX_RANK, MIN_RANK| 构造器 | 说明 |
|---|---|
ImageAnimationElement() |
Default constructor used to create a
ImageAnimationElement object. |
ImageAnimationElement(Context context,
String mediaPath) |
Creates a
ImageAnimationElement object based on the Image resource. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
ImageAnimationElement |
addAnimationCallback(ImageAnimationElement.ImageAnimationCallBack listener) |
Clear all callbacks at the end of the animation
|
int |
getLoopCount() |
Obtains the repetition times of an animator.
|
boolean |
isInheritDirection() |
get the status:AutoMirrored of this
|
boolean |
isRunning() |
Checks if an animator is running.
|
boolean |
onLayoutDirectionChanged(Element element,
Component.LayoutDirection direction) |
When the layout is changed to RTL, set the picture to be automatically mirrored
|
ImageAnimationElement |
removeAllAnimationCallbacks() |
Clear all callbacks at the end of the animation
|
ImageAnimationElement |
removeAnimationCallback(ImageAnimationElement.ImageAnimationCallBack listener) |
Remove some callbacks at the end of the animation
|
void |
setColorMatrix(ColorMatrix matrix) |
Sets the color matrix for this
Element object. |
void |
setInheritDirection(boolean mirrored) |
set the AutoMirrored of all PixemMapElement
|
ImageAnimationElement |
setLoopCount(int loopedCount) |
Specifies the repetition times of an animator.
|
void |
start() |
Starts an animation.
|
void |
stop() |
Stop an animation.
|
clearColorMatrix, drawToCanvas, getAlpha, getBounds, getCallback, getColorMatrix, getHeight, getLayoutDirection, getMinHeight, getMinWidth, getPadding, getRank, getStateColorMode, getVisible, getWidth, isVisible, release, setAlpha, setBounds, setBounds, setCallback, setLayoutDirection, setOnBoundsChangeListener, setOnLayoutDirectionChangeListener, setOnRankChangeListener, setRank, setStateColor, setStateColorList, setStateColorMode, setVisibleaddChildElement, getChildElement, getChildElementCount, getCurrentElement, getElementState, getEnterFadeDuration, getExitFadeDuration, getFadeInEffectPeriod, getFadeOutEffectPeriod, isStateful, selectElement, setElementState, setEnterFadeDuration, setExitFadeDuration, skipAnimationaddFrame, getDisposeMode, getDuration, getFrame, getNumberOfFrames, getPreDecodeFrames, isOneShot, setDisposeMode, setOneShot, setPreDecodeFramesprotected ImageAnimationElement.ImageAnimationCallBack mEndListener
public ImageAnimationElement()
ImageAnimationElement object.public void start()
start 在类中 FrameAnimationElementpublic void stop()
stop 在类中 FrameAnimationElementpublic boolean isRunning()
True if the animator is running; returns False otherwise.public ImageAnimationElement setLoopCount(int loopedCount)
loopedCount - Specifies the repetition times of an animator.public int getLoopCount()
public void setInheritDirection(boolean mirrored)
setInheritDirection 在类中 Elementmirrored - If Automirrored.Component.LayoutDirectionpublic boolean isInheritDirection()
isInheritDirection 在类中 ElementComponent.LayoutDirectionpublic void setColorMatrix(ColorMatrix matrix)
Element object.
Element colors and the alpha value can be changed by using the color matrix.
setColorMatrix 在类中 Elementmatrix - Indicates the color matrix used as a filter.public boolean onLayoutDirectionChanged(Element element, Component.LayoutDirection direction)
onLayoutDirectionChanged 在接口中 Element.OnLayoutDirectionChangeListenerelement - The element which changed.direction - The direction of element.public ImageAnimationElement addAnimationCallback(ImageAnimationElement.ImageAnimationCallBack listener)
listener - The listener of this object.public ImageAnimationElement removeAllAnimationCallbacks()
public ImageAnimationElement removeAnimationCallback(ImageAnimationElement.ImageAnimationCallBack listener)
listener - remove listener from list.