Freigeben über


TouchInteractionController Class

Definition

This class allows a service to handle touch exploration and the detection of specialized accessibility gestures.

[Android.Runtime.Register("android/accessibilityservice/TouchInteractionController", ApiSince=33, DoNotGenerateAcw=true)]
public sealed class TouchInteractionController : Java.Lang.Object
[<Android.Runtime.Register("android/accessibilityservice/TouchInteractionController", ApiSince=33, DoNotGenerateAcw=true)>]
type TouchInteractionController = class
    inherit Object
Inheritance
TouchInteractionController
Attributes

Remarks

This class allows a service to handle touch exploration and the detection of specialized accessibility gestures. The service receives motion events and can match those motion events against the gestures it supports. The service can also request the framework enter three other states of operation for the duration of this interaction. Upon entering any of these states the framework will take over and the service will not receive motion events until the start of a new interaction. The states are as follows:

<ul> <li>The service can tell the framework that this interaction is touch exploration. The user is trying to explore the screen rather than manipulate it. The framework will then convert the motion events to hover events to support touch exploration. <li>The service can tell the framework that this interaction is a dragging interaction where two fingers are used to execute a one-finger gesture such as scrolling the screen. The service must specify which of the two fingers should be passed through to rest of the input pipeline. <li>Finally, the service can request that the framework delegate this interaction, meaning pass it through to the rest of the input pipeline as-is. </ul>

When AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE is enabled, this controller will receive all motion events received by the framework for the specified display when not touch-exploring or delegating. If the service classifies this interaction as touch exploration or delegating the framework will stop sending motion events to the service for the duration of this interaction. If the service classifies this interaction as a dragging interaction the framework will send motion events to the service to allow the service to determine if the interaction still qualifies as dragging or if it has become a delegating interaction. If AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE is disabled this controller will not receive any motion events because touch interactions are being passed through to the input pipeline unaltered. Note that AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE requires setting android.R.attr#canRequestTouchExplorationMode as well.

Java documentation for android.accessibilityservice.TouchInteractionController.

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.

Fields

StateClear
Obsolete.

The state where the user is not touching the screen.

StateDelegating
Obsolete.

The user is performing a gesture which is being passed through to the input pipeline as-is.

StateDragging
Obsolete.

The state where the user is dragging with two fingers.

StateTouchExploring
Obsolete.

The state where the user is explicitly exploring the screen.

StateTouchInteracting
Obsolete.

The state where the user is touching the screen and the service is receiving motion events.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
DisplayId
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
MaxPointerCount
PeerReference (Inherited from Object)
State
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
PerformClick()

If AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE and If {@link AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE is enabled and at least one callback has been added, this function tells the framework to perform a click.

PerformLongClickAndStartDrag()

If AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE and If {@link AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE is enabled and at least one callback has been added, this function tells the framework to perform a long click.

RegisterCallback(IExecutor, TouchInteractionController+ICallback)
RequestDelegating()

If AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE and If {@link AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE is enabled and at least one callback has been added, this function tells the framework to initiate a delegating interaction.

RequestDragging(Int32)

If AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE and If {@link AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE is enabled and at least one callback has been added, this function tells the framework to initiate a dragging interaction using the specified pointer.

RequestTouchExploration()

If AccessibilityServiceInfo#FLAG_REQUEST_TOUCH_EXPLORATION_MODE is enabled and at least one callback has been added for this display this function tells the framework to initiate touch exploration.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
StateToString(Int32)

Returns a string representation of the specified state.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterAllCallbacks()

Removes all callbacks and returns control of touch interactions to the framework.

UnregisterCallback(TouchInteractionController+ICallback)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to