AccessibilityNodeInfoCompat.SelectionPositionCompat


class AccessibilityNodeInfoCompat.SelectionPositionCompat


Compat class for AccessibilityNodeInfo.SelectionPosition, which is a class that defines either the start or end of a selection that can span across multiple AccessibilityNodeInfo objects.

See also
AccessibilityNodeInfo.SelectionPosition

Compatibility:

  • API <: 36.1: Class methods perform no-op behavior.

Summary

Public constructors

SelectionPositionCompat(position: SelectionPosition)

Instantiates a new SelectionPositionCompat.

Instantiates a new SelectionPositionCompat.

SelectionPositionCompat(view: View, offset: Int)

Instantiates a new SelectionPositionCompat.

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

Instantiates a new SelectionPositionCompat.

Public functions

Boolean
equals(other: Any!)

Compatibility:

AccessibilityNodeInfoCompat?
Int
Int

Compatibility:

Public constructors

SelectionPositionCompat

SelectionPositionCompat(position: SelectionPosition)

Instantiates a new SelectionPositionCompat.

Parameters
position: SelectionPosition

The underlying SelectionPosition to wrap.

SelectionPositionCompat

SelectionPositionCompat(node: AccessibilityNodeInfoCompat, offset: Int)

Instantiates a new SelectionPositionCompat.

Parameters
node: AccessibilityNodeInfoCompat

The AccessibilityNodeInfoCompat for the node of this selection position.

offset: Int

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

SelectionPositionCompat

SelectionPositionCompat(view: View, offset: Int)

Instantiates a new SelectionPositionCompat.

Parameters
view: View

The View containing the text associated with this selection position.

offset: Int

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.

SelectionPositionCompat

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

Instantiates a new SelectionPositionCompat.

Parameters
view: View

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

virtualDescendantId: Int

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

offset: Int

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.

Public functions

equals

fun equals(other: Any!): Boolean

Compatibility:

  • API <: 36.1: Always returns false

getNode

fun getNode(): AccessibilityNodeInfoCompat?
Returns
AccessibilityNodeInfoCompat?

The node associated with thisSelectionPositionCompat Compatibility:

  • API <: 36.1: Always returns null

getOffset

fun getOffset(): Int
Returns
Int

A value from 0 to the length of getNode's content representing the offset of the SelectionPositionCompat Compatibility:

  • API <: 36.1: Always returns -1

hashCode

fun hashCode(): Int

Compatibility:

  • API <: 36.1: Always returns 0