Layout.GetLineForOffset(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The character offset to locate in the layout text.
Returns
The zero-based line index for the offset, limited to the first or last line when outside the text.
- 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.