Share via


IInputConnection.BeginBatchEdit Method

Definition

Tell the editor that you are starting a batch of editor operations.

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

Returns

true if a batch edit is now in progress, false otherwise. Since this method starts a batch edit, that means it will always return true unless the input connection is no longer valid.

Attributes

Remarks

Tell the editor that you are starting a batch of editor operations. The editor will try to avoid sending you updates about its state until #endBatchEdit is called. Batch edits nest.

<strong>IME authors:</strong> use this to avoid getting calls to android.inputmethodservice.InputMethodService#onUpdateSelection(int, int, int, int, int, int) corresponding to intermediate state. Also, use this to avoid flickers that may arise from displaying intermediate state. Be sure to call #endBatchEdit for each call to this, or you may block updates in the editor.

<strong>Editor authors:</strong> while a batch edit is in progress, take care not to send updates to the input method and not to update the display. IMEs use this intensively to this effect. Also please note that batch edits need to nest correctly.

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

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