Udostępnij za pośrednictwem


View.DispatchKeyEventPreIme(KeyEvent) Method

Definition

Dispatch a key event before it is processed by any input method associated with the view hierarchy.

[Android.Runtime.Register("dispatchKeyEventPreIme", "(Landroid/view/KeyEvent;)Z", "GetDispatchKeyEventPreIme_Landroid_view_KeyEvent_Handler")]
public virtual bool DispatchKeyEventPreIme (Android.Views.KeyEvent? e);
[<Android.Runtime.Register("dispatchKeyEventPreIme", "(Landroid/view/KeyEvent;)Z", "GetDispatchKeyEventPreIme_Landroid_view_KeyEvent_Handler")>]
abstract member DispatchKeyEventPreIme : Android.Views.KeyEvent -> bool
override this.DispatchKeyEventPreIme : Android.Views.KeyEvent -> bool

Parameters

e
KeyEvent

The key event to be dispatched.

Returns

True if the event was handled, false otherwise.

Attributes

Remarks

Dispatch a key event before it is processed by any input method associated with the view hierarchy. This can be used to intercept key events in special situations before the IME consumes them; a typical example would be handling the BACK key to update the application's UI instead of allowing the IME to see it and close itself.

Java documentation for android.view.View.dispatchKeyEventPreIme(android.view.KeyEvent).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to