Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set portrait mode with libGDX?

Tags:

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

like image 947
DomeWTF Avatar asked May 01 '14 05:05

DomeWTF


2 Answers

enter image description here

android:screenOrientation:

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

For more information you can visit: Android Activity Element

like image 83
Orlando Herrera Avatar answered Oct 03 '22 23:10

Orlando Herrera


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"]
like image 43
An SO User Avatar answered Oct 03 '22 21:10

An SO User