Alex
Alex

Reputation: 741

screenorientation from landscape to portrait doesn't work

I have a problem in my app regarding the screenorientation. I can rotate my screen from Portrait to Landscape without any problems, but once I rotate it from Landscape to Portrait it still displays the Landscape screen (rotated by 90°).

Upvotes: 2

Views: 632

Answers (1)

Yoni Samlan
Yoni Samlan

Reputation: 38065

This is all just guesswork because you didn't post any code, but are you letting the activity destroy and recreate itself? If you deliberately prevent the system from re-creating the layout (by putting android:configChanges="keyboardHidden|orientation" in your manifest, for instance) then the system won't load the resources for the new configuration on its own anymore (particularly, if you have a different landscape layout defined, it won't know to load it). You'll want to get rid of any rotation-ignoring code like that.

Upvotes: 2

Related Questions