BaseInputConnection.CommitText Method

Definition

Overloads

CommitText(ICharSequence, Int32)

Default implementation replaces any existing composing text with the given text.

CommitText(String, Int32)

Default implementation replaces any existing composing text with the given text.

CommitText(ICharSequence, Int32)

Default implementation replaces any existing composing text with the given text.

[Android.Runtime.Register("commitText", "(Ljava/lang/CharSequence;I)Z", "GetCommitText_Ljava_lang_CharSequence_IHandler")]
public virtual bool CommitText (Java.Lang.ICharSequence? text, int newCursorPosition);
[<Android.Runtime.Register("commitText", "(Ljava/lang/CharSequence;I)Z", "GetCommitText_Ljava_lang_CharSequence_IHandler")>]
abstract member CommitText : Java.Lang.ICharSequence * int -> bool
override this.CommitText : Java.Lang.ICharSequence * int -> bool

Parameters

text
ICharSequence

The text to commit. This may include styles.

newCursorPosition
Int32

The new cursor position around the text, in Java characters. If > 0, this is relative to the end of the text - 1; if <= 0, this is relative to the start of the text. So a value of 1 will always advance the cursor to the position after the full text being inserted. Note that this means you can't position the cursor within the text, because the editor can make modifications to the text you are providing so it is not possible to correctly specify locations there.

Returns

Implements

Attributes

Remarks

Default implementation replaces any existing composing text with the given text. In addition, only if fallback mode, a key event is sent for the new text and the current editable buffer cleared.

Java documentation for android.view.inputmethod.BaseInputConnection.commitText(java.lang.CharSequence, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CommitText(String, Int32)

Default implementation replaces any existing composing text with the given text.

public bool CommitText (string? text, int newCursorPosition);
member this.CommitText : string * int -> bool

Parameters

text
String
newCursorPosition
Int32

Returns

Remarks

Default implementation replaces any existing composing text with the given text. In addition, only if fallback mode, a key event is sent for the new text and the current editable buffer cleared.

Java documentation for android.view.inputmethod.BaseInputConnection.commitText(java.lang.CharSequence, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to