Language

AssistStructure.ViewNode.GetTextLineCharOffsets Method

Definition

Return per-line offsets into the text returned by #getText().

[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 zero-based UTF-16 offset at which each formatted line starts in the node's text, or null if no line information is set. These are text offsets, not pixel positions.

Attributes

Remarks

Return per-line offsets into the text returned by #getText(). Each entry in the array is a formatted line of text, and the value it contains is the offset into the text string where that line starts. May return null if there is no line information.

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