AccessibilityNodeInfoCompat.TouchDelegateInfoCompat
public
static
final
class
AccessibilityNodeInfoCompat.TouchDelegateInfoCompat
extends Object
java.lang.Object | |
↳ | androidx.core.view.accessibility.AccessibilityNodeInfoCompat.TouchDelegateInfoCompat |
Class with information of touch delegated views and regions.
Summary
Public constructors | |
---|---|
TouchDelegateInfoCompat(Map<Region, View> targetMap)
Create a new instance of |
Public methods | |
---|---|
Region
|
getRegionAt(int index)
Return the |
int
|
getRegionCount()
Returns the number of touch delegate target region. |
AccessibilityNodeInfoCompat
|
getTargetForRegion(Region region)
Return the target |
Inherited methods | |
---|---|
Public constructors
TouchDelegateInfoCompat
public TouchDelegateInfoCompat (Map<Region, View> targetMap)
Create a new instance of AccessibilityNodeInfoCompat.TouchDelegateInfoCompat
.
Parameters | |
---|---|
targetMap |
Map : A map from regions (in view coordinates) to delegated views.
|
Public methods
getRegionAt
public Region getRegionAt (int index)
Return the Region
at the given index.
Compatibility:
- API < 29: Always returns
null
Parameters | |
---|---|
index |
int : The desired index, must be between 0 and getRegionCount() -1. |
Returns | |
---|---|
Region |
Returns the Region stored at the given index.
|
getRegionCount
public int getRegionCount ()
Returns the number of touch delegate target region.
Compatibility:
- API < 29: Always returns
0
Returns | |
---|---|
int |
Number of touch delegate target region. |
getTargetForRegion
public AccessibilityNodeInfoCompat getTargetForRegion (Region region)
Return the target AccessibilityNodeInfoCompat
for the given Region
.
Note: This api can only be called from
AccessibilityService
.
Note: It is a client responsibility to recycle the
received info by calling AccessibilityNodeInfo.recycle()
to avoid creating of multiple instances.
Compatibility:
- API < 29: Always returns
null
Parameters | |
---|---|
region |
Region : The region retrieved from getRegionAt(int) . |
Returns | |
---|---|
AccessibilityNodeInfoCompat |
The target node associates with the given region. |