共用方式為


Layout.GetLineForOffset(Int32) Method

Definition

Get the line number on which the specified text offset appears.

[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

Parameters

offset
Int32

Returns

Attributes

Remarks

Get the line number on which the specified text offset appears. If you ask for a position before 0, you get 0; if you ask for a position beyond the end of the text, you get the last line.

Java documentation for android.text.Layout.getLineForOffset(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