AccessibilityService.OnGesture Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
OnGesture(AccessibilityGestureEvent) |
Called by the system when the user performs a specific gesture on the specific touch screen. |
OnGesture(Int32) |
Called by |
OnGesture(AccessibilityGestureEvent)
Called by the system when the user performs a specific gesture on the specific touch screen.
[Android.Runtime.Register("onGesture", "(Landroid/accessibilityservice/AccessibilityGestureEvent;)Z", "GetOnGesture_Landroid_accessibilityservice_AccessibilityGestureEvent_Handler", ApiSince=30)]
public virtual bool OnGesture (Android.AccessibilityServices.AccessibilityGestureEvent gestureEvent);
[<Android.Runtime.Register("onGesture", "(Landroid/accessibilityservice/AccessibilityGestureEvent;)Z", "GetOnGesture_Landroid_accessibilityservice_AccessibilityGestureEvent_Handler", ApiSince=30)>]
abstract member OnGesture : Android.AccessibilityServices.AccessibilityGestureEvent -> bool
override this.OnGesture : Android.AccessibilityServices.AccessibilityGestureEvent -> bool
Parameters
- gestureEvent
- AccessibilityGestureEvent
The information of gesture.
Returns
Whether the gesture was handled.
- Attributes
Remarks
Called by the system when the user performs a specific gesture on the specific touch screen.
<strong>Note:</strong> To receive gestures an accessibility service must request that the device is in touch exploration mode by setting the AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE
flag.
<strong>Note:</strong> The default implementation calls #onGesture(int)
when the touch screen is default display.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
OnGesture(Int32)
Called by #onGesture(AccessibilityGestureEvent)
when the user performs a specific
gesture on the default display.
[Android.Runtime.Register("onGesture", "(I)Z", "GetOnGesture_IHandler")]
protected virtual bool OnGesture (int gestureId);
[<Android.Runtime.Register("onGesture", "(I)Z", "GetOnGesture_IHandler")>]
abstract member OnGesture : int -> bool
override this.OnGesture : int -> bool
Parameters
- gestureId
- Int32
The unique id of the performed gesture.
Returns
Whether the gesture was handled.
- Attributes
Remarks
Called by #onGesture(AccessibilityGestureEvent)
when the user performs a specific gesture on the default display.
<strong>Note:</strong> To receive gestures an accessibility service must request that the device is in touch exploration mode by setting the AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE
flag.
This member is deprecated. Override #onGesture(AccessibilityGestureEvent)
instead.
Java documentation for android.accessibilityservice.AccessibilityService.onGesture(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
- GestureSwipeUp
- GestureSwipeUpAndLeft
- GestureSwipeUpAndDown
- GestureSwipeUpAndRight
- GestureSwipeDown
- GestureSwipeDownAndLeft
- GestureSwipeDownAndUp
- GestureSwipeDownAndRight
- GestureSwipeLeft
- GestureSwipeLeftAndUp
- GestureSwipeLeftAndRight
- GestureSwipeLeftAndDown
- GestureSwipeRight
- GestureSwipeRightAndUp
- GestureSwipeRightAndLeft
- GestureSwipeRightAndDown