简体   繁体   English

带有纵向方向的Android后端

[英]Android backend with portrait orientation

I try to change orientation for android backend but it doesn't change at all.. I am trying with adding :screenOrientation="portrait" to my manifest.xml but with no resoult... 我尝试更改android后端的方向,但它完全没有改变..我尝试将:screenOrientation =“ portrait”添加到manifest.xml中,但没有结果...

Any suggestion how to change my orientation to portrait? 任何建议如何将我的方向更改为肖像? Becouse in default it is landscape... 因为默认情况下它是风景...

Michael Bayne helped me on google goups with: 迈克尔·拜恩(Michael Bayne)通过以下方式帮助我完成了Google组:

You want to add the following to android/src/.../YourGameActivity.java: 您要将以下内容添加到android / src /.../ YourGameActivity.java:

@Override public boolean usePortraitOrientation () {
    return true;
} 

Thanks Michael 谢谢迈克尔

Try setting it in your manifest like this 尝试像这样在清单中设置它

android:label="@string/app_name" android:screenOrientation="portrait" android:label =“ @ string / app_name” android:screenOrientation =“纵向”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM