Interface TextInputChannel.TextInputMethodHandler
- Enclosing class:
- TextInputChannel
public static interface TextInputChannel.TextInputMethodHandler
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
finishAutofillContext
(boolean shouldSave) Requests that theAutofillManager
cancel or commit the current autofill context.void
hide()
void
Requests that the autofill dropdown menu appear for the current client.void
sendAppPrivateCommand
(String action, Bundle data) Sends client app private command to the current text input client(input method).void
setClient
(int textInputClientId, TextInputChannel.Configuration configuration) void
setEditableSizeAndTransform
(double width, double height, double[] transform) Sets the size and the transform matrix of the current text input client.void
setEditingState
(TextInputChannel.TextEditState editingState) void
setPlatformViewClient
(int id, boolean usesVirtualDisplay) Sets a platform view as the text input client.void
show()
-
Method Details
-
show
void show() -
hide
void hide() -
requestAutofill
void requestAutofill()Requests that the autofill dropdown menu appear for the current client.Has no effect if the current client does not support autofill.
-
finishAutofillContext
void finishAutofillContext(boolean shouldSave) Requests that theAutofillManager
cancel or commit the current autofill context.The method calls
AutofillManager.commit()
whenshouldSave
is true, and callsAutofillManager.cancel()
otherwise.- Parameters:
shouldSave
- whether the active autofill service should save the current user input for future use.
-
setClient
-
setPlatformViewClient
void setPlatformViewClient(int id, boolean usesVirtualDisplay) Sets a platform view as the text input client.Subsequent calls to createInputConnection will be delegated to the platform view until a different client is set.
- Parameters:
id
- the ID of the platform view to be set as a text input client.usesVirtualDisplay
- True if the platform view uses a virtual display, false if it uses hybrid composition.
-
setEditableSizeAndTransform
void setEditableSizeAndTransform(double width, double height, @NonNull double[] transform) Sets the size and the transform matrix of the current text input client.- Parameters:
width
- the width of text input client. Must be finite.height
- the height of text input client. Must be finite.transform
- a 4x4 matrix that maps the local paint coordinate system to coordinate system of the FlutterView that owns the current client.
-
setEditingState
-
clearClient
void clearClient() -
sendAppPrivateCommand
Sends client app private command to the current text input client(input method). The app private command result will be informed throughperformPrivateCommand
.- Parameters:
action
- Name of the command to be performed. This must be a scoped name. i.e. prefixed with a package name you own, so that different developers will not create conflicting commands.data
- Any data to include with the command.
-