20

I've created a game, and it is OK in desktop mode, but when i launch it on my S3, it goes in landscape mode, how can i change it?

Thank you in advance

DomeWTF
  • 2,342
  • 4
  • 33
  • 46
  • 3
    You can set the screen orientation in the AndroidManifest. android:screenOrientation="landscape"or your desired orientation. But you should provide more context. – Ronald Meijboom May 01 '14 at 05:59
  • i wanted to do so, but i'm using the 1.0 version of libgdx in android studio and there isn't any android manifest... – DomeWTF May 01 '14 at 06:00
  • 2
    Of course there is, check the Android project. It is being generated by both the old and the new setup UIs. – noone May 01 '14 at 06:21
  • sorry, that was my error, i'm new to the android studio and i was using the packages view instead of the project view – DomeWTF May 01 '14 at 06:25

2 Answers2

27

enter image description here

android:screenOrientation:

  • landscape
  • portrait
  • unspecified
  • behind
  • reverseLandscape
  • reversePortrait
  • sensorLandscape
  • sensorPortrait

For more information you can visit: Android Activity Element

Orlando Herrera
  • 3,481
  • 1
  • 34
  • 44
16

Have a look at the <activity> element. You can set the orientation as:

android:screenOrientation=["unspecified" | "behind" |
                                     "landscape" | "portrait" |
                                     "reverseLandscape" | "reversePortrait" |
                                     "sensorLandscape" | "sensorPortrait" |
                                     "userLandscape" | "userPortrait" |
                                     "sensor" | "fullSensor" | "nosensor" |
                                     "user" | "fullUser" | "locked"]
An SO User
  • 24,612
  • 35
  • 133
  • 221