Sunday, 23 August 2015

android webview

The are two very useful function in "WebViewClient"   :


The first function is more accurate for catching a page is loaded. The second function sometimes gives more. e.g. if you post a form to the same page, the first function will not get called, but the second one will.

The first function will get called before a url is get loaded.

The second function will get called after a url is get loaded.

So to run an js script. the second function is the right place. but it may not accurate, so, conbine them together is a better solution.

No comments:

Post a comment