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

# ViewTreeObserver.OnWindowVisibilityChangeListener

*** ** * ** ***


`
public
static


interface
ViewTreeObserver.OnWindowVisibilityChangeListener
`


`


`

|---|
| android.view.ViewTreeObserver.OnWindowVisibilityChangeListener |

<br />

*** ** * ** ***

Interface definition for a callback to be invoked when the view hierarchy's window
visibility changes.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/view/ViewTreeObserver.OnWindowVisibilityChangeListener#onWindowVisibilityChanged(int)(int visibility) ` Callback method to be invoked when the window visibility changes in the view tree. |

## Public methods

### onWindowVisibilityChanged

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

```
public abstract void onWindowVisibilityChanged (int visibility)
```

Callback method to be invoked when the window visibility changes in the view tree.

<br />

| Parameters ||
|---|---|
| `visibility` | `int`: The new visibility of the window. Value is one of the following: - `https://developer.android.com/reference/android/view/View#VISIBLE` - `https://developer.android.com/reference/android/view/View#INVISIBLE` - `https://developer.android.com/reference/android/view/View#GONE` |