java - Android WebView, how to code for device back button? -


i developing 1 app, has 2 activities. second activity has button using web view. when clicking on button going on web view when pressing on button of device app going first activity, want go again on second activity. how can implement tried many techniques. here code.

public void onbackpressed (){  if (webview.isfocused() && webview.cangoback()) {         webview.goback();        } else {         super.onbackpressed();  } } 


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -