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_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

  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

  Modifier and Type
  Method
  Description
  `boolean`
  `beginBatchEdit()`
  `boolean`
  `clearMetaKeyStates(int states)`
  `void`
  `closeConnection()`
  `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`
  `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, 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

    public Editable getEditable()
    Overrides:
      `getEditable` in class `BaseInputConnection`

  - ### beginBatchEdit

    public boolean beginBatchEdit()
    Specified by:
      `beginBatchEdit` in interface `InputConnection`
    Overrides:
      `beginBatchEdit` in class `BaseInputConnection`

  - ### endBatchEdit

    public boolean endBatchEdit()
    Specified by:
      `endBatchEdit` in interface `InputConnection`
    Overrides:
      `endBatchEdit` in class `BaseInputConnection`

  - ### commitText

    public boolean commitText(CharSequence text, int newCursorPosition)
    Specified by:
      `commitText` in interface `InputConnection`
    Overrides:
      `commitText` in class `BaseInputConnection`

  - ### deleteSurroundingText

    public boolean deleteSurroundingText(int beforeLength, int afterLength)
    Specified by:
      `deleteSurroundingText` in interface `InputConnection`
    Overrides:
      `deleteSurroundingText` in class `BaseInputConnection`

  - ### deleteSurroundingTextInCodePoints

    public boolean deleteSurroundingTextInCodePoints(int beforeLength, int afterLength)
    Specified by:
      `deleteSurroundingTextInCodePoints` in interface `InputConnection`
    Overrides:
      `deleteSurroundingTextInCodePoints` in class `BaseInputConnection`

  - ### setComposingRegion

    public boolean setComposingRegion(int start, int end)
    Specified by:
      `setComposingRegion` in interface `InputConnection`
    Overrides:
      `setComposingRegion` in class `BaseInputConnection`

  - ### setComposingText

    public boolean setComposingText(CharSequence text, int newCursorPosition)
    Specified by:
      `setComposingText` in interface `InputConnection`
    Overrides:
      `setComposingText` in class `BaseInputConnection`

  - ### finishComposingText

    public boolean finishComposingText()
    Specified by:
      `finishComposingText` in interface `InputConnection`
    Overrides:
      `finishComposingText` in class `BaseInputConnection`

  - ### getExtractedText

    public ExtractedText getExtractedText(ExtractedTextRequest request, int flags)
    Specified by:
      `getExtractedText` in interface `InputConnection`
    Overrides:
      `getExtractedText` in class `BaseInputConnection`

  - ### requestCursorUpdates

    public boolean requestCursorUpdates(int cursorUpdateMode)
    Specified by:
      `requestCursorUpdates` in interface `InputConnection`
    Overrides:
      `requestCursorUpdates` in class `BaseInputConnection`

  - ### clearMetaKeyStates

    public boolean clearMetaKeyStates(int states)
    Specified by:
      `clearMetaKeyStates` in interface `InputConnection`
    Overrides:
      `clearMetaKeyStates` in class `BaseInputConnection`

  - ### closeConnection

    public void closeConnection()
    Specified by:
      `closeConnection` in interface `InputConnection`
    Overrides:
      `closeConnection` in class `BaseInputConnection`

  - ### setSelection

    public boolean setSelection(int start, int end)
    Specified by:
      `setSelection` in interface `InputConnection`
    Overrides:
      `setSelection` in class `BaseInputConnection`

  - ### sendKeyEvent

    public boolean sendKeyEvent(KeyEvent event)
    Specified by:
      `sendKeyEvent` in interface `InputConnection`
    Overrides:
      `sendKeyEvent` in class `BaseInputConnection`

  - ### handleKeyEvent

    public boolean handleKeyEvent(KeyEvent event)

  - ### performContextMenuAction

    public boolean performContextMenuAction(int id)
    Specified by:
      `performContextMenuAction` in interface `InputConnection`
    Overrides:
      `performContextMenuAction` in class `BaseInputConnection`

  - ### performPrivateCommand

    public boolean performPrivateCommand(String action, Bundle data)
    Specified by:
      `performPrivateCommand` in interface `InputConnection`
    Overrides:
      `performPrivateCommand` in class `BaseInputConnection`

  - ### performEditorAction

    public boolean performEditorAction(int actionCode)
    Specified by:
      `performEditorAction` in interface `InputConnection`
    Overrides:
      `performEditorAction` in class `BaseInputConnection`

  - ### commitContent

    @RequiresApi(25) public boolean commitContent(InputContentInfo inputContentInfo, int flags, Bundle opts)
    Specified by:
      `commitContent` in interface `InputConnection`
    Overrides:
      `commitContent` in class `BaseInputConnection`

  - ### didChangeEditingState

    public void didChangeEditingState(boolean textChanged, boolean selectionChanged, boolean composingRegionChanged)