public static final class AccessibilityService.SoftKeyboardController extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
AccessibilityService.SoftKeyboardController.OnShowModeChangedListener
Listener for changes in the soft keyboard show mode.
|
Modifier and Type | Method and Description |
---|---|
void |
addOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
Adds the specified change listener to the list of show mode change listeners.
|
void |
addOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener,
Handler handler)
Adds the specified change listener to the list of soft keyboard show mode change
listeners.
|
int |
getShowMode()
Returns the show mode of the soft keyboard.
|
boolean |
removeOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
Removes all instances of the specified change listener from the list of magnification
change listeners.
|
boolean |
setShowMode(int showMode)
Sets the soft keyboard show mode.
|
public void addOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
public void addOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener, Handler handler)
Handler
's thread, or on the
services's main thread if the handler is null
.listener
- the listener to add, must be non-nullhandler
- the handler on which to callback should execute, or null
to
execute on the service's main threadpublic boolean removeOnShowModeChangedListener(AccessibilityService.SoftKeyboardController.OnShowModeChangedListener listener)
listener
- the listener to remove, must be non-nulltrue
if at least one instance of the listener was removedpublic int getShowMode()
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.public boolean setShowMode(int showMode)
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 conected (e.g.
AccessibilityService.onServiceConnected()
has not yet been called) or the
service has been disconnected, this method will hav no effect and return false
.
showMode
- the new show mode for the soft keyboardtrue
on success