Package io.flutter.plugin.editing
Class InputConnectionAdaptor
- java.lang.Object
-
- android.view.inputmethod.BaseInputConnection
-
- io.flutter.plugin.editing.InputConnectionAdaptor
-
- All Implemented Interfaces:
InputConnection
public class InputConnectionAdaptor extends BaseInputConnection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
InputConnectionAdaptor.KeyboardDelegate
-
Field Summary
-
Fields inherited from interface android.view.inputmethod.InputConnection
CURSOR_UPDATE_IMMEDIATE, CURSOR_UPDATE_MONITOR, GET_EXTRACTED_TEXT_MONITOR, GET_TEXT_WITH_STYLES, INPUT_CONTENT_GRANT_READ_URI_PERMISSION
-
-
Constructor Summary
Constructors Constructor Description InputConnectionAdaptor(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
beginBatchEdit()
boolean
clearMetaKeyStates(int states)
void
closeConnection()
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
endBatchEdit()
boolean
finishComposingText()
Editable
getEditable()
ExtractedText
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, commitContent, commitCorrection, getComposingSpanEnd, getComposingSpanStart, getCursorCapsMode, getHandler, getSelectedText, getSurroundingText, getTextAfterCursor, getTextBeforeCursor, removeComposingSpans, reportFullscreenMode, setComposingSpans
-
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
performSpellCheck, setImeConsumesInput
-
-
-
-
Constructor Detail
-
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 Detail
-
getEditable
public Editable 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
public boolean commitText(CharSequence text, int newCursorPosition)
- 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
public boolean setComposingText(CharSequence text, int newCursorPosition)
- Specified by:
setComposingText
in interfaceInputConnection
- Overrides:
setComposingText
in classBaseInputConnection
-
finishComposingText
public boolean finishComposingText()
- Specified by:
finishComposingText
in interfaceInputConnection
- Overrides:
finishComposingText
in classBaseInputConnection
-
getExtractedText
public ExtractedText getExtractedText(ExtractedTextRequest request, int flags)
- 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
public boolean sendKeyEvent(KeyEvent event)
- Specified by:
sendKeyEvent
in interfaceInputConnection
- Overrides:
sendKeyEvent
in classBaseInputConnection
-
handleKeyEvent
public boolean handleKeyEvent(KeyEvent event)
-
performContextMenuAction
public boolean performContextMenuAction(int id)
- Specified by:
performContextMenuAction
in interfaceInputConnection
- Overrides:
performContextMenuAction
in classBaseInputConnection
-
performPrivateCommand
public boolean performPrivateCommand(String action, Bundle data)
- Specified by:
performPrivateCommand
in interfaceInputConnection
- Overrides:
performPrivateCommand
in classBaseInputConnection
-
performEditorAction
public boolean performEditorAction(int actionCode)
- Specified by:
performEditorAction
in interfaceInputConnection
- Overrides:
performEditorAction
in classBaseInputConnection
-
didChangeEditingState
public void didChangeEditingState(boolean textChanged, boolean selectionChanged, boolean composingRegionChanged)
-
-