Megosztás a következőn keresztül:


Activity.OnTouchEvent(MotionEvent) Method

Definition

Called when a touch screen event was not handled by any of the views inside of the activity.

[Android.Runtime.Register("onTouchEvent", "(Landroid/view/MotionEvent;)Z", "GetOnTouchEvent_Landroid_view_MotionEvent_Handler")]
public virtual bool OnTouchEvent (Android.Views.MotionEvent? e);
[<Android.Runtime.Register("onTouchEvent", "(Landroid/view/MotionEvent;)Z", "GetOnTouchEvent_Landroid_view_MotionEvent_Handler")>]
abstract member OnTouchEvent : Android.Views.MotionEvent -> bool
override this.OnTouchEvent : Android.Views.MotionEvent -> bool

Parameters

e
MotionEvent

The touch screen event being processed.

Returns

Return true if you have consumed the event, false if you haven't.

Attributes

Remarks

Called when a touch screen event was not handled by any of the views inside of the activity. This is most useful to process touch events that happen outside of your window bounds, where there is no view to receive it.

Java documentation for android.app.Activity.onTouchEvent(android.view.MotionEvent).

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