语言

InputConnectionWrapper.DeleteSurroundingText(Int32, Int32) 方法

定义

删除当前光标位置前文本的 BeforeLength 字符,在当前光标位置后删除文本的后面字符,不包括所选内容。

[Android.Runtime.Register("deleteSurroundingText", "(II)Z", "GetDeleteSurroundingText_IIHandler")]
public virtual bool DeleteSurroundingText(int beforeLength, int afterLength);
[<Android.Runtime.Register("deleteSurroundingText", "(II)Z", "GetDeleteSurroundingText_IIHandler")>]
abstract member DeleteSurroundingText : int * int -> bool
override this.DeleteSurroundingText : int * int -> bool

参数

beforeLength
Int32

在当前游标位置之前要删除的字符数。

afterLength
Int32

当前游标位置之后要删除的字符数。

返回

目标连接返回的值。

实现

特性

注解

删除当前光标位置前文本的 BeforeLength 字符,在当前光标位置后删除文本的后面字符,不包括所选内容。 在引用字符串中字符的顺序之前和之后,而不是其视觉表示形式:这意味着你不必找出文本的方向,并且只能使用索引 as-is。

Java文档android.view.inputmethod.InputConnectionWrapper.deleteSurroundingText(int, int)。

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于