# WindowInsetsController.OnControllableInsetsChangedListener

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# WindowInsetsController.OnControllableInsetsChangedListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/view/WindowInsetsController.OnControllableInsetsChangedListener "View this page in Kotlin")\|Java

`
public
static


interface
WindowInsetsController.OnControllableInsetsChangedListener
`  
`


`

|-------------------------------------------------------------------------|
| android.view.WindowInsetsController.OnControllableInsetsChangedListener |

<br />

*** ** * ** ***

Listener to be notified when the set of controllable[WindowInsets.Type](https://developer.android.com/reference/android/view/WindowInsets.Type)controlled by a[WindowInsetsController](https://developer.android.com/reference/android/view/WindowInsetsController)changes.

Once a[WindowInsets.Type](https://developer.android.com/reference/android/view/WindowInsets.Type)becomes controllable, the app will be able to control the window that is causing this type of insets by calling[WindowInsetsController.controlWindowInsetsAnimation(int, long, Interpolator, CancellationSignal, WindowInsetsAnimationControlListener)](https://developer.android.com/reference/android/view/WindowInsetsController#controlWindowInsetsAnimation(int,%20long,%20android.view.animation.Interpolator,%20android.os.CancellationSignal,%20android.view.WindowInsetsAnimationControlListener)).

Note: When listening to controllability of the[Type.ime](https://developer.android.com/reference/android/view/WindowInsets.Type#ime()),[WindowInsetsController.controlWindowInsetsAnimation(int, long, Interpolator, CancellationSignal, WindowInsetsAnimationControlListener)](https://developer.android.com/reference/android/view/WindowInsetsController#controlWindowInsetsAnimation(int,%20long,%20android.view.animation.Interpolator,%20android.os.CancellationSignal,%20android.view.WindowInsetsAnimationControlListener))may still fail in case the[InputMethodService](https://developer.android.com/reference/android/inputmethodservice/InputMethodService)decides to cancel the show request. This could happen when there is a hardware keyboard attached.  
**See also:**

- [WindowInsetsController.addOnControllableInsetsChangedListener(OnControllableInsetsChangedListener)](https://developer.android.com/reference/android/view/WindowInsetsController#addOnControllableInsetsChangedListener(android.view.WindowInsetsController.OnControllableInsetsChangedListener))
- [WindowInsetsController.removeOnControllableInsetsChangedListener(OnControllableInsetsChangedListener)](https://developer.android.com/reference/android/view/WindowInsetsController#removeOnControllableInsetsChangedListener(android.view.WindowInsetsController.OnControllableInsetsChangedListener))

## Summary

|                                                                                                                                                                                                                                                   ### Public methods                                                                                                                                                                                                                                                    ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onControllableInsetsChanged](https://developer.android.com/reference/android/view/WindowInsetsController.OnControllableInsetsChangedListener#onControllableInsetsChanged(android.view.WindowInsetsController,%20int))`(`[WindowInsetsController](https://developer.android.com/reference/android/view/WindowInsetsController)` controller, int typeMask) ` Called when the set of controllable[WindowInsets.Type](https://developer.android.com/reference/android/view/WindowInsets.Type)changes. |

## Public methods

### onControllableInsetsChanged

Added in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onControllableInsetsChanged (WindowInsetsController controller, 
                int typeMask)
```

Called when the set of controllable[WindowInsets.Type](https://developer.android.com/reference/android/view/WindowInsets.Type)changes.

<br />

|                                                                                                                                                                                                                                                                                                                                  Parameters                                                                                                                                                                                                                                                                                                                                  ||
|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `controller` | `WindowInsetsController`: The controller for which the set of controllable[WindowInsets.Type](https://developer.android.com/reference/android/view/WindowInsets.Type)s are changing. This value cannot be`null`. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `typeMask`   | `int`: Bitwise type-mask of the[WindowInsets.Type](https://developer.android.com/reference/android/view/WindowInsets.Type)s the controller is currently able to control. Value is either`0`or a combination of android.view.WindowInsets.Type.STATUS_BARS, android.view.WindowInsets.Type.NAVIGATION_BARS, android.view.WindowInsets.Type.CAPTION_BAR, android.view.WindowInsets.Type.IME, android.view.WindowInsets.Type.SYSTEM_GESTURES, android.view.WindowInsets.Type.MANDATORY_SYSTEM_GESTURES, android.view.WindowInsets.Type.TAPPABLE_ELEMENT, android.view.WindowInsets.Type.DISPLAY_CUTOUT, and android.view.WindowInsets.Type.SYSTEM_OVERLAYS <br /> |