I overided onConfigurationChanged() in android 2.3.3 version. When I changed Land-Scape to Portraint, its orientation is changed but from Portrait to Landscape it is not changing. Please help me to change the orientation from Portrait to Landscape.
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
int orientation = this.getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
setContentView(R.layout.settings);
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
setContentView(R.layout.settings);
}
}