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,
        @NonNull IconStyle style)

Sets the animated image and icon style.

void

setIcon(@NonNull AnimatedImageProvider image,
        @NonNull IconStyle style,
        @NonNull Callback onFinished)

Sets the animated image and icon style.

void

setIconStyle(@NonNull IconStyle style)
Changes the icon style.

void

play()
Starts animation.

void

play(@NonNull Callback onFinished)
Starts animation and handles the callback.

void

resume()
Resumes paused animation.

void

stop()
Stops animation.

void

pause()
Pauses animation.

boolean

isReversed()
If true, animation will be played in the reverse direction.

void

setReversed(boolean reversed)

boolean

isValid()
Tells if this PlacemarkAnimation is valid or not.

Methods

setIcon

void setIcon(@NonNull AnimatedImageProvider image,
             @NonNull IconStyle style)

Sets the animated image and icon style.

The new animation will be in the paused state.


setIcon

void setIcon(@NonNull AnimatedImageProvider image,
             @NonNull IconStyle style,
             @NonNull Callback onFinished)

Sets the animated image and icon style.

The new animation will be in the paused state.

Parameters

onFinished

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

onFinished

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.