[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/view/WindowInsetsAnimationControlListener [Back]  [Original]

WindowInsetsAnimationControlListener  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.
Added in API level 30

WindowInsetsAnimationControlListener


public interface WindowInsetsAnimationControlListener

android.view.WindowInsetsAnimationControlListener


Listener that encapsulates a request to WindowInsetsController.controlWindowInsetsAnimation.

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

Once the control over insets is finished or cancelled, it will not be regained until a new request to WindowInsetsController.controlWindowInsetsAnimation is made.

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

See also:

Summary

Public methods

abstract void onCancelled(WindowInsetsAnimationController 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).

abstract void onFinished(WindowInsetsAnimationController controller)

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

abstract void onReady(WindowInsetsAnimationController controller, int types)

Called when the animation is ready to be controlled.

Public methods

onCancelled

Added in API level 30
public abstract void onCancelled (WindowInsetsAnimationController 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 WindowInsetsAnimationController is no longer ready. Control will not be regained until a new request to WindowInsetsController.controlWindowInsetsAnimation is made.

Parameters
controller WindowInsetsAnimationController: the controller which has been cancelled, or null if the request was cancelled before onReady(WindowInsetsAnimationController, int) was invoked.

See also:

onFinished

Added in API level 30
public abstract void onFinished (WindowInsetsAnimationController controller)

Called when the request for control over the insets has finished. Once this callback is invoked, the supplied WindowInsetsAnimationController is no longer ready. Control will not be regained until a new request to WindowInsetsController.controlWindowInsetsAnimation is made.

Parameters
controller WindowInsetsAnimationController: the controller which has finished.
This value cannot be null.

See also:

onReady

Added in API level 30
public abstract void onReady (WindowInsetsAnimationController controller, 
                int types)

Called when the animation is ready to be controlled. This may be delayed when the IME needs to redraw because of an EditorInfo change, or when the window is starting up.

Parameters
controller WindowInsetsAnimationController: The controller to control the inset animation.
This value cannot be null.

types int: The WindowInsets.Types it was able to gain control over. Note that this may be different than the types passed into WindowInsetsController.controlWindowInsetsAnimation in case the window wasn't able to gain the controls because it wasn't the IME target or not currently the window that's controlling the system bars.
Value is either 0 or a combination of the following:

See also:

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page