AnimatorKt

public final class AnimatorKt


Summary

Public methods

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

Add a listener to this Animator using the provided actions.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Public methods

AnimatorKt.addListener

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

Add a listener to this Animator using the provided actions.

Returns
Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

AnimatorKt.addPauseListener

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

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

Returns
@RequiresApi(value = "19") Animator.AnimatorPauseListener

the Animator.AnimatorPauseListener added to the Animator

AnimatorKt.doOnCancel

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

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

Returns
Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

See also
cancel

AnimatorKt.doOnEnd

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

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

Returns
Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

See also
end

AnimatorKt.doOnPause

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

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

Returns
@RequiresApi(value = "19") Animator.AnimatorPauseListener

the Animator.AnimatorPauseListener added to the Animator

See also
pause

AnimatorKt.doOnRepeat

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

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

Returns
Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

AnimatorKt.doOnResume

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

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

Returns
@RequiresApi(value = "19") Animator.AnimatorPauseListener

the Animator.AnimatorPauseListener added to the Animator

See also
resume

AnimatorKt.doOnStart

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

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

Returns
Animator.AnimatorListener

the Animator.AnimatorListener added to the Animator

See also
start