javascript - Android webview go back not working while rendering html -


hi developing android application in trying load web view.

webview.loaddatawithbaseurl(targeturl, object.tostring(), "text/html", "utf-8", null);

inside webview have link inside page. once user click on link renders next page. problem here if user click device button renders blank page. not rendering web page.

if (webview != null && webview.cangoback()) {         webview.goback();     } else {         intent = new intent(this, another.class);         startactivity(i);         finishactivity();     } 

how handle thing. need help. thank you.

try code :

@override public boolean onkeydown(int keycode, keyevent event) {     if (event.getaction() == keyevent.action_down) {         switch (keycode) {             case keyevent.keycode_back:                 if (mwebview.cangoback()) {                     mwebview.goback();                 } else {                     //do thing else.                 }                 return true;         }      }     return super.onkeydown(keycode, event); } 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -