public final class

AccessibilityNodeInfoCompat.TouchDelegateInfoCompat

extends java.lang.Object

 java.lang.Object

↳androidx.core.view.accessibility.AccessibilityNodeInfoCompat.TouchDelegateInfoCompat

Overview

Class with information of touch delegated views and regions.

Summary

Constructors
publicTouchDelegateInfoCompat(java.util.Map<Region, View> targetMap)

Create a new instance of AccessibilityNodeInfoCompat.TouchDelegateInfoCompat.

Methods
public RegiongetRegionAt(int index)

Return the at the given index.

public intgetRegionCount()

Returns the number of touch delegate target region.

public AccessibilityNodeInfoCompatgetTargetForRegion(Region region)

Return the target AccessibilityNodeInfoCompat for the given .

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public TouchDelegateInfoCompat(java.util.Map<Region, View> targetMap)

Create a new instance of AccessibilityNodeInfoCompat.TouchDelegateInfoCompat.

Parameters:

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

Methods

public int getRegionCount()

Returns the number of touch delegate target region.

Compatibility:

  • API < 29: Always returns 0

Returns:

Number of touch delegate target region.

public Region getRegionAt(int index)

Return the at the given index.

Compatibility:

  • API < 29: Always returns null

Parameters:

index: The desired index, must be between 0 and AccessibilityNodeInfoCompat.TouchDelegateInfoCompat.getRegionCount()-1.

Returns:

Returns the stored at the given index.

public AccessibilityNodeInfoCompat getTargetForRegion(Region region)

Return the target AccessibilityNodeInfoCompat for the given .

Note: This api can only be called from .

Note: It is a client responsibility to recycle the received info by calling to avoid creating of multiple instances.

Compatibility:

  • API < 29: Always returns null

Parameters:

region: The region retrieved from AccessibilityNodeInfoCompat.TouchDelegateInfoCompat.getRegionAt(int).

Returns:

The target node associates with the given region.