Builder


class Builder
kotlin.Any
   ↳ android.view.accessibility.AccessibilityNodeInfo.SelectionPosition.Builder

Builder for creating SelectionPosition objects.

Summary

Public constructors

Creates a new Builder.

Builder(view: View, offset: Int)

Creates a new Builder.

Builder(view: View, virtualDescendantId: Int, offset: Int)

Creates a new Builder.

Public methods
AccessibilityNodeInfo.SelectionPosition

Creates a new SelectionPosition instance.

AccessibilityNodeInfo.SelectionPosition.Builder
setOffsetType(offsetType: Int)

Sets the offset type for the position.

Public constructors

Builder

Builder(
    node: AccessibilityNodeInfo,
    offset: Int)

Creates a new Builder.

By default, the offset type is initialized to OFFSET_TYPE_TEXT.

Parameters
node AccessibilityNodeInfo: The AccessibilityNodeInfo for the node of this position.
This value cannot be null.
offset Int: The offset for the position.

Builder

Builder(
    view: View,
    offset: Int)

Creates a new Builder.

By default, the offset type is initialized to OFFSET_TYPE_TEXT.

Parameters
view View: The View containing the text associated with this selection.
This value cannot be null.
offset Int: The offset for the position.

Builder

Builder(
    view: View,
    virtualDescendantId: Int,
    offset: Int)

Creates a new Builder.

By default, the offset type is initialized to OFFSET_TYPE_TEXT.

Parameters
view View: The view whose virtual descendant is associated with the selection position.
This value cannot be null.
virtualDescendantId Int: The virtual descendant id.
offset Int: The offset for the position.

Public methods

build

fun build(): AccessibilityNodeInfo.SelectionPosition

Creates a new SelectionPosition instance.

Return
AccessibilityNodeInfo.SelectionPosition This value cannot be null.

setOffsetType

fun setOffsetType(offsetType: Int): AccessibilityNodeInfo.SelectionPosition.Builder

Sets the offset type for the position.

Parameters
offsetType Int: The scheme dictating how the offset should be interpreted.
Value is one of the following:
Return
AccessibilityNodeInfo.SelectionPosition.Builder This builder.
This value cannot be null.