WebViewClient()

来源:互联网 发布:apache 网络驱动器 编辑:程序博客网 时间:2024/05/16 07:29



public void onPageFinished (WebView view, String url)

引入自:API 级别1

Notify the host application that a page has finished loading. This method is called only for main frame. When onPageFinished() is called, (图形绘制)the rendering picture may not be updated yet. To get the notification for the new Picture, use onNewPicture(WebView, Picture).

参数
viewThe WebView that is initiating the callback.urlThe url of the page.

public boolean shouldOverrideUrlLoading (WebView view, String url)

引入自:API 级别1

Give the host application a chance to take over the control when a new url is about to be loaded in the current WebView. If WebViewClient is not provided, by default WebView will ask Activity Manager to choose the proper handler for the url. If WebViewClient is provided, return true means the host application handles the url, while return false means the current WebView handles the url.

参数
viewThe WebView that is initiating the callback.urlThe url to be loaded.
返回值
  • True if the host application wants to leave the current WebView and handle the url itself, otherwise return false.

0 0
原创粉丝点击