Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a game in LibGDX and the game screen orientation is in landscape. I want it to stay in landscape but I still want the user to be able to flip the device onto the other side and the screen will rotate with it. My application refuses to do that and I don't know what to do to fix that. I tried turning on my accelerometer and compass (wasn't expecting anything from compass) but nothing changed. Any ideas?

share|improve this question
up vote 15 down vote accepted

It defaults to locked on "landscape" mode in a libGDX project. You need to go into your "AndroidManifest.xml" and change android:screenOrientation="landscape" too android:screenOrientation="sensorLandscape"

There are more options - Just replace "sensorLandScape" with the one you want.

share|improve this answer
But I don't want it to switch to portrait but I do want it to switch sides. So if you have your device on one side the screen will stay the same but if want it on another side BUT still landscape it will switch to the other side. – G3tinmybelly Mar 31 '14 at 20:16
OOO my bad, add "reverseLandscape" I think – Krtko Mar 31 '14 at 20:17
just FYI,… – Krtko Mar 31 '14 at 20:19
reading the docs there, i think you need "sensorLandscape" – Krtko Mar 31 '14 at 20:20
Thank you very much that did the job! – G3tinmybelly Mar 31 '14 at 20:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.