WindowInsetsAnimationControlListenerCompat

public interface WindowInsetsAnimationControlListenerCompat

androidx.core.view.WindowInsetsAnimationControlListenerCompat


Listener that encapsulates a request to WindowInsetsControllerCompat.controlWindowInsetsAnimation(int, long, Interpolator, CancellationSignal, WindowInsetsAnimationControlListenerCompat).

Insets can be controlled with the supplied WindowInsetsAnimationControllerCompat from onReady(WindowInsetsAnimationControllerCompat, int) until either onFinished(WindowInsetsAnimationControllerCompat) or onCancelled(WindowInsetsAnimationControllerCompat).

Once the control over insets is finished or cancelled, it will not be regained until a new request to WindowInsetsControllerCompat.controlWindowInsetsAnimation(int, long, Interpolator, CancellationSignal, WindowInsetsAnimationControlListenerCompat) is made.

The request to control insets can fail immediately. In that case onCancelled(WindowInsetsAnimationControllerCompat) will be invoked without a preceding onReady(WindowInsetsAnimationControllerCompat, int).

Summary

Public methods

abstract void onCancelled(WindowInsetsAnimationControllerCompat controller)

Called when the request for control over the insets has been cancelled, either because the CancellationSignal associated with the request has been invoked, or the window has lost control over the insets (e.g.

abstract void onFinished(WindowInsetsAnimationControllerCompat controller)

Called when the request for control over the insets has finished.

abstract void onReady(WindowInsetsAnimationControllerCompat controller, int types)

Called when the animation is ready to be controlled.

Public methods

onCancelled

public abstract void onCancelled (WindowInsetsAnimationControllerCompat controller)

Called when the request for control over the insets has been cancelled, either because the CancellationSignal associated with the request has been invoked, or the window has lost control over the insets (e.g. because it lost focus).

Once this callback is invoked, the supplied WindowInsetsAnimationControllerCompat is no longer ready.

Control will not be regained until a new request to WindowInsetsControllerCompat.controlWindowInsetsAnimation(int, long, Interpolator, CancellationSignal, WindowInsetsAnimationControlListener