语言

Instrumentation.SendPointerSync(MotionEvent) 方法

定义

将指针事件调度到受检测应用程序拥有的窗口中,并等待处理它。

[Android.Runtime.Register("sendPointerSync", "(Landroid/view/MotionEvent;)V", "GetSendPointerSync_Landroid_view_MotionEvent_Handler")]
public virtual void SendPointerSync(Android.Views.MotionEvent? e);
[<Android.Runtime.Register("sendPointerSync", "(Landroid/view/MotionEvent;)V", "GetSendPointerSync_Landroid_view_MotionEvent_Handler")>]
abstract member SendPointerSync : Android.Views.MotionEvent -> unit
override this.SendPointerSync : Android.Views.MotionEvent -> unit

参数

特性

注解

将指针事件调度到受检测应用程序拥有的窗口中,并等待处理它。 如果注入的动作事件以检测应用程序不拥有的窗口为目标,则输入注入将失败。 请参阅 getUiAutomation(),了解如何将所有事件注入所有窗口。 此方法将阻止收件人完成处理事件。 请注意,此方法返回时,收件人可能尚未完全完成对事件的反应。 例如,在响应注入的事件时,它可能仍在更新其显示或 UI 内容的过程中。

Android 参考。android.app.Instrumentation.sendPointerSync

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

适用于