SystemBarStateMonitor


class SystemBarStateMonitor


Monitors and provides necessary information of system bars that need to be protected by ContrastProtection. This is used to create ProtectionView.

Summary

Public constructors

Creates an instance of SystemBarState associating with a window.

Public functions

Unit

Removes all the objects added by this class from the associated window.

Public constructors

SystemBarStateMonitor

SystemBarStateMonitor(window: Window)

Creates an instance of SystemBarState associating with a window. This should be called before the window is attached to window manager. Otherwise, it might miss callbacks of onApplyWindowInsets.

Parameters
window: Window

the window that the ContrastProtections should be attached to.

Public functions

dispose

fun dispose(): Unit

Removes all the objects added by this class from the associated window.