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 | |
---|---|
TouchDelegateInfo(targetMap: MutableMap<Region!, View!>) Create a new instance of |
Public methods | |
---|---|
Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
Region |
getRegionAt(index: Int) Return the |
Int |
Returns the number of touch delegate target region. |
AccessibilityNodeInfo? |
getTargetForRegion(region: Region) Return the target |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<AccessibilityNodeInfo.TouchDelegateInfo!> |
Public constructors
TouchDelegateInfo
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
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
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
fun getRegionCount(): Int
Returns the number of touch delegate target region.
Return | |
---|---|
Int |
Number of touch delegate target region. |
getTargetForRegion
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
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
CREATOR
static val CREATOR: Parcelable.Creator<AccessibilityNodeInfo.TouchDelegateInfo!>
See Also