AccessibilityNodeInfoCompat.SelectionPositionCompat.Builder


@PreviewAccessibilityApi
class AccessibilityNodeInfoCompat.SelectionPositionCompat.Builder


Builder for creating SelectionPositionCompat 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 functions

AccessibilityNodeInfoCompat.SelectionPositionCompat

Creates a new SelectionPositionCompat instance.

AccessibilityNodeInfoCompat.SelectionPositionCompat.Builder
setOffsetType(offsetType: Int)

Sets the offset type for the position.

Public constructors

Builder

Builder(node: AccessibilityNodeInfoCompat, offset: Int)

Creates a new Builder.

Parameters
node: AccessibilityNodeInfoCompat

The AccessibilityNodeInfoCompat for the node of this position.

offset: Int

The offset for the position.

Builder

Builder(view: View, offset: Int)

Creates a new Builder.

Parameters
view: View

The View containing the text associated with this selection.

offset: Int

The offset for the position.

Builder

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

Creates a new Builder.

Parameters
view: View

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

virtualDescendantId: Int

The virtual descendant id.

offset: Int

The offset for the position.

Public functions

setOffsetType

fun setOffsetType(offsetType: Int): AccessibilityNodeInfoCompat.SelectionPositionCompat.Builder

Sets the offset type for the position.

Parameters
offsetType: Int

The scheme dictating how the offset should be interpreted.

Throws
java.lang.IllegalArgumentException

If the offsetType is unknown.