Code example for WebView

Methods: canGoBackgoBack

0
    } 
 
    @Override 
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            if (webView.canGoBack()) {
                webView.goBack();
                return true; 
            } 
        } 
        return super.onKeyDown(keyCode, event);
    } 
 
    private final class HelpClient extends WebViewClient {
        @Override 
        public void onLoadResource(WebView webView, String url) {
            setProgressBarIndeterminateVisibility(true);
            setTitle(getResources().getString(R.string.help_loading));
            super.onLoadResource(webView, url);
        }