How to create a custom WebChromeClient and override its onReceivedIcon () or onProgressChanged () methods. OnReceivedIcon () will be launched after loading favIcon and using onProgressChanged (), you can find out about the progress of loading the webview. Hope this helps
Refer to this code snippet
webView.setWebChromeClient(new CustomWebChromeClient());
You can use onProgressChanged or onReceivedIcon whatever suits you.
public class CustomWebChromeClient extends WebChromeClient { @Override public void onProgressChanged(WebView view, int newProgress) { super.onProgressChanged(view, newProgress); if (newProgress==100) { progressBar.setVisibility(View.GONE); progressBar.setProgress(newProgress); } } @Override public void onReceivedIcon(WebView view, Bitmap icon) {
source share