public class TextInputPlugin extends Object
Constructor and Description |
---|
TextInputPlugin(View view,
TextInputChannel textInputChannel,
PlatformViewsController platformViewsController) |
Modifier and Type | Method and Description |
---|---|
void |
autofill(SparseArray<AutofillValue> values) |
void |
clearPlatformViewClient(int platformViewId)
Clears a platform view text input client if it is the current input target.
|
InputConnection |
createInputConnection(View view,
EditorInfo outAttrs) |
void |
destroy()
Detaches the text input plugin from the platform views controller.
|
void |
didChangeEditingState(boolean textChanged,
boolean selectionChanged,
boolean composingRegionChanged) |
InputMethodManager |
getInputMethodManager() |
AndroidKeyProcessor |
getKeyEventProcessor() |
InputConnection |
getLastInputConnection() |
void |
lockPlatformViewInputConnection()
Use the current platform view input connection until unlockPlatformViewInputConnection is
called.
|
void |
onProvideAutofillVirtualStructure(ViewStructure structure,
int flags) |
void |
sendTextInputAppPrivateCommand(String action,
Bundle data) |
void |
setKeyEventProcessor(AndroidKeyProcessor processor) |
void |
unlockPlatformViewInputConnection()
Unlocks the input connection.
|
public TextInputPlugin(View view, @NonNull TextInputChannel textInputChannel, @NonNull PlatformViewsController platformViewsController)
@NonNull public InputMethodManager getInputMethodManager()
@NonNull public AndroidKeyProcessor getKeyEventProcessor()
public void setKeyEventProcessor(AndroidKeyProcessor processor)
public void lockPlatformViewInputConnection()
The current input connection instance is cached and any following call to @{link createInputConnection} returns the cached connection until unlockPlatformViewInputConnection is called.
This is a no-op if the current input target isn't a platform view.
This is used to preserve an input connection when moving a platform view from one virtual display to another.
public void unlockPlatformViewInputConnection()
See also: @{link lockPlatformViewInputConnection}.
public void destroy()
The TextInputPlugin instance should not be used after calling this.
public InputConnection createInputConnection(View view, EditorInfo outAttrs)
@Nullable public InputConnection getLastInputConnection()
public void clearPlatformViewClient(int platformViewId)
This is called when a platform view is disposed to make sure we're not hanging to a stale input connection.
public void sendTextInputAppPrivateCommand(String action, Bundle data)
public void didChangeEditingState(boolean textChanged, boolean selectionChanged, boolean composingRegionChanged)
public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags)
public void autofill(SparseArray<AutofillValue> values)