1
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”);
Lal
  • 14,726
  • 4
  • 45
  • 70
  • Can you provide more info about your app (min SDK level, target SDK and anything else which seems related or out of the ordinary). – Doron Yakovlev Golani Mar 17 '17 at 15:08
  • Possible duplicate of [onPageFinished() never called (webview)!](http://stackoverflow.com/questions/6719814/onpagefinished-never-called-webview) – koksalb Mar 17 '17 at 16:24
  • hi @lal minSdkVersion 16 targetSdkVersion 25 – Sunil Dubey Mar 20 '17 at 08:47
  • koksalb, this question is not a duplicate of the question which you linked. The issue in that thread was that the `setWebViewClient(...)` method was being called twice with different method overrides each time. That is not the issue here. – Adil Hussain Jul 04 '19 at 14:44

0 Answers0