InputMethodManager.DispatchKeyEventFromInputMethod(View, KeyEvent) 方法

定义

提供默认实现,该实现 InputConnection#sendKeyEvent(KeyEvent)应根据给定 View 和当前焦点状态,将键盘事件从 IME 发送到适当的事件目标。

[Android.Runtime.Register("dispatchKeyEventFromInputMethod", "(Landroid/view/View;Landroid/view/KeyEvent;)V", "", ApiSince=24)]
public void DispatchKeyEventFromInputMethod(Android.Views.View? targetView, Android.Views.KeyEvent e);
[<Android.Runtime.Register("dispatchKeyEventFromInputMethod", "(Landroid/view/View;Landroid/view/KeyEvent;)V", "", ApiSince=24)>]
member this.DispatchKeyEventFromInputMethod : Android.Views.View * Android.Views.KeyEvent -> unit

参数

targetView
View

默认目标视图。 如果 null 已指定,则此方法会尝试根据当前焦点状态查找良好的事件目标。

属性

注解

提供默认实现,该实现 InputConnection#sendKeyEvent(KeyEvent)应根据给定 View 和当前焦点状态,将键盘事件从 IME 发送到适当的事件目标。

警告:仅针对需要实现而不依赖BaseInputConnection的情况InputConnection#sendKeyEvent(KeyEvent)提供此方法。 请勿将此 API 用于其他任何内容。

Java文档android.view.inputmethod.InputMethodManager.dispatchKeyEventFromInputMethod(android.view.View, android.view.KeyEvent)

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

适用于