AccessibilityGestureEvent
class AccessibilityGestureEvent : Parcelable
| kotlin.Any | |
| ↳ | android.accessibilityservice.AccessibilityGestureEvent |
This class describes the gesture event including gesture id and which display it happens on.
Note: Accessibility services setting the android.accessibilityservice.AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE flag can receive gestures.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
AccessibilityGestureEvent(gestureId: Int, displayId: Int, motionEvents: MutableList<MotionEvent!>)Constructs an AccessibilityGestureEvent to be dispatched to an accessibility service. |
|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| static String |
gestureIdToString(id: Int)Returns a string representation of the specified gesture id. |
| Int |
Returns the display id of the received-gesture display, for use with |
| Int |
Returns performed gesture id. |
| MutableList<MotionEvent!> |
Returns the motion events that lead to this gesture. |
| String |
toString()Returns a string representation of the object. |
| Unit |
writeToParcel(parcel: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<AccessibilityGestureEvent!> | |
Public constructors
AccessibilityGestureEvent
AccessibilityGestureEvent(
gestureId: Int,
displayId: Int,
motionEvents: MutableList<MotionEvent!>)
Constructs an AccessibilityGestureEvent to be dispatched to an accessibility service.
| Parameters | |
|---|---|
gestureId |
Int: the id number of the gesture. |
displayId |
Int: the display on which this gesture was performed. |
motionEvents |
MutableList<MotionEvent!>: the motion events that lead to this gesture. This value cannot be null. |
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 |
gestureIdToString
static fun gestureIdToString(id: Int): String
Returns a string representation of the specified gesture id.
| Return | |
|---|---|
String |
This value cannot be null. |
getDisplayId
fun getDisplayId(): Int
Returns the display id of the received-gesture display, for use with android.hardware.display.DisplayManager#getDisplay(int).
| Return | |
|---|---|
Int |
the display id. |
getGestureId
fun getGestureId(): Int
Returns performed gesture id.
getMotionEvents
fun getMotionEvents(): MutableList<MotionEvent!>
Returns the motion events that lead to this gesture.
| Return | |
|---|---|
MutableList<MotionEvent!> |
This value cannot be null. |
toString
fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
This value cannot be null. |
writeToParcel
fun writeToParcel(
parcel: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
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 |
parcel |
Parcel: This value cannot be null. |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<AccessibilityGestureEvent!>
See Also