AnimatorKt

public final class AnimatorKt


Summary

Public methods

static final @NonNull Animator.AnimatorListener
AnimatorKt.addListener(
    Animator receiver,
    Function1<AnimatorUnit> onEnd,
    Function1<AnimatorUnit> onStart,
    Function1<AnimatorUnit> onCancel,
    Function1<AnimatorUnit> onRepeat
)

Add a listener to this Animator using the provided actions.

static final @RequiresApi(value = 19) @NonNull Animator.AnimatorPauseListener
AnimatorKt.addPauseListener(
    Animator receiver,
    Function1<AnimatorUnit> onResume,
    Function1<AnimatorUnit> onPause
)

Add a pause and resume listener to this Animator using the provided actions.

static final @NonNull Animator.AnimatorListener
AnimatorKt.doOnCancel(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has been cancelled.

static final @NonNull Animator.AnimatorListener
AnimatorKt.doOnEnd(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has ended.

static final @RequiresApi(value = 19) @NonNull Animator.AnimatorPauseListener
AnimatorKt.doOnPause(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has been paused.

static final @NonNull Animator.AnimatorListener
AnimatorKt.doOnRepeat(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has repeated.

static final @RequiresApi(value = 19) @NonNull Animator.AnimatorPauseListener
AnimatorKt.doOnResume(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has resumed after a pause.

static final @NonNull Animator.AnimatorListener
AnimatorKt.doOnStart(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has started.

Public methods

AnimatorKt.addListener

public static final @NonNull Animator.AnimatorListener AnimatorKt.addListener(
    Animator receiver,
    Function1<AnimatorUnit> onEnd,
    Function1<AnimatorUnit> onStart,
    Function1<AnimatorUnit> onCancel,
    Function1<AnimatorUnit> onRepeat
)

Add a listener to this Animator using the provided actions.

Returns
@NonNull Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

AnimatorKt.addPauseListener

@RequiresApi(value = 19)
public static final @NonNull Animator.AnimatorPauseListener AnimatorKt.addPauseListener(
    Animator receiver,
    Function1<AnimatorUnit> onResume,
    Function1<AnimatorUnit> onPause
)

Add a pause and resume listener to this Animator using the provided actions.

AnimatorKt.doOnCancel

public static final @NonNull Animator.AnimatorListener AnimatorKt.doOnCancel(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has been cancelled.

Returns
@NonNull Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

See also
cancel

AnimatorKt.doOnEnd

public static final @NonNull Animator.AnimatorListener AnimatorKt.doOnEnd(
    Animator receiver,
    Function1<AnimatorUnit> action
)

Add an action which will be invoked when the animation has ended.

Returns
@NonNull Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

See also
end

AnimatorKt.doOnPause

@RequiresApi(value = 19)
public static final @