Compartilhar via


WebViewClient.OnUnhandledInputEvent(WebView, InputEvent) Method

Definition

Notify the host application that a input event was not handled by the WebView.

[Android.Runtime.Register("onUnhandledInputEvent", "(Landroid/webkit/WebView;Landroid/view/InputEvent;)V", "GetOnUnhandledInputEvent_Landroid_webkit_WebView_Landroid_view_InputEvent_Handler")]
public virtual void OnUnhandledInputEvent (Android.Webkit.WebView? view, Android.Views.InputEvent? e);
[<Android.Runtime.Register("onUnhandledInputEvent", "(Landroid/webkit/WebView;Landroid/view/InputEvent;)V", "GetOnUnhandledInputEvent_Landroid_webkit_WebView_Landroid_view_InputEvent_Handler")>]
abstract member OnUnhandledInputEvent : Android.Webkit.WebView * Android.Views.InputEvent -> unit
override this.OnUnhandledInputEvent : Android.Webkit.WebView * Android.Views.InputEvent -> unit

Parameters

view
WebView

The WebView that is initiating the callback.

e
InputEvent

The input event.

Attributes

Remarks

Notify the host application that a input event was not handled by the WebView. Except system keys, WebView always consumes input events in the normal flow or if #shouldOverrideKeyEvent returns true. This is called asynchronously from where the event is dispatched. It gives the host application a chance to handle the unhandled input events.

Note that if the event is a android.view.MotionEvent, then it's lifetime is only that of the function call. If the WebViewClient wishes to use the event beyond that, then it must create a copy of the event.

It is the responsibility of overriders of this method to call #onUnhandledKeyEvent(WebView, KeyEvent) when appropriate if they wish to continue receiving events through it.

Java documentation for android.webkit.WebViewClient.onUnhandledInputEvent(android.webkit.WebView, android.view.InputEvent).

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