语言

Activity.DispatchTouchEvent(MotionEvent) 方法

定义

调用以处理触摸屏事件。

[Android.Runtime.Register("dispatchTouchEvent", "(Landroid/view/MotionEvent;)Z", "GetDispatchTouchEvent_Landroid_view_MotionEvent_Handler")]
public virtual bool DispatchTouchEvent(Android.Views.MotionEvent? ev);
[<Android.Runtime.Register("dispatchTouchEvent", "(Landroid/view/MotionEvent;)Z", "GetDispatchTouchEvent_Landroid_view_MotionEvent_Handler")>]
abstract member DispatchTouchEvent : Android.Views.MotionEvent -> bool
override this.DispatchTouchEvent : Android.Views.MotionEvent -> bool

参数

ev
MotionEvent

触摸屏事件。

返回

如果使用此事件,则布尔返回 true。

实现

特性

注解

调用以处理触摸屏事件。 在将所有触摸屏事件调度到窗口之前,可以重写此事件以截获所有触摸屏事件。 请务必为应正常处理的触摸屏事件调用此实现。

Android 参考。android.app.Activity.dispatchTouchEvent

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于