- I load HTML data into WebView with loadDataWithBaseURL
- Do it one more time
Execute the following code and instead of going back to the 1st page - whole app exits. What am I doing wrong here?
public boolean onKeyDown(final int keyCode, final KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && this.browser.canGoBack()) { this.browser.goBack(); return true; } return super.onKeyDown(keyCode, event);
}
Also - is it possible for WebView cache to survive Activity#onStop? Basically - if I close app and reopen - I want WebView to display last data that was loaded, currently - I'll get a blank screen and then have to reload same data again