0

I have my test application for Phone in portrait mode and for tab in landscape mode.

I am calling setRequestedOrientation method to set the orientation of the application to SCREEN_ORIENTATION_SENSOR_LANDSCAPE or SCREEN_ORIENTATION_SENSOR_PORTRAIT depending on the device type as I want fix orientation for these device types.

Now i want to implement some functionality when screen orientation changes but my onConfigurationChanged function is not getting called as I am calling setRequestedOrientation in my Activity.

I have added android:configChanges="keyboardHidden|orientation" in my manifest file for receiving configuration change events.

So is there any way by which I can archive both of these functionality?

User7723337
  • 11,857
  • 27
  • 101
  • 182
  • Why don't you just cancel the orientation and set the layouts accordingly. This will permit you you use layouts as you want and you will not be bothered with the orientation changes. – g00dy Aug 05 '13 at 13:41
  • So you are saying, use different layouts for diff screen orientations. but still activity will change orientation when device orientation changes and don't want that, i want activity of fixed orientation but i want to get to know when user changes the orientation. – User7723337 Aug 05 '13 at 14:09

0 Answers0