I added android:configChanges="orientation" and I override onConfigurationChanged() . What I would like to do is change the orientation of the landscape only if the device has a screen resolution with a resolution in tablets (the shorter side is larger than 480 pixels - suggestions on the best way to handle this are welcome!). I thought this would work in one of two ways, but none of them work in my tests either on my phone or in the emulator.
My first idea was to not call the implementation of the onConfigurationChanged() superclass, but I get an exception that complains that I am not calling the superclass.
My second idea was to simply manually set newConfig.orientation to Configuration.ORIENTATION_PORTRAIT before passing it to the superclass. Between my activity and the actual Activity class in the structure, I have an ActivityBase class that I use, where I also override this. I can push the value of newConfig.orientation in the ActivityBase to see that the passed configuration object does have a new value, but it is ignored and a change in orientation has already occurred.
Where can I put code that allows me to conditionally short-circuit orientation changes in some cases and allow it in others?
source share