I am developing an app having one activity have two different views for Landscape
and Portrait
mode. Everything fine on handling orientation but the problem is that I want to show Landscape
mode first and then user can change orientation to portrait later whether previous activity is in Portrait
mode.
when I am forcefully defining orientation to landscape
in manifest or by calling in onCreate setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
then method onConfigurationChanged
@Override
public void onConfigurationChanged(Configuration newConfig) {
// TODO Auto-generated method stub
super.onConfigurationChanged(newConfig);
}
not being called.
I have also defined
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
in Manifest .
Any help will appreciable.