title: onSaveInstanceState and Fragments?
body: <p>How can I get a fragment to save it's state? I've tried everything but no luck, nothing is working.</p>
  
  <p>Ive tried adding:</p>
  
  <pre><code>public void onSaveInstanceState(Bundle outState) {
     super.onSaveInstanceState(outState);
     myWebView.saveState(outState);
     Log.w("///////", "onSaveInstanceState");
  
  }
  </code></pre>
  
  <p>But this never gets called.</p>
  
  <p>Any ideas?</p>
  
  <hr>
  
  <p>I'm now trying to restore the state of the web view:</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
       View mainView = (View) inflater.inflate(R.layout.frag_b, container, false);
       myWebView = (WebView) mainView.findViewById(R.id.webviewtest);
       myWebView.setWebViewClient(new MyWebViewClient());
       myWebView.getSettings().setPluginsEnabled(true);
       myWebView.getSettings().setBuiltInZoomControls(false); 
       myWebView.getSettings().setSupportZoom(false);
       myWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);   
       myWebView.getSettings().setAllowFileAccess(true); 
       myWebView.getSettings().setDomStorageEnabled(true);
       myWebView.loadUrl("http://www.google.com");   
       myWebView.setId(1);
       myWebView.restoreState(savedInstanceState);
       Log.w("///////", "onCreateView");
  
      return mainView;
  }
  </code></pre>
  
  <p>But the above doesnt work, any ideas?</p>