Added in API level 34

OnWindowVisibilityChangeListener


interface OnWindowVisibilityChangeListener
android.view.ViewTreeObserver.OnWindowVisibilityChangeListener

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

Summary

Public methods
abstract Unit

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

Public methods

onWindowVisibilityChanged

Added in API level 34
abstract fun onWindowVisibilityChanged(visibility: Int): Unit

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

Parameters
visibility Int: The new visibility of the window. Value is android.view.View#VISIBLE, android.view.View#INVISIBLE, or android.view.View#GONE