【发布时间】:2021-10-15 13:47:22
【问题描述】:
我创建了一个 Android 应用,它要求屏幕仅处于纵向模式。 在输入 IDE 时,仅显示此作为方向。
android:orientation="vertical"
上面的代码实际上在模拟器中工作。但是当我在物理设备上检查它时。即使使用该代码,该应用程序也会旋转到横向。我该如何解决?
我检查了 screenOrientation 没有工作。 提前致谢
【问题讨论】:
-
在清单中使用 android:screenOrientation="portrait" 进行活动
-
screenOrientation 也不起作用。
标签: android screen orientation