Läs på engelska

Dela via


View.DispatchKeyEvent(KeyEvent) Method

Definition

Dispatch a key event to the next view on the focus path.

C#
[Android.Runtime.Register("dispatchKeyEvent", "(Landroid/view/KeyEvent;)Z", "GetDispatchKeyEvent_Landroid_view_KeyEvent_Handler")]
public virtual bool DispatchKeyEvent(Android.Views.KeyEvent? e);

Parameters

e
KeyEvent

The key event to be dispatched.

Returns

True if the event was handled, false otherwise.

Attributes

Remarks

Dispatch a key event to the next view on the focus path. This path runs from the top of the view tree down to the currently focused view. If this view has focus, it will dispatch to itself. Otherwise it will dispatch the next node down the focus path. This method also fires any key listeners.

Java documentation for android.view.View.dispatchKeyEvent(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

Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35