IDialogInterfaceOnKeyListener.OnKey(IDialogInterface, Keycode, KeyEvent) Method

Definition

Called when a key is dispatched to a dialog.

[Android.Runtime.Register("onKey", "(Landroid/content/DialogInterface;ILandroid/view/KeyEvent;)Z", "GetOnKey_Landroid_content_DialogInterface_ILandroid_view_KeyEvent_Handler:Android.Content.IDialogInterfaceOnKeyListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnKey (Android.Content.IDialogInterface? dialog, Android.Views.Keycode keyCode, Android.Views.KeyEvent? e);
[<Android.Runtime.Register("onKey", "(Landroid/content/DialogInterface;ILandroid/view/KeyEvent;)Z", "GetOnKey_Landroid_content_DialogInterface_ILandroid_view_KeyEvent_Handler:Android.Content.IDialogInterfaceOnKeyListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnKey : Android.Content.IDialogInterface * Android.Views.Keycode * Android.Views.KeyEvent -> bool

Parameters

dialog
IDialogInterface

The dialog the key has been dispatched to.

keyCode
Keycode

The code for the physical key that was pressed

e
KeyEvent

The KeyEvent object containing full information about the event.

Returns

Boolean
Attributes

Remarks

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