Code example for WebChromeClient

Methods: onProgressChanged

0
         
        super.setWebChromeClient(new WebChromeClient() {
            @Override 
            public void onProgressChanged(WebView webview, int progress) {
                mProgress = progress;
                mWebChromeClient.onProgressChanged(webview, progress);
                 
                if (mProgress >= 40 && !mIsHalfFinished) {
                    mIsHalfFinished = true;
                    mWebViewExClient.onPageHalfFinished(webview);
                } 
            } 
 
            @Override 
            public boolean onJsAlert(WebView webview, String url, String message, android.webkit.JsResult result) {
                if (mWebChromeClient.onJsAlert(webview, url, message, result)) {
                    return true; 
                } 
                return mWebViewExClient.onJsAlert(webview, url, message, result);
            } 
Stop searching for code, let great code find you!  Add Codota to your java IDE