AccessibilityNodeInfoCompat.SelectionPositionCompat.Builder


@PreviewAccessibilityApi
public final class AccessibilityNodeInfoCompat.SelectionPositionCompat.Builder


Builder for creating SelectionPositionCompat objects.

Summary

Public constructors

Creates a new Builder.

Builder(@NonNull View view, int offset)

Creates a new Builder.

Builder(@NonNull View view, int virtualDescendantId, int offset)

Creates a new Builder.

Public constructors

Builder

public Builder(@NonNull AccessibilityNodeInfoCompat node, int offset)

Creates a new Builder.

Parameters
@NonNull AccessibilityNodeInfoCompat node

The AccessibilityNodeInfoCompat for the node of this position.

int offset

The offset for the position.

Builder

public Builder(@NonNull View view, int offset)

Creates a new Builder.

Parameters
@NonNull View view

The View containing the text associated with this selection.

int offset

The offset for the position.

Builder

public Builder(@NonNull View view, int virtualDescendantId, int offset)

Creates a new Builder.

Parameters
@NonNull View view

The view whose virtual descendant is associated with the selection position.

int virtualDescendantId

The virtual descendant id.

int offset

The offset for the position.

Public methods

setOffsetType

public @NonNull AccessibilityNodeInfoCompat.SelectionPositionCompat.Builder setOffsetType(int offsetType)

Sets the offset type for the position.

Parameters
int offsetType

The scheme dictating how the offset should be interpreted.

Throws
java.lang.IllegalArgumentException

If the offsetType is unknown.