Package io.flutter.plugin.editing
Class InputConnectionAdaptor
java.lang.Object
android.view.inputmethod.BaseInputConnection
io.flutter.plugin.editing.InputConnectionAdaptor
- All Implemented Interfaces:
InputConnection
-
Nested Class Summary
-
Field Summary
Fields inherited from interface android.view.inputmethod.InputConnection
CURSOR_UPDATE_FILTER_CHARACTER_BOUNDS, CURSOR_UPDATE_FILTER_EDITOR_BOUNDS, CURSOR_UPDATE_FILTER_INSERTION_MARKER, CURSOR_UPDATE_FILTER_TEXT_APPEARANCE, CURSOR_UPDATE_FILTER_VISIBLE_LINE_BOUNDS, CURSOR_UPDATE_IMMEDIATE, CURSOR_UPDATE_MONITOR, GET_EXTRACTED_TEXT_MONITOR, GET_TEXT_WITH_STYLES, HANDWRITING_GESTURE_RESULT_CANCELLED, HANDWRITING_GESTURE_RESULT_FAILED, HANDWRITING_GESTURE_RESULT_FALLBACK, HANDWRITING_GESTURE_RESULT_SUCCESS, HANDWRITING_GESTURE_RESULT_UNKNOWN, HANDWRITING_GESTURE_RESULT_UNSUPPORTED, INPUT_CONTENT_GRANT_READ_URI_PERMISSION
-
Constructor Summary
ConstructorDescriptionInputConnectionAdaptor
(View view, int client, TextInputChannel textInputChannel, InputConnectionAdaptor.KeyboardDelegate keyboardDelegate, io.flutter.plugin.editing.ListenableEditingState editable, EditorInfo editorInfo) InputConnectionAdaptor
(View view, int client, TextInputChannel textInputChannel, InputConnectionAdaptor.KeyboardDelegate keyboardDelegate, io.flutter.plugin.editing.ListenableEditingState editable, EditorInfo editorInfo, FlutterJNI flutterJNI) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
clearMetaKeyStates
(int states) void
boolean
commitContent
(InputContentInfo inputContentInfo, int flags, Bundle opts) boolean
commitText
(CharSequence text, int newCursorPosition) boolean
deleteSurroundingText
(int beforeLength, int afterLength) boolean
deleteSurroundingTextInCodePoints
(int beforeLength, int afterLength) void
didChangeEditingState
(boolean textChanged, boolean selectionChanged, boolean composingRegionChanged) boolean
boolean
getExtractedText
(ExtractedTextRequest request, int flags) boolean
handleKeyEvent
(KeyEvent event) boolean
performContextMenuAction
(int id) boolean
performEditorAction
(int actionCode) boolean
performPrivateCommand
(String action, Bundle data) boolean
requestCursorUpdates
(int cursorUpdateMode) boolean
sendKeyEvent
(KeyEvent event) boolean
setComposingRegion
(int start, int end) boolean
setComposingText
(CharSequence text, int newCursorPosition) boolean
setSelection
(int start, int end) Methods inherited from class android.view.inputmethod.BaseInputConnection
commitCompletion, commitCorrection, getComposingSpanEnd, getComposingSpanStart, getCursorCapsMode, getHandler, getSelectedText, getSurroundingText, getTextAfterCursor, getTextBeforeCursor, removeComposingSpans, replaceText, reportFullscreenMode, setComposingSpans, takeSnapshot
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface android.view.inputmethod.InputConnection
commitText, performHandwritingGesture, performSpellCheck, previewHandwritingGesture, requestCursorUpdates, requestTextBoundsInfo, setComposingRegion, setComposingText, setImeConsumesInput
-
Constructor Details
-
InputConnectionAdaptor
public InputConnectionAdaptor(View view, int client, TextInputChannel textInputChannel, InputConnectionAdaptor.KeyboardDelegate keyboardDelegate, io.flutter.plugin.editing.ListenableEditingState editable, EditorInfo editorInfo, FlutterJNI flutterJNI) -
InputConnectionAdaptor
public InputConnectionAdaptor(View view, int client, TextInputChannel textInputChannel, InputConnectionAdaptor.KeyboardDelegate keyboardDelegate, io.flutter.plugin.editing.ListenableEditingState editable, EditorInfo editorInfo)
-
-
Method Details
-
getEditable
- Overrides:
getEditable
in classBaseInputConnection
-
beginBatchEdit
public boolean beginBatchEdit()- Specified by:
beginBatchEdit
in interfaceInputConnection
- Overrides:
beginBatchEdit
in classBaseInputConnection
-
endBatchEdit
public boolean endBatchEdit()- Specified by:
endBatchEdit
in interfaceInputConnection
- Overrides:
endBatchEdit
in classBaseInputConnection
-
commitText
- Specified by:
commitText
in interfaceInputConnection
- Overrides:
commitText
in classBaseInputConnection
-
deleteSurroundingText
public boolean deleteSurroundingText(int beforeLength, int afterLength) - Specified by:
deleteSurroundingText
in interfaceInputConnection
- Overrides:
deleteSurroundingText
in classBaseInputConnection
-
deleteSurroundingTextInCodePoints
public boolean deleteSurroundingTextInCodePoints(int beforeLength, int afterLength) - Specified by:
deleteSurroundingTextInCodePoints
in interfaceInputConnection
- Overrides:
deleteSurroundingTextInCodePoints
in classBaseInputConnection
-
setComposingRegion
public boolean setComposingRegion(int start, int end) - Specified by:
setComposingRegion
in interfaceInputConnection
- Overrides:
setComposingRegion
in classBaseInputConnection
-
setComposingText
- Specified by:
setComposingText
in interfaceInputConnection
- Overrides:
setComposingText
in classBaseInputConnection
-
finishComposingText
public boolean finishComposingText()- Specified by:
finishComposingText
in interfaceInputConnection
- Overrides:
finishComposingText
in classBaseInputConnection
-
getExtractedText
- Specified by:
getExtractedText
in interfaceInputConnection
- Overrides:
getExtractedText
in classBaseInputConnection
-
requestCursorUpdates
public boolean requestCursorUpdates(int cursorUpdateMode) - Specified by:
requestCursorUpdates
in interfaceInputConnection
- Overrides:
requestCursorUpdates
in classBaseInputConnection
-
clearMetaKeyStates
public boolean clearMetaKeyStates(int states) - Specified by:
clearMetaKeyStates
in interfaceInputConnection
- Overrides:
clearMetaKeyStates
in classBaseInputConnection
-
closeConnection
public void closeConnection()- Specified by:
closeConnection
in interfaceInputConnection
- Overrides:
closeConnection
in classBaseInputConnection
-
setSelection
public boolean setSelection(int start, int end) - Specified by:
setSelection
in interfaceInputConnection
- Overrides:
setSelection
in classBaseInputConnection
-
sendKeyEvent
- Specified by:
sendKeyEvent
in interfaceInputConnection
- Overrides:
sendKeyEvent
in classBaseInputConnection
-
handleKeyEvent
-
performContextMenuAction
public boolean performContextMenuAction(int id) - Specified by:
performContextMenuAction
in interfaceInputConnection
- Overrides:
performContextMenuAction
in classBaseInputConnection
-
performPrivateCommand
- Specified by:
performPrivateCommand
in interfaceInputConnection
- Overrides:
performPrivateCommand
in classBaseInputConnection
-
performEditorAction
public boolean performEditorAction(int actionCode) - Specified by:
performEditorAction
in interfaceInputConnection
- Overrides:
performEditorAction
in classBaseInputConnection
-
commitContent
@RequiresApi(25) public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts) - Specified by:
commitContent
in interfaceInputConnection
- Overrides:
commitContent
in classBaseInputConnection
-
didChangeEditingState
public void didChangeEditingState(boolean textChanged, boolean selectionChanged, boolean composingRegionChanged)
-