restore of webview state not working in android
<p>I have two layout files for potrait and landscape like layout and layout-land .I have webview in my layout .I want to restore the state of webview can anybody tell how to do?</p>

<p>can anybody tell how to retrieve the state of url?</p>

<p>In manifest file I didn't mention android:confichanges="orientation" because of two design
I have done like this below but its not working can anybody tell what is problem
 save the state</p>

<pre><code>@Override
      protected void onSaveInstanceState(Bundle outState )
      {     
          commentWebView.saveState(outState); 


          // (WebView) findViewById(R.id.txtComment).saveState(outState);
          } 
</code></pre>

<p>and restore the state</p>

<pre><code> if (savedInstanceState != null) 
          {
                  //((WebView)findViewById(R.id.txtComment)).restoreState(savedInstanceState); } 
              commentWebView.restoreState(savedInstanceState); 
              if(this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT)
                {
                  imgInfo.setBackgroundResource(R.drawable.info);
                imgComment.setBackgroundResource(R.drawable.commentsactive);
                commentWebView.setVisibility(View.VISIBLE);

                }

         } 
          else
          {

     String url="http://preview.unstructure.org/unstruc/unstruc.php?i="+videoPostBean.getVideo_title().replaceAll(" ", "-");

     commentWebView.loadUrl(url);
         }
</code></pre>

<p>Thanks</p>
