只有垂直布局 - 安卓 [英] Android - Vertical layout only
本文介绍了只有垂直布局 - 安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何确保我的应用程序仅适用于垂直布局?
How do I make sure my app is only for vertical layout?
我已经试过安卓screenOrientation =画像
但是这似乎并没有这样的伎俩
I have tried android:screenOrientation="portrait"
but that doesn't seem to do the trick.
推荐答案
您需要添加到您的所有活动不是唯一的一个。我想你知道该设置是每个应用广泛,但事实并非如此。
You need to add to all your activity not for one only. I think you understood that setting is per application wide, but it isn't.
<activity android:name=".MyActivity"
android:label="My Activity"
android:screenOrientation="portrait">
中添加声明到活动标签中AndroidManifest你想成为肖像仅隔活动。
Add the declaration to the activity tag in AndroidManifest for every Activity you want to be portrait-only.
这篇关于只有垂直布局 - 安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文