AccessibilityService.SoftKeyboardController
public
static
final
class
AccessibilityService.SoftKeyboardController
extends Object
| java.lang.Object | |
| ↳ | android.accessibilityservice.AccessibilityService.SoftKeyboardController |
Used to control and query the soft keyboard show mode.
Summary
Nested classes | |
|---|---|
interface |
AccessibilityService.SoftKeyboardController.OnShowModeChangedListener
Listener for changes in the soft keyboard show mode. |
Public methods | |
|---|---|
void
|
addOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener, Handler handler)
Adds the specified change listener to the list of soft keyboard show mode change listeners. |
void
|
addOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
Adds the specified change listener to the list of show mode change listeners. |
int
|
getShowMode()
Returns the show mode of the soft keyboard. |
boolean
|
removeOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
Removes the specified change listener from the list of keyboard show mode change listeners. |
boolean
|
setShowMode(int showMode)
Sets the soft keyboard show mode. |
Inherited methods | |
|---|---|
From
class
java.lang.Object
| |
Public methods
addOnShowModeChangedListener
void addOnShowModeChangedListener (AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener, Handler handler)
Adds the specified change listener to the list of soft keyboard show mode change
listeners. The callback will occur on the specified Handler's thread, or on the
services's main thread if the handler is null.
| Parameters | |
|---|---|
listener |
AccessibilityService.SoftKeyboardController.OnShowModeChangedListener: the listener to add, must be non-null |
handler |
Handler: the handler on which to callback should execute, or null to
execute on the service's main thread
|
addOnShowModeChangedListener
void addOnShowModeChangedListener (AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
Adds the specified change listener to the list of show mode change listeners. The callback will occur on the service's main thread. Listener is not called on registration.
| Parameters | |
|---|---|
listener |
AccessibilityService.SoftKeyboardController.OnShowModeChangedListener This value must never be |
getShowMode
int getShowMode ()
Returns the show mode of the soft keyboard. 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.
| Returns | |
|---|---|
int |
the current soft keyboard show mode |
removeOnShowModeChangedListener
boolean removeOnShowModeChangedListener (AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
Removes the specified change listener from the list of keyboard show mode change listeners.
| Parameters | |
|---|---|
listener |
AccessibilityService.SoftKeyboardController.OnShowModeChangedListener: the listener to remove, must be non-null |
| Returns | |
|---|---|
boolean |
true if the listener was removed, false otherwise
|
setShowMode
boolean setShowMode (int showMode)
Sets the soft keyboard show mode. 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. The
The lastto this method will be honored, regardless of any previous calls (including those
made by other AccessibilityServices).
Note: If the service is not yet connected (e.g.
onServiceConnected() has not yet been called) or the
service has been disconnected, this method will have no effect and return false.
| Parameters | |
|---|---|
showMode |
int: the new show mode for the soft keyboard |
| Returns | |
|---|---|
boolean |
true on success
|
Interfaces
Classes
- AccessibilityButtonController
- AccessibilityButtonController.AccessibilityButtonCallback
- AccessibilityService
- AccessibilityService.GestureResultCallback
- AccessibilityService.MagnificationController
- AccessibilityService.SoftKeyboardController
- AccessibilityServiceInfo
- FingerprintGestureController
- FingerprintGestureController.FingerprintGestureCallback
- GestureDescription
- GestureDescription.Builder
- GestureDescription.StrokeDescription
Follow Google Developers on WeChat
Browse this site in ?
(Sep 2017 survey)

