Added in API level 34

UiModeManager.ContrastChangeListener


public static interface UiModeManager.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 UiModeManager.addContrastChangeListener(Executor, ContrastChangeListener).

Summary

Public methods

abstract void onContrastChanged(float contrast)

Called when the color contrast enabled state changes.

Public methods

onContrastChanged

Added in API level 34
public abstract void onContrastChanged (float contrast)

Called when the color contrast enabled state changes.

Parameters
contrast float: The color contrast as in UiModeManager.getContrast() Value is between -1.0f and 1.0f inclusive