为什么要调用android webview onPageStarted但是onPageFinished不是?

时间:2017-03-17 14:36:11

标签: android webview

webview.setVisibility(View.VISIBLE);

webview.getSettings().setJavaScriptEnabled(true);

webview.getSettings().setUseWideViewPort(true);

webview.setWebViewClient(new WebViewClient() {
  @Override
    public void onPageStarted(WebView view, String URL, Bitmap favicon) 
               super.onPageStarted(view, url, favicon);
    }

    @Override
    public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
               super.onReceivedError(view, errorCode, description,failingUrl);

    }
    @Override
    public void onPageFinished(WebView webview, String url) {
        super.onPageFinished(webview, url);

    }

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url)  {    
        return super.shouldOverrideUrlLoading(view, url);
    }
});webview.loadUrl(“my_url”);

0 个答案:

没有答案