I'm starting out in the area of android application development. So I started to develop an application which created 4 layouts (main screen, central subscriber, contact and plans). In the central activity of the subscriber I put a webview and when the client presses the back button of the cell phone you can navigate the pages with this code that I put in the activity java:
Override
public void onBackPressed(){
if (mywebView.canGoBack()){
mywebView.goBack();
} else {
}
Only when the client browses within the webview and returns to the main web page via the cell button, to that page and does not return to the menu.
I tried to create a back button with startactivity in the header to return to the menu, but it gives error saying "the application has stopped."
Thank you in advance for the help!