WebViewClient.ShouldOverrideUrlLoading Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| ShouldOverrideUrlLoading(WebView, IWebResourceRequest) |
Give the host application a chance to take control when a URL is about to be loaded in the current WebView. |
| ShouldOverrideUrlLoading(WebView, String) |
Obsolete.
Give the host application a chance to take control when a URL is about to be loaded in the current WebView. |
ShouldOverrideUrlLoading(WebView, IWebResourceRequest)
Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
[Android.Runtime.Register("shouldOverrideUrlLoading", "(Landroid/webkit/WebView;Landroid/webkit/WebResourceRequest;)Z", "GetShouldOverrideUrlLoading_Landroid_webkit_WebView_Landroid_webkit_WebResourceRequest_Handler", ApiSince=24)]
public virtual bool ShouldOverrideUrlLoading (Android.Webkit.WebView? view, Android.Webkit.IWebResourceRequest? request);
[<Android.Runtime.Register("shouldOverrideUrlLoading", "(Landroid/webkit/WebView;Landroid/webkit/WebResourceRequest;)Z", "GetShouldOverrideUrlLoading_Landroid_webkit_WebView_Landroid_webkit_WebResourceRequest_Handler", ApiSince=24)>]
abstract member ShouldOverrideUrlLoading : Android.Webkit.WebView * Android.Webkit.IWebResourceRequest -> bool
override this.ShouldOverrideUrlLoading : Android.Webkit.WebView * Android.Webkit.IWebResourceRequest -> bool
Parameters
- view
- WebView
The WebView that is initiating the callback.
- request
- IWebResourceRequest
Object containing the details of the request.
Returns
true to cancel the current load, otherwise return false.
- 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
ShouldOverrideUrlLoading(WebView, String)
Caution
deprecated
Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
[Android.Runtime.Register("shouldOverrideUrlLoading", "(Landroid/webkit/WebView;Ljava/lang/String;)Z", "GetShouldOverrideUrlLoading_Landroid_webkit_WebView_Ljava_lang_String_Handler")]
[System.Obsolete("deprecated")]
public virtual bool ShouldOverrideUrlLoading (Android.Webkit.WebView? view, string? url);
[<Android.Runtime.Register("shouldOverrideUrlLoading", "(Landroid/webkit/WebView;Ljava/lang/String;)Z", "GetShouldOverrideUrlLoading_Landroid_webkit_WebView_Ljava_lang_String_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member ShouldOverrideUrlLoading : Android.Webkit.WebView * string -> bool
override this.ShouldOverrideUrlLoading : Android.Webkit.WebView * string -> bool
Parameters
- view
- WebView
The WebView that is initiating the callback.
- url
- String
The URL to be loaded.
Returns
true to cancel the current load, otherwise return false.
- 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.