我如何确保我的应用程序仅适用于垂直布局?
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.