SystemBarStateMonitor


public 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 methods

void

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

Public constructors

SystemBarStateMonitor

public SystemBarStateMonitor(@NonNull 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
@NonNull Window window

the window that the ContrastProtections should be attached to.

Public methods

dispose

public void dispose()

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