Android 后端纵向

发布于 2025-01-05 12:05:44 字数 380 浏览 1 评论 0原文

我尝试更改 Android 后端的方向,但它没有改变 根本.. 我正在尝试添加 :screenOrientation="portrait" 到我的 manifest.xml 但没有结果...

有什么建议如何将我的方向更改为纵向吗?因为在 默认它是风景...

迈克尔贝恩帮助我在谷歌组:

您想要将以下内容添加到 android/src/.../YourGameActivity.java:

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

谢谢 Michael

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...

Any suggestion how to change my orientation to portrait? Becouse in
default it is landscape...

Michael Bayne helped me on google goups with:

You want to add the following to android/src/.../YourGameActivity.java:

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

Thanks Michael

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吃兔兔 2025-01-12 12:05:44

尝试在清单中设置它,如下所示

android:label="@string/app_name" android:screenOrientation="portrait"

Try setting it in your manifest like this

android:label="@string/app_name" android:screenOrientation="portrait"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文