[英]How to set up orientation in manifest for tablets as landscape and portrait for phones?
[英]How to set the Portrait and landscape orientation in android manifest file
纵向模式正在运行,横向未显示。
android:screenOrientation="portrait" // 这里我需要显示纵向和横向。
您可以使用:
android:screenOrientation="unspecified"
这是默认值,系统会选择方向。
或者,您可以使用:
android:screenOrientation="fullSensor"
在这种情况下,设备方向传感器确定屏幕方向。
尝试其中一种,看看哪一种最适合您。
编辑:对于特定的 class,您可以这样做:
<activity
android:name=".YOUR_CLASS"
android:screenOrientation="unspecified" // or what you want
android:theme="@style/Theme.Design.NoActionBar"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.