다음을 통해 공유


IInputConnection.EndBatchEdit Method

Definition

Tell the editor that you are done with a batch edit previously initiated with #beginBatchEdit().

[Android.Runtime.Register("endBatchEdit", "()Z", "GetEndBatchEditHandler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool EndBatchEdit ();
[<Android.Runtime.Register("endBatchEdit", "()Z", "GetEndBatchEditHandler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member EndBatchEdit : unit -> bool

Returns

For editor authors, you must return true if a batch edit is still in progress after closing the latest one (in other words, if the nesting count is still a positive number). Return false otherwise. For IME authors, you will always receive true as long as the request was sent to the editor, and receive false only if the input connection is no longer valid.

Attributes

Remarks

Tell the editor that you are done with a batch edit previously initiated with #beginBatchEdit(). This ends the latest batch only.

<strong>IME authors:</strong> make sure you call this exactly once for each call to #beginBatchEdit().

<strong>Editor authors:</strong> please be careful about batch edit nesting. Updates still to be held back until the end of the last batch edit. In case you are delegating this API call to the one obtained from android.widget.EditText#onCreateInputConnection(EditorInfo), there was an off-by-one that had returned true when its nested batch edit count becomes 0 as a result of invoking this API. This bug is fixed in android.os.Build.VERSION_CODES#TIRAMISU.

Java documentation for android.view.inputmethod.InputConnection.endBatchEdit().

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