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?