Code example for WebView

Methods: saveState

0
   @Override 
   public void onSaveInstanceState(Bundle outState) {
      super.onSaveInstanceState(outState);
 
      if (mWebView != null) {
         mWebView.saveState(outState);
      } 
   } 
 
   @Override 
   public void onPause() { 
      super.onPause(); 
      mWebView.onPause();
      CookieSyncManager.getInstance().stopSync();
   } 
 
   @Override 
   public void onResume() { 
      mWebView.onResume();
      CookieSyncManager.getInstance().startSync();