Added in API level 29

TouchDelegateInfo

class TouchDelegateInfo : Parcelable
kotlin.Any
   ↳ android.view.accessibility.AccessibilityNodeInfo.TouchDelegateInfo

Class with information of touch delegated views and regions from TouchDelegate for the AccessibilityNodeInfo.

Summary

Inherited constants
Public constructors

Create a new instance of TouchDelegateInfo.

Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Region
getRegionAt(index: Int)

Return the Region at the given index in the TouchDelegateInfo.

Int

Returns the number of touch delegate target region.

AccessibilityNodeInfo?

Return the target AccessibilityNodeInfo for the given Region.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<AccessibilityNodeInfo.TouchDelegateInfo!>

Public constructors

TouchDelegateInfo

Added in API level 29
TouchDelegateInfo(targetMap: MutableMap<Region!, View!>)

Create a new instance of TouchDelegateInfo.

Parameters
targetMap MutableMap<Region!, View!>: A map from regions (in view coordinates) to delegated views. This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if targetMap is empty or null in Regions or Views.

Public methods

describeContents

Added in API level 29
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getRegionAt

Added in API level 29
fun getRegionAt(index: Int): Region

Return the Region at the given index in the TouchDelegateInfo.

Parameters
index Int: The desired index, must be between 0 and getRegionCount()-1.
Return
Region Returns the Region stored at the given index. This value cannot be null.

getRegionCount

Added in API level 29
fun getRegionCount(): Int

Returns the number of touch delegate target region.

Return
Int Number of touch delegate target region.

getTargetForRegion

Added in API level 29
fun getTargetForRegion(region: Region): AccessibilityNodeInfo?

Return the target AccessibilityNodeInfo for the given Region.

Note: This api can only be called from AccessibilityService.

Parameters
region Region: The region retrieved from getRegionAt(int). This value cannot be null.
Return
AccessibilityNodeInfo? The target node associates with the given region. This value may be null.

writeToParcel

Added in API level 29
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties