Language

AssistStructure.ViewNode.GetTextLineCharOffsets Method

Definition

Returns the recorded start offset of each formatted text line.

[Android.Runtime.Register("getTextLineCharOffsets", "()[I", "GetGetTextLineCharOffsetsHandler", ApiSince=23)]
public virtual int[] GetTextLineCharOffsets();
[<Android.Runtime.Register("getTextLineCharOffsets", "()[I", "GetGetTextLineCharOffsetsHandler", ApiSince=23)>]
abstract member GetTextLineCharOffsets : unit -> int[]
override this.GetTextLineCharOffsets : unit -> int[]

Returns

Int32[]

The recorded start offset for each formatted text line, or null if no line information is set.

Attributes

Remarks

Each array entry records the UTF-16 start offset of a formatted text line, not a pixel position. A scrolled TextView can report offsets relative to its full text even when the node contains only part of that text.

It's only relevant when the AssistStructure is used for assist purposes, not for autofill purposes.

Java documentation for android.app.assist.AssistStructure.ViewNode.getTextLineCharOffsets().

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