AccessibilityNodeInfoCompat.SelectionCompat


public final class AccessibilityNodeInfoCompat.SelectionCompat


Compat class for AccessibilityNodeInfo.Selection, which is a class that represents a selection of content that may extend across more than one AccessibilityNodeInfo instance.

See also
AccessibilityNodeInfo.Selection

Compatibility:

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

Summary

Public constructors

SelectionCompat(@Nullable Selection selection)

Instantiates a new SelectionCompat.

Instantiates a new SelectionCompat.

Public methods

boolean

Compatibility:

@Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat
@Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat
int

Compatibility:

@Nullable Selection

Returns the underlying platform Selection object.

Public constructors

SelectionCompat

public SelectionCompat(@Nullable Selection selection)

Instantiates a new SelectionCompat.

Parameters
@Nullable Selection selection

The underlying Selection to wrap.

SelectionCompat

Added in 1.18.0
public SelectionCompat(
    @NonNull AccessibilityNodeInfoCompat.SelectionPositionCompat start,
    @NonNull AccessibilityNodeInfoCompat.SelectionPositionCompat end
)

Instantiates a new SelectionCompat.

Parameters
@NonNull AccessibilityNodeInfoCompat.SelectionPositionCompat start

The start of the extended selection.

@NonNull AccessibilityNodeInfoCompat.SelectionPositionCompat end

The end of the extended selection.

Public methods

equals

public boolean equals(Object obj)

Compatibility:

  • API <: 36.1: Returns true if this object is identical to obj, else false

getEnd

Added in 1.18.0
public @Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat getEnd()
Returns
@Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat

The end of the extended selection. Compatibility:

  • API <: 36.1: Always returns null

getStart

Added in 1.18.0
public @Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat getStart()
Returns
@Nullable AccessibilityNodeInfoCompat.SelectionPositionCompat

The start of the extended selection. Compatibility:

  • API <: 36.1: Always returns null

hashCode

public int hashCode()

Compatibility:

  • API <: 36.1: Always returns 0

unwrap

public @Nullable Selection unwrap()

Returns the underlying platform Selection object.

Returns
@Nullable Selection

The platform Selection object, or null if the compat object was created on an API level lower than 36.1.