Share via


WebViewClient.OnPageCommitVisible(WebView, String) Method

Definition

Notify the host application that android.webkit.WebView content left over from previous page navigations will no longer be drawn.

[Android.Runtime.Register("onPageCommitVisible", "(Landroid/webkit/WebView;Ljava/lang/String;)V", "GetOnPageCommitVisible_Landroid_webkit_WebView_Ljava_lang_String_Handler", ApiSince=23)]
public virtual void OnPageCommitVisible (Android.Webkit.WebView? view, string? url);
[<Android.Runtime.Register("onPageCommitVisible", "(Landroid/webkit/WebView;Ljava/lang/String;)V", "GetOnPageCommitVisible_Landroid_webkit_WebView_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member OnPageCommitVisible : Android.Webkit.WebView * string -> unit
override this.OnPageCommitVisible : Android.Webkit.WebView * string -> unit

Parameters

view
WebView

The android.webkit.WebView for which the navigation occurred.

url
String

The URL corresponding to the page navigation that triggered this callback.

Attributes

Remarks

Notify the host application that android.webkit.WebView content left over from previous page navigations will no longer be drawn.

This callback can be used to determine the point at which it is safe to make a recycled android.webkit.WebView visible, ensuring that no stale content is shown. It is called at the earliest point at which it can be guaranteed that WebView#onDraw will no longer draw any content from previous navigations. The next draw will display either the WebView#setBackgroundColor background color of the WebView, or some of the contents of the newly loaded page.

This method is called when the body of the HTTP response has started loading, is reflected in the DOM, and will be visible in subsequent draws. This callback occurs early in the document loading process, and as such you should expect that linked resources (for example, CSS and images) may not be available.

For more fine-grained notification of visual state updates, see WebView#postVisualStateCallback.

Please note that all the conditions and recommendations applicable to WebView#postVisualStateCallback also apply to this API.

This callback is only called for main frame navigations.

Java documentation for android.webkit.WebViewClient.onPageCommitVisible(android.webkit.WebView, java.lang.String).

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