SelectionPositionCompat

constructor(@NonNull node: @NonNull AccessibilityNodeInfoCompat, offset: Int)

Instantiates a new SelectionPositionCompat.

Parameters

node

The AccessibilityNodeInfoCompat for the node of this selection position.

offset

The offset for a SelectionPositionCompat within view's text content, which should be a value between 0 and the length of view's text.


constructor(@NonNull view: @NonNull View, offset: Int)

Instantiates a new SelectionPositionCompat.

Parameters

view

The View containing the text associated with this selection position.

offset

The offset for a selection position within view's text content, which should be a value between 0 and the length of view's text.


constructor(@NonNull view: @NonNull View, virtualDescendantId: Int, offset: Int)

Instantiates a new SelectionPositionCompat.

Parameters

view

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

virtualDescendantId

The ID of the virtual descendant within view's virtual subtree that contains the selection position.

offset

The offset for a selection position within the virtual descendant's text content, which should be a value between 0 and the length of the descendant's text.


constructor(@NonNull position: @NonNull AccessibilityNodeInfo.SelectionPosition)

Instantiates a new SelectionPositionCompat.

Parameters

position

The underlying SelectionPosition to wrap.