Udostępnij za pośrednictwem


AccessibilityServiceInfo.MotionEventSources Property

Definition

Returns the bit mask of android.view.InputDevice sources that the accessibility service wants to listen to for generic android.view.MotionEvents. -or- Sets the bit mask of android.view.InputDevice sources that the accessibility service wants to listen to for generic android.view.MotionEvents.

public virtual Android.Views.InputSourceType MotionEventSources { [Android.Runtime.Register("getMotionEventSources", "()I", "GetGetMotionEventSourcesHandler", ApiSince=34)] get; [Android.Runtime.Register("setMotionEventSources", "(I)V", "GetSetMotionEventSources_IHandler", ApiSince=34)] set; }
[<get: Android.Runtime.Register("getMotionEventSources", "()I", "GetGetMotionEventSourcesHandler", ApiSince=34)>]
[<set: Android.Runtime.Register("setMotionEventSources", "(I)V", "GetSetMotionEventSources_IHandler", ApiSince=34)>]
member this.MotionEventSources : Android.Views.InputSourceType with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Returns the bit mask of android.view.InputDevice sources that the accessibility service wants to listen to for generic android.view.MotionEvents.

Java documentation for android.accessibilityservice.AccessibilityServiceInfo.getMotionEventSources().

Property setter documentation:

Sets the bit mask of android.view.InputDevice sources that the accessibility service wants to listen to for generic android.view.MotionEvents.

Including an android.view.InputDevice source that does not send android.view.MotionEvents is effectively a no-op for that source, since you will not receive any events from that source.

See android.view.InputDevice for complete source definitions. Many input devices send android.view.InputEvents from more than one type of source so you may need to include multiple android.view.MotionEvent sources here, in addition to using AccessibilityService#onKeyEvent to listen to android.view.KeyEvents.

<strong>Note:</strong> android.view.InputDevice sources contain source class bits that complicate bitwise flag removal operations. To remove a specific source you should rebuild the entire value using bitwise OR operations on the individual source constants.

Java documentation for android.accessibilityservice.AccessibilityServiceInfo.setMotionEventSources(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.

Applies to