語言

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 發送的鍵盤事件派遣至適當的事件目標。

注意:此方法僅適用於 InputConnection#sendKeyEvent(KeyEvent) 需要實作且不依賴 BaseInputConnection的情況。 請勿將此 API 用於其他用途。

android.view.inputmethod.InputMethodManager.dispatchKeyEventFromInputMethod(android.view.View, android.view.KeyEvent)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於