Android 12 Developer Preview is here! Try it out, and give us your feedback!

WindowInsetsControllerCompat.OnControllableInsetsChangedListener

public static interface WindowInsetsControllerCompat.OnControllableInsetsChangedListener

androidx.core.view.WindowInsetsControllerCompat.OnControllableInsetsChangedListener


Listener to be notified when the set of controllable WindowInsetsCompat.Type controlled by a WindowInsetsController changes.

Once a WindowInsetsCompat.Type becomes controllable, the app will be able to control the window that is causing this type of insets by calling WindowInsetsControllerCompat.controlWindowInsetsAnimation(int, long, Interpolator, CancellationSignal, WindowInsetsAnimationControlListenerCompat).

Note: When listening to cancellability of the WindowInsets.Type.ime(), WindowInsetsControllerCompat.controlWindowInsetsAnimation(int, long, Interpolator, CancellationSignal, WindowInsetsAnimationControlListenerCompat) may still fail in case the InputMethodService decides to cancel the show request. This could happen when there is a hardware keyboard attached.

Summary

Public methods

abstract void onControllableInsetsChanged(WindowInsetsControllerCompat controller, int typeMask)

Called when the set of controllable WindowInsetsCompat.Type changes.

Public methods

onControllableInsetsChanged

public abstract void onControllableInsetsChanged (WindowInsetsControllerCompat controller, 
                int typeMask)

Called when the set of controllable WindowInsetsCompat.Type changes.

Parameters
controller WindowInsetsControllerCompat: The controller for which the set of controllable WindowInsetsCompat.Types are changing.

typeMask int: Bitwise behavior type-mask of the WindowInsetsCompat.Types the controller is currently able to control.