Java android.view.inputmethod InputConnection fields, constructors, methods, implement or subclass

Example usage for Java android.view.inputmethod InputConnection fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.view.inputmethod InputConnection.

The text is from its open source code.

Field

intGET_TEXT_WITH_STYLES
Flag for use with #getTextAfterCursor and #getTextBeforeCursor to have style information returned along with the text.
intGET_EXTRACTED_TEXT_MONITOR
Flag for use with #getExtractedText to indicate you would like to receive updates when the extracted text changes.

Constructor

Method

booleanbeginBatchEdit()
Tell the editor that you are starting a batch of editor operations.
booleanclearMetaKeyStates(int states)
Clear the given meta key pressed states in the given input connection.
booleancommitCompletion(CompletionInfo text)
Commit a completion the user has selected from the possible ones previously reported to InputMethodSession#displayCompletions InputMethodSession#displayCompletions(CompletionInfo[]) or InputMethodManager#displayCompletions InputMethodManager#displayCompletions(View, CompletionInfo[]) .
booleancommitText(CharSequence text, int newCursorPosition)
Commit text to the text box and set the new cursor position.
booleandeleteSurroundingText(int beforeLength, int afterLength)
Delete beforeLength characters of text before the current cursor position, and delete afterLength characters of text after the current cursor position, excluding the selection.
booleanendBatchEdit()
Tell the editor that you are done with a batch edit previously initiated with #beginBatchEdit .
booleanfinishComposingText()
Have the text editor finish whatever composing text is currently active.
intgetCursorCapsMode(int reqModes)
Retrieve the current capitalization mode in effect at the current cursor position in the text.
ExtractedTextgetExtractedText(ExtractedTextRequest request, int flags)
Retrieve the current text in the input connection's editor, and monitor for any changes to it.
CharSequencegetTextAfterCursor(int n, int flags)
Get n characters of text after the current cursor position.
CharSequencegetTextBeforeCursor(int n, int flags)
Get n characters of text before the current cursor position.
booleanperformContextMenuAction(int id)
Perform a context menu action on the field.
booleanperformEditorAction(int editorAction)
Have the editor perform an action it has said it can do.
booleansendKeyEvent(KeyEvent event)
Send a key event to the process that is currently attached through this input connection.
booleansetComposingText(CharSequence text, int newCursorPosition)
Replace the currently composing text with the given text, and set the new cursor position.
booleansetSelection(int start, int end)
Set the selection of the text editor.