Stay organized with collections
Save and categorize content based on your preferences.
OnShowModeChangedListener
interface OnShowModeChangedListener
Listener for changes in the soft keyboard show mode.
Summary
Public methods |
abstract Unit |
Called when the soft keyboard behavior changes.
|
Public methods
onShowModeChanged
abstract fun onShowModeChanged(
controller: AccessibilityService.SoftKeyboardController,
showMode: Int
): Unit
Called when the soft keyboard behavior changes. The default show mode is SHOW_MODE_AUTO
, where the soft keyboard is shown when a text input field is focused. An AccessibilityService can also request the show mode SHOW_MODE_HIDDEN
, where the soft keyboard is never shown.
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-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AccessibilityService.SoftKeyboardController.OnShowModeChangedListener\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnShowModeChangedListener\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/accessibilityservice/AccessibilityService.SoftKeyboardController.OnShowModeChangedListener \"View this page in Java\") \n\n```\ninterface OnShowModeChangedListener\n```\n\n|---------------------------------------------------------------------------------------------------------|\n| [android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener](#) |\n\nListener for changes in the soft keyboard show mode.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onShowModeChanged](#onShowModeChanged(android.accessibilityservice.AccessibilityService.SoftKeyboardController,%20kotlin.Int))`(`controller:` `[AccessibilityService.SoftKeyboardController](/reference/kotlin/android/accessibilityservice/AccessibilityService.SoftKeyboardController)`, `showMode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when the soft keyboard behavior changes. |\n\nPublic methods\n--------------\n\n### onShowModeChanged\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onShowModeChanged(\n controller: AccessibilityService.SoftKeyboardController, \n showMode: Int\n): Unit\n```\n\nCalled when the soft keyboard behavior changes. The default show mode is `SHOW_MODE_AUTO`, where the soft keyboard is shown when a text input field is focused. An AccessibilityService can also request the show mode `SHOW_MODE_HIDDEN`, where the soft keyboard is never shown.\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `controller` | [AccessibilityService.SoftKeyboardController](/reference/kotlin/android/accessibilityservice/AccessibilityService.SoftKeyboardController): the soft keyboard controller This value cannot be `null`. |\n| `showMode` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the current soft keyboard show mode Value is [android.accessibilityservice.AccessibilityService#SHOW_MODE_AUTO](/reference/kotlin/android/accessibilityservice/AccessibilityService#SHOW_MODE_AUTO:kotlin.Int), [android.accessibilityservice.AccessibilityService#SHOW_MODE_HIDDEN](/reference/kotlin/android/accessibilityservice/AccessibilityService#SHOW_MODE_HIDDEN:kotlin.Int), or [android.accessibilityservice.AccessibilityService#SHOW_MODE_IGNORE_HARD_KEYBOARD](/reference/kotlin/android/accessibilityservice/AccessibilityService#SHOW_MODE_IGNORE_HARD_KEYBOARD:kotlin.Int) |"]]