Added in API level 34
ContrastChangeListener
interface ContrastChangeListener
android.app.UiModeManager.ContrastChangeListener |
Listener for the UI contrast. To listen for changes to the UI contrast on the device, implement this interface and register it with the system by calling addContrastChangeListener
.
Summary
Public methods | |
---|---|
abstract Unit |
onContrastChanged(contrast: Float) Called when the color contrast enabled state changes. |
Public methods
onContrastChanged
Added in API level 34
abstract fun onContrastChanged(contrast: Float): Unit
Called when the color contrast enabled state changes.
Parameters | |
---|---|
contrast |
Float: The color contrast as in getContrast Value is between -1.0f and 1.0f inclusive |