mirror of
https://github.com/etesync/android
synced 2024-11-29 11:28:19 +00:00
parent
277da4a770
commit
182d6ebe66
@ -55,7 +55,10 @@ public class WebViewActivity extends BaseActivity {
|
|||||||
mProgressBar = (ProgressBar) findViewById(R.id.progressBar);
|
mProgressBar = (ProgressBar) findViewById(R.id.progressBar);
|
||||||
|
|
||||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||||
|
if (savedInstanceState == null) {
|
||||||
mWebView.loadUrl(uri.toString());
|
mWebView.loadUrl(uri.toString());
|
||||||
|
}
|
||||||
|
|
||||||
mWebView.setWebViewClient(new WebViewClient() {
|
mWebView.setWebViewClient(new WebViewClient() {
|
||||||
@Override
|
@Override
|
||||||
public void onPageFinished(WebView view, String url) {
|
public void onPageFinished(WebView view, String url) {
|
||||||
@ -190,6 +193,12 @@ public class WebViewActivity extends BaseActivity {
|
|||||||
mWebView.saveState(outState);
|
mWebView.saveState(outState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||||
|
super.onRestoreInstanceState(savedInstanceState);
|
||||||
|
mWebView.restoreState(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user