AccessibilityNodeInfoCompat.TouchDelegateInfoCompat

Added in 1.2.0

class AccessibilityNodeInfoCompat.TouchDelegateInfoCompat


Class with information of touch delegated views and regions.

Summary

Public constructors

Create a new instance of TouchDelegateInfoCompat.

Public functions

Region?
getRegionAt(index: @IntRange(from = 0) Int)

Return the Region at the given index.

@IntRange(from = 0) Int

Returns the number of touch delegate target region.

AccessibilityNodeInfoCompat?

Return the target AccessibilityNodeInfoCompat for the given Region.

Public constructors

TouchDelegateInfoCompat

Added in 1.2.0
TouchDelegateInfoCompat(targetMap: (Mutable)Map<Region!, View!>)

Create a new instance of TouchDelegateInfoCompat.

Parameters
targetMap: (Mutable)Map<Region!, View!>

A map from regions (in view coordinates) to delegated views.

Public functions

getRegionAt

Added in 1.2.0
fun getRegionAt(index: @IntRange(from = 0) Int): Region?

Return the Region at the given index.

Compatibility:

  • API <29: Always returns null
Parameters
index: @IntRange(from = 0) Int

The desired index, must be between 0 and getRegionCount-1.

Returns
Region?

Returns the Region stored at the given index.

getRegionCount

Added in 1.2.0
fun getRegionCount(): @IntRange(from = 0) Int

Returns the number of touch delegate target region.

Compatibility:

  • API <29: Always returns 0
Returns
@IntRange(from = 0) Int

Number of touch delegate target region.

getTargetForRegion

Added in 1.2.0
fun getTargetForRegion(region: Region): AccessibilityNodeInfoCompat?

Return the target AccessibilityNodeInfoCompat for the given Region.

Note: This api can only be called from android.accessibilityservice.AccessibilityService.

Compatibility:

  • API <29: Always returns null
Parameters
region: Region

The region retrieved from getRegionAt.

Returns
AccessibilityNodeInfoCompat?

The target node associates with the given region.