Example usage for Java android.view.inputmethod InputConnection fields, constructors, methods, implement or subclass
The text is from its open source code.
int | GET_TEXT_WITH_STYLES Flag for use with #getTextAfterCursor and #getTextBeforeCursor to have style information returned along with the text. |
int | GET_EXTRACTED_TEXT_MONITOR Flag for use with #getExtractedText to indicate you would like to receive updates when the extracted text changes. |
boolean | beginBatchEdit() Tell the editor that you are starting a batch of editor operations. |
boolean | clearMetaKeyStates(int states) Clear the given meta key pressed states in the given input connection. |
boolean | commitCompletion(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[]) . |
boolean | commitText(CharSequence text, int newCursorPosition) Commit text to the text box and set the new cursor position. |
boolean | deleteSurroundingText(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. |
boolean | endBatchEdit() Tell the editor that you are done with a batch edit previously initiated with #beginBatchEdit . |
boolean | finishComposingText() Have the text editor finish whatever composing text is currently active. |
int | getCursorCapsMode(int reqModes) Retrieve the current capitalization mode in effect at the current cursor position in the text. |
ExtractedText | getExtractedText(ExtractedTextRequest request, int flags) Retrieve the current text in the input connection's editor, and monitor for any changes to it. |
CharSequence | getTextAfterCursor(int n, int flags) Get n characters of text after the current cursor position. |
CharSequence | getTextBeforeCursor(int n, int flags) Get n characters of text before the current cursor position. |
boolean | performContextMenuAction(int id) Perform a context menu action on the field. |
boolean | performEditorAction(int editorAction) Have the editor perform an action it has said it can do. |
boolean | sendKeyEvent(KeyEvent event) Send a key event to the process that is currently attached through this input connection. |
boolean | setComposingText(CharSequence text, int newCursorPosition) Replace the currently composing text with the given text, and set the new cursor position. |
boolean | setSelection(int start, int end) Set the selection of the text editor. |