Layout.GetLineForOffset(Int32) 方法

定义

获取显示指定文本偏移的行号。

[Android.Runtime.Register("getLineForOffset", "(I)I", "GetGetLineForOffset_IHandler")]
public virtual int GetLineForOffset(int offset);
[<Android.Runtime.Register("getLineForOffset", "(I)I", "GetGetLineForOffset_IHandler")>]
abstract member GetLineForOffset : int -> int
override this.GetLineForOffset : int -> int

参数

offset
Int32

返回

属性

注解

获取显示指定文本偏移的行号。 如果你在 0 之前要求一个位置, 你会得到 0;如果请求超出文本末尾的位置,则获得最后一行。

Java文档android.text.Layout.getLineForOffset(int)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于