Android Webview shouldOverrideUrlLoading method -


when shouldoverrideurlloading method called?

webview.setwebviewclient(new webviewclient(){     @override     public boolean shouldoverrideurlloading(webview view, string url) {       } }); 
  1. is called during initial loading of url? e.g. webview.loadurl( "file:///android_asset/html/index.html");
  2. is called everytime url of webview changes?

any reference? didn't find one. thanks

  1. it however, called when webview load different url 1 user had requested.

  2. calling loadurl() trigger shouldoverrideurlloading() method. (only when new url loaded.)

give host application chance take on control when new url loaded in current webview. if webviewclient not provided, default webview ask activity manager choose proper handler url. if webviewclient provided, return true means host application handles url, while return false means current webview handles url.

ref : public boolean shouldoverrideurlloading (webview view, string url)


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -