retain state not working in android
<p>I have two different layout for activity like layout-land layout-port  with different design .I had given below code but state is maintain but potrait design is coming in landscape mode .can anbody tell how to avoid this? can anybody provide sample?</p>

<p>I have mention android:configChanges="orientation"</p>

<pre><code>@Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putInt("bufferedPercentage", video.getBufferPercentage());
        commentWebView.saveState(outState);


        //Toast.makeText(this, "Activity state saved", Toast.LENGTH_LONG).show();
    }



if(savedInstanceState!=null)
         {
             commentWebView.restoreState(savedInstanceState);
         }
</code></pre>
