InputMethodManager.DispatchKeyEventFromInputMethod(View, KeyEvent) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供預設實作 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 指定為 ,則此方法嘗試根據當前焦點狀態尋找良好的事件目標。
- e
- KeyEvent
- 屬性
備註
提供預設實作 InputConnection#sendKeyEvent(KeyEvent),預期會根據給定 View 及當前焦點狀態,將從 IME 發送的鍵盤事件派遣至適當的事件目標。
注意:此方法僅適用於 InputConnection#sendKeyEvent(KeyEvent) 需要實作且不依賴 BaseInputConnection的情況。 請勿將此 API 用於其他用途。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。