onCreate method is called after calling onConfigurationChanged method in an Activity class
<p>I am a beginner in android programming, now i am working on an android application which displays the data in a sort order by default and also provides a search facility. For this i have written an activity called search that will search the contents and displays in a listview. My problem is when i rotate the device the onCreate method of the Activity class is called even after overridding the onConfigurationChanged method. I had also done the following changes in the manifest file to invoke the onConfigurationChanged method.</p>

<pre><code>&lt;activity
    android:name=".Search"
    android:configChanges="orientation|keyboardHidden"
    android:screenOrientation="sensor" &gt;
&lt;/activity&gt;
</code></pre>

<p>My Search Activity is as follows :</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
  System.out.println("HERE AT ONCREATE");
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    System.out.println("HERE AT ON CONFIGURATION CHANGED");
    if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
        setContentView(R.layout.search_port);
    } else if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
        setContentView(R.layout.search_land);
    }
}
</code></pre>

<p>So the output while rotating the device will be : </p>

<ol>
<li><p>HERE AT ON CONFIGURATION CHANGED</p></li>
<li><p>HERE AT ONCREATE</p></li>
</ol>

<p>I dont want to get the <code>onCreate()</code> method called while rotating the device. Please help me to solve this issue. I am using Android 2.2 SDK with Samsung Galaxy Tab (7 inch display).</p>
