Package com.yandex.mapkit.map
Interface PlacemarkAnimation
interface PlacemarkAnimation
Provides an interface to load and control animation of placemark.
Summary
Methods
Type and modifiers |
Method and Description |
void |
setIcon(@NonNull AnimatedImageProvider image, |
void |
setIcon(@NonNull AnimatedImageProvider image, |
void |
setIconStyle(@NonNull IconStyle style) |
void |
play() |
void |
play(@NonNull Callback onFinished) |
void |
resume() |
void |
stop() |
void |
pause() |
boolean |
isReversed() |
void |
setReversed(boolean reversed) |
boolean |
isValid() |
Methods
setIcon
void setIcon(@NonNull AnimatedImageProvider image, |
Sets the animated image and icon style.
The new animation will be in the paused state.
setIcon
void setIcon(@NonNull AnimatedImageProvider image, |
Sets the animated image and icon style.
The new animation will be in the paused state.
Parameters |
|
|
is called when the icon is loaded. |
setIconStyle
void setIconStyle(@NonNull IconStyle style) |
Changes the icon style.
play
void play() |
Starts animation.
Removes the current play callback. Same as play(null).
play
void play(@NonNull Callback onFinished) |
Starts animation and handles the callback.
Parameters |
|
|
is called when animation finishes and replaces the previous callback. |
resume
void resume() |
Resumes paused animation.
Callback (if any) is NOT removed.
stop
void stop() |
Stops animation.
Animation returns to the initial paused state.
pause
void pause() |
Pauses animation.
isReversed
boolean isReversed() |
If true, animation will be played in the reverse direction.
Default value is false.
setReversed
void setReversed(boolean reversed) |
isValid
boolean isValid() |
Tells if this PlacemarkAnimation is valid or not.
Any other method (except for this one) called on an invalid PlacemarkAnimation will throw java.lang.RuntimeException. An instance becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.