ohos.utils.Sequenceablepublic class TileAnimationData
extends java.lang.Object
implements ohos.utils.Sequenceable
A TileAnimationData object needs to be created if the TileAbility wants to add an animation to a tile
via TileEntity.Builder#addAnimationData(TileAnimationData).
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
TileAnimationData.Builder |
A builder class for
TileAnimationData objects. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getComponentId() |
Obtains the ID of the component to which this animation is applied.
|
java.util.LinkedHashMap<java.lang.Integer,java.lang.Integer> |
getResourceList() |
Obtains the resource list of this frame animation.
|
boolean |
isOneShot() |
Checks whether this frame animation is played only once.
|
boolean |
marshalling(ohos.utils.Parcel parcel) |
|
java.lang.String |
toString() |
|
boolean |
unmarshalling(ohos.utils.Parcel parcel) |
public boolean marshalling(ohos.utils.Parcel parcel)
marshalling 在接口中 ohos.utils.Sequenceablepublic boolean unmarshalling(ohos.utils.Parcel parcel)
unmarshalling 在接口中 ohos.utils.Sequenceablepublic java.util.LinkedHashMap<java.lang.Integer,java.lang.Integer> getResourceList()
key is the image resource ID, and
value is the duration of the animation frame.public int getComponentId()
public boolean isOneShot()
true if this frame animation is played only once; returns false if this frame
animation is played cyclically.public java.lang.String toString()
toString 在类中 java.lang.Object