Java 如何使用 libGDX 设置纵向模式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23402717/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set portrait mode with libGDX?
提问by DomeWTF
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?
我创建了一个游戏,它在桌面模式下没问题,但是当我在 S3 上启动它时,它进入横向模式,我该如何更改它?
Thank you in advance
先感谢您
回答by Little Child
Have a look at the <activity>
element. You can set the orientation as:
看看<activity>
元素。您可以将方向设置为:
android:screenOrientation=["unspecified" | "behind" |
"landscape" | "portrait" |
"reverseLandscape" | "reversePortrait" |
"sensorLandscape" | "sensorPortrait" |
"userLandscape" | "userPortrait" |
"sensor" | "fullSensor" | "nosensor" |
"user" | "fullUser" | "locked"]
回答by Orlando Herrera
android:screenOrientation:
机器人:屏幕方向:
- landscape
- portrait
- unspecified
- behind
- reverseLandscape
- reversePortrait
- sensorLandscape
- sensorPortrait
- 风景
- 肖像
- 未指明
- 在后面
- 反向景观
- 反向人像
- 传感器景观
- 传感器人像
For more information you can visit: Android Activity Element
有关更多信息,您可以访问:Android Activity Element