title: Return button close the WebView app
body: <p>I have a application as below that runs as FullScreen.NoTitleBar:</p>
  
  <pre><code>public class BrowserActivity extends Activity {
  private String lastUrl = "http://www.google.com";
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.main);
  
      WebView web = (WebView) findViewById(R.id.webview);
  
      WebSettings settings = web.getSettings();
      settings.setJavaScriptEnabled(true);
      settings.setJavaScriptCanOpenWindowsAutomatically(false);
      settings.setSupportMultipleWindows(false);
      settings.setSupportZoom(false);
      settings.setPluginsEnabled(true);
  
      web.setWebViewClient(new WebViewClient() {
          public boolean shouldOverrideUrlLoading(WebView view, String url) {
              lastUrl = url;
              view.loadUrl(url);
              return true;
          }
      });
      web.setVerticalScrollBarEnabled(false);
      web.setHorizontalScrollBarEnabled(false);
  
      web.loadUrl(lastUrl);
  }
  }
  </code></pre>
  
  <p>The "lastUrl" is used for handle orientation changes and let the user on the same page that he was while navigating.</p>
  
  <p>But my problem is, if the user follow some links then hit the return button, the application just closes instead of returning a page back. How can I handle it?</p>