語言

BaseInputConnection.DeleteSurroundingTextInCodePoints(Int32, Int32) 方法

定義

預設實作會在可編輯文本當前選取位置附近進行刪除。

[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

參數

beforeLength
Int32

游標前要刪除的字元數,以碼點表示。 如果這個數值超過文字開頭與游標之間現有字元數,則此方法不會失敗,而是刪除該範圍內的所有字元。

afterLength
Int32

游標後要刪除的字元數,以碼點表示。 如果這個數值超過游標與文字結尾之間現有字元數,則此方法不會失敗,而是刪除該範圍內的所有字元。

傳回

實作

屬性

備註

預設實作會在可編輯文本當前選取位置附近進行刪除。

的 android.view.inputmethod.BaseInputConnection.deleteSurroundingTextInCodePoints(int, int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於