WebViewClient.ShouldOverrideKeyEvent(WebView, KeyEvent) Method

Definition

Give the host application a chance to handle the key event synchronously.

[Android.Runtime.Register("shouldOverrideKeyEvent", "(Landroid/webkit/WebView;Landroid/view/KeyEvent;)Z", "GetShouldOverrideKeyEvent_Landroid_webkit_WebView_Landroid_view_KeyEvent_Handler")]
public virtual bool ShouldOverrideKeyEvent (Android.Webkit.WebView? view, Android.Views.KeyEvent? e);
[<Android.Runtime.Register("shouldOverrideKeyEvent", "(Landroid/webkit/WebView;Landroid/view/KeyEvent;)Z", "GetShouldOverrideKeyEvent_Landroid_webkit_WebView_Landroid_view_KeyEvent_Handler")>]
abstract member ShouldOverrideKeyEvent : Android.Webkit.WebView * Android.Views.KeyEvent -> bool
override this.ShouldOverrideKeyEvent : Android.Webkit.WebView * Android.Views.KeyEvent -> bool

Parameters

view
WebView

The WebView that is initiating the callback.

e
KeyEvent

The key event.

Returns

Boolean

true if the host application wants to handle the key event itself, otherwise return false

Attributes

Remarks

Java documentation for android.webkit.WebViewClient.shouldOverrideKeyEvent(android.webkit.WebView, 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