Class Info |
|---|
public abstract class Animation An abstract class for supporting marker animation. |
Qualifier and Type | Class Name and Description |
|---|---|
public interface | Listens for animation movement. |
Qualifier and Type | Field and Description |
|---|---|
static final int | The first frame is displayed after the animation ends. |
static final int | The last frame is displayed after the animation ends. |
static final int | The animation is replayed infinitely. |
static final int | The animation is replayed from the start after it ends. You can call Animation.setRepeatCount(int) to set a limit on the number of replay times. |
static final int | The animation is replayed from the end in reverse order after it ends. You can call Animation.setRepeatCount(int) to set a limit on the number of replay times. |
Qualifier and Type | Method Name and Description |
|---|---|
int | Obtains the status after the animation ends. |
Interpolator | Obtains an interpolator. |
| Obtains an animation listener. | |
int | Obtains the number of times that an animation is replayed. |
int | Obtains the animation replay mode. |
long | Obtains the animation duration. |
void | setAnimationListener(Animation.AnimationListener listener) Sets a listener. |
abstract void | setDuration(long duration) Sets the animation duration. |
void | setFillMode(int fillMode) Sets the status after the animation ends. |
abstract void | setInterpolator(Interpolator interpolator) Sets an animation interpolator. |
void | setRepeatCount(int repeatCount) Sets the number of times that an animation is replayed. |
void | setRepeatMode(int repeatMode) Sets the animation replay mode. By default, the animation is replayed from the start. |
Fields |
|---|
public static final int FILL_MODE_BACKWARDS The first frame is displayed after the animation ends. FILL_MODE_BACKWARDS: 1 For other constant values, please refer to Constant-values. |
Fields |
|---|
public static final int FILL_MODE_FORWARDS The last frame is displayed after the animation ends. FILL_MODE_FORWARDS: 0 For other constant values, please refer to Constant-values. |
Fields |
|---|
public static final int INFINITE The animation is replayed infinitely. INFINITE: -1 For other constant values, please refer to Constant-values. |
Fields |
|---|
public static final int RESTART The animation is replayed from the start after it ends. You can call Animation.setRepeatCount(int) to set a limit on the number of replay times. RESTART: 1 For other constant values, please refer to Constant-values. |
Fields |
|---|
public static final int REVERSE The animation is replayed from the end in reverse order after it ends. You can call Animation.setRepeatCount(int) to set a limit on the number of replay times. REVERSE: 2 For other constant values, please refer to Constant-values. |
Method |
|---|
public int getFillMode() Obtains the status after the animation ends. |
Returns
Type | Description |
|---|---|
int | Status after the animation ends. |
Method |
|---|
public Interpolator getInterpolator() Obtains an interpolator. |
Returns
Type | Description |
|---|---|
Interpolator | Interpolator. |
Method |
|---|
public Animation.AnimationListener getListener() Obtains an animation listener. |
Returns
Type | Description |
|---|---|
Animation listener. |
Method |
|---|
public int getRepeatCount() Obtains the number of times that an animation is replayed. |
Returns
Type | Description |
|---|---|
int | Number of times that an animation is replayed. |
Method |
|---|
public int getRepeatMode() Obtains the animation replay mode. |
Returns
Type | Description |
|---|---|
int | Animation replay mode. |
Method |
|---|
public long getDuration() Obtains the animation duration. |
Returns
Type | Description |
|---|---|
long | Animation duration. |
Method |
|---|
public void setAnimationListener(Animation.AnimationListener listener) Sets a listener. |
Parameters
Name | Description |
|---|---|
listener | Animation listener. |
Method |
|---|
public abstract void setDuration(long duration) Sets the animation duration. |
Parameters
Name | Description |
|---|---|
duration | Animation duration, in milliseconds. The default value is 250. |
Method |
|---|
public void setFillMode(int fillMode) Sets the status after the animation ends. |
Parameters
Name | Description |
|---|---|
fillMode | Status after the animation ends. The options are as follows:
The default value is 0 (FILL_MODE_FORWARDS). If an abnormal value is passed, the default value will be used. |
Method |
|---|
public abstract void setInterpolator(Interpolator interpolator) Sets an animation interpolator. |
Parameters
Name | Description |
|---|---|
interpolator | Interpolator. |
Method |
|---|
public void setRepeatCount(int repeatCount) Sets the number of times that an animation is replayed. |
Parameters
Name | Description |
|---|---|
repeatCount | Number of times that an animation is replayed. The default value is 0. The options are as follows:
|
Method |
|---|
public void setRepeatMode(int repeatMode) Sets the animation replay mode. By default, the animation is replayed from the start. |
Parameters
Name | Description |
|---|---|
repeatMode | Animation replay mode. The options are as follows:
The default value is 1 (RESTART). If an abnormal value is passed, the default value will be used. |