Stay organized with collections
Save and categorize content based on your preferences.
HighContrastTextStateChangeListener
interface HighContrastTextStateChangeListener
Listener for the system high contrast text state. To listen for changes to the high contrast text state on the device, implement this interface and register it with the system by calling addHighContrastTextStateChangeListener
.
Summary
Public methods |
abstract Unit |
Called when the high contrast text enabled state changes.
|
Public methods
onHighContrastTextStateChanged
abstract fun onHighContrastTextStateChanged(enabled: Boolean): Unit
Called when the high contrast text enabled state changes.
Parameters |
enabled |
Boolean: Whether high contrast text is enabled. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[null,null,["Last updated 2025-03-13 UTC."],[],[],null,["# AccessibilityManager.HighContrastTextStateChangeListener\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nHighContrastTextStateChangeListener\n===================================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/accessibility/AccessibilityManager.HighContrastTextStateChangeListener \"View this page in Java\") \n\n```\ninterface HighContrastTextStateChangeListener\n```\n\n|------------------------------------------------------------------------------------------|\n| [android.view.accessibility.AccessibilityManager.HighContrastTextStateChangeListener](#) |\n\nListener for the system high contrast text state. To listen for changes to the high contrast text state on the device, implement this interface and register it with the system by calling [addHighContrastTextStateChangeListener](/reference/kotlin/android/view/accessibility/AccessibilityManager#addHighContrastTextStateChangeListener(java.util.concurrent.Executor,%20android.view.accessibility.AccessibilityManager.HighContrastTextStateChangeListener)).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onHighContrastTextStateChanged](#onHighContrastTextStateChanged(kotlin.Boolean))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the high contrast text enabled state changes. |\n\nPublic methods\n--------------\n\n### onHighContrastTextStateChanged\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onHighContrastTextStateChanged(enabled: Boolean): Unit\n```\n\nCalled when the high contrast text enabled state changes.\n\n| Parameters ||\n|-----------|----------------------------------------------------------------------------------------------------------------------------|\n| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether high contrast text is enabled. |"]]