Share via


IInputConnection.CommitCorrection(CorrectionInfo) Method

Definition

Commit a correction automatically performed on the raw user's input.

[Android.Runtime.Register("commitCorrection", "(Landroid/view/inputmethod/CorrectionInfo;)Z", "GetCommitCorrection_Landroid_view_inputmethod_CorrectionInfo_Handler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool CommitCorrection (Android.Views.InputMethods.CorrectionInfo? correctionInfo);
[<Android.Runtime.Register("commitCorrection", "(Landroid/view/inputmethod/CorrectionInfo;)Z", "GetCommitCorrection_Landroid_view_inputmethod_CorrectionInfo_Handler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member CommitCorrection : Android.Views.InputMethods.CorrectionInfo -> bool

Parameters

correctionInfo
CorrectionInfo

Detailed information about the correction.

Returns

true on success, false if the input connection is no longer valid. Since Android android.os.Build.VERSION_CODES#N until android.os.Build.VERSION_CODES#TIRAMISU, this API returned false when the target application does not implement this method.

Attributes

Remarks

Commit a correction automatically performed on the raw user's input. A typical example would be to correct typos using a dictionary.

Calling this method will cause the editor to call android.inputmethodservice.InputMethodService#onUpdateSelection(int, int, int, int, int, int) on the current IME after the batch input is over. <strong>Editor authors</strong>, for this to happen you need to make the changes known to the input method by calling InputMethodManager#updateSelection(View, int, int, int, int), but be careful to wait until the batch edit is over if one is in progress.

Java documentation for android.view.inputmethod.InputConnection.commitCorrection(android.view.inputmethod.CorrectionInfo).

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