-1

When WebViewClient.onPageFinished is called? When html is loaded or when html, css, js are all loaded?

When is beginning of js execution? Before WebViewClient.onPageFinished or after WebViewClient.onPageFinished?

rafsanahmad007
  • 23,683
  • 6
  • 47
  • 62
  • Welcome to [Stack Overflow](http://stackoverflow.com/) ! Please read [How to Ask Question](http://stackoverflow.com/help/how-to-ask) and provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) ! – Saurabh Bhandari Mar 16 '17 at 10:09
  • @SaurabhBhandari the question is complete. this comment doesn't require here. – Vishal Chhodwani Mar 16 '17 at 10:14
  • Go through this: http://stackoverflow.com/questions/3149216/how-to-listen-for-a-webview-finishing-loading-a-url – rafsanahmad007 Mar 16 '17 at 10:18

1 Answers1

1

Here are your answers.

  • when you call mWebView.loadUrl(url) then onPageStarted() called, it means your page started to load.

  • during the loading of page some resources like images, files, js are loading then onLoadResource() called, and it can called multiple times.

  • when page loaded all resources and complete all its loading then onPageFinished() called.

Vishal Chhodwani
  • 2,567
  • 5
  • 27
  • 40