Google 致力于为黑人社区推动种族平等。查看具体举措

OnControllableInsetsChangedListener

interface 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 controlWindowInsetsAnimation.

Note: When listening to cancellability of the WindowInsets.Type#ime, controlWindowInsetsAnimation 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 Unit

Called when the set of controllable WindowInsetsCompat.Type changes.

Public methods

onControllableInsetsChanged

abstract fun onControllableInsetsChanged(
    @NonNull controller: WindowInsetsControllerCompat,
    typeMask: Int
): Unit

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.