title: How to use onConfigurationChanged() and newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE in android 2.3.3
body: <p>I am using <code>onConfigurationChanged()</code>. In that, when I am changing from LandScape to Portrait, it is calling <code>if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT)</code> and shifting to Portrait from LandScape. But when I am changing from Portrait to Land-Scape, it is not changing to LandScape because it is calling <code>if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE)</code> so, it is not changing from LandScape to Portrait.
  Please help.</p>
  
  <pre><code>public void onConfigurationChanged(Configuration newConfig) {
          super.onConfigurationChanged(newConfig);
  
          //int orientation = this.getResources().getConfiguration().orientation;
  
          if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
              Log.d("Entered to change as Portrait ","PPPPPPPPPPPPPPPPP");
              setContentView(R.layout.settings);
          } else if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
              Log.d("Entered to change as LandScape ","LLLLLLLLLLLLLLLLLLLL");
              setContentView(R.layout.settings);
          }
  
      }
  </code></pre>