Język

InputConnectionWrapper.DeleteSurroundingTextInCodePoints(Int32, Int32) Method

Definition

A variant of deleteSurroundingText(int, int).

[Android.Runtime.Register("deleteSurroundingTextInCodePoints", "(II)Z", "GetDeleteSurroundingTextInCodePoints_IIHandler", ApiSince=24)]
public virtual bool DeleteSurroundingTextInCodePoints(int beforeLength, int afterLength);
[<Android.Runtime.Register("deleteSurroundingTextInCodePoints", "(II)Z", "GetDeleteSurroundingTextInCodePoints_IIHandler", ApiSince=24)>]
abstract member DeleteSurroundingTextInCodePoints : int * int -> bool
override this.DeleteSurroundingTextInCodePoints : int * int -> bool

Parameters

beforeLength
Int32

The number of characters before the cursor to be deleted, in code points. If this is greater than the number of existing characters between the beginning of the text and the cursor, then this method does not fail but deletes all the characters in that range.

afterLength
Int32

The number of characters after the cursor to be deleted, in code points. If this is greater than the number of existing characters between the cursor and the end of the text, then this method does not fail but deletes all the characters in that range.

Returns

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

Implements

Attributes

Remarks

A variant of deleteSurroundingText(int, int). Major differences are: The lengths are supplied in code points, not in Java chars or in glyphs; This method does nothing if there are one or more invalid surrogate pairs in the requested range.

Java documentation for android.view.inputmethod.InputConnectionWrapper.deleteSurroundingTextInCodePoints(int, 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