BaseItemAnimationpublic abstract class ItemAnimation extends Object
ComponentOwner information before and after the layout.
Four types of animation abstract APIs are provided based on the saved information, which are
Disappearance, Appearance, Persistence, and Change.
| 限定符和类型 | 类 | 说明 |
|---|---|---|
protected static class |
ItemAnimation.ItemAnimationCleaner |
Implements the release of the native
ItemAnimation object. |
static interface |
ItemAnimation.ItemAnimationFinishedListener |
Implements the listening for the completion of all component animations.
|
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected static int |
ANIMATION_CLASS_TYPE_BASEITEMANIMATION |
Indicates the basic item animation type.
|
protected static int |
ANIMATION_CLASS_TYPE_DEFAULTITEMANIMATION |
Indicates the default item animation type.
|
protected static int |
ANIMATION_CLASS_TYPE_ITEMANIMATION |
Indicates an item animation.
|
protected long |
mNativePtr |
The pointer to ItemAnimation.
|
| 构造器 | 说明 |
|---|---|
ItemAnimation() |
A constructor used to create an
ItemAnimation instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
protected void |
createNativePtr() |
Creates a native pointer to this
ItemAnimation instance. |
abstract void |
finishAnimation(ComponentOwner item) |
Ends an animation on a component immediately.
|
abstract void |
finishAnimations() |
Ends animations on all components immediately.
|
long |
getAddAnimationTime() |
Obtains the duration for which all add animations will run.
|
long |
getChangeAnimationTime() |
Obtains the duration for which all change animations will run.
|
long |
getMoveAnimationTime() |
Obtains the duration for which all move animations will run.
|
long |
getNativePtr() |
Obtains the native object.
|
long |
getRemoveAnimationTime() |
Obtains the duration for which all remove animations will run.
|
abstract boolean |
isRunning() |
Checks whether any component animation is running.
|
boolean |
isRunning(ItemAnimation.ItemAnimationFinishedListener listener) |
Checks whether any component animation is running and if yes, registers a listener to observe the animation
status.
|
void |
onAnimationFinished(ComponentOwner componentOwner) |
Called when an animation finishes running on a component.
|
void |
onAnimationStarted(ComponentOwner componentOwner) |
Called when an animation starts running on a component.
|
void |
setAddAnimationTime(long addAnimationTime) |
Sets the duration for which all add animations will run.
|
void |
setChangeAnimationTime(long changeAnimationTime) |
Sets the duration for which all change animations will run.
|
void |
setMoveAnimationTime(long moveAnimationTime) |
Sets the duration for which all move animations will run.
|
void |
setRemoveAnimationTime(long removeAnimationTime) |
Sets the duration for which all remove animations will run.
|
protected static final int ANIMATION_CLASS_TYPE_BASEITEMANIMATION
protected static final int ANIMATION_CLASS_TYPE_DEFAULTITEMANIMATION
protected static final int ANIMATION_CLASS_TYPE_ITEMANIMATION
protected long mNativePtr
public ItemAnimation()
ItemAnimation instance.public long getNativePtr()
protected void createNativePtr()
ItemAnimation instance.public long getMoveAnimationTime()
public void setMoveAnimationTime(long moveAnimationTime)
moveAnimationTime - Indicates the duration to set.public long getAddAnimationTime()
public void setAddAnimationTime(long addAnimationTime)
addAnimationTime - Indicates the duration to set.public long getRemoveAnimationTime()
120 if an exception occurs.public void setRemoveAnimationTime(long removeAnimationTime)
removeAnimationTime - Indicates the duration to set.public long getChangeAnimationTime()
public void setChangeAnimationTime(long changeAnimationTime)
changeAnimationTime - Indicates the duration to set.public abstract void finishAnimation(ComponentOwner item)
item - Indicates the ComponentOwner of the component.public abstract void finishAnimations()
public abstract boolean isRunning()
true if any animation is running; returns false otherwise.public final boolean isRunning(ItemAnimation.ItemAnimationFinishedListener listener)
listener - Indicates the listener to register. A callback is invoked if no animation is running or the
running animation ends. If this parameter is set to null, this method is equivalent to
isRunning().true if any animation is running; returns false otherwise.public void onAnimationStarted(ComponentOwner componentOwner)
componentOwner - Indicates the ComponentOwner of the component on which the animation starts
running.public void onAnimationFinished(ComponentOwner componentOwner)
componentOwner - Indicates the ComponentOwner of the component on which the animation finishes
running. There may be other animations running on this component.