在屏幕上的Android中,即使在清单中阻止了旋转,旋转活动也会被重新创建。它只有在Oneplus6t(安卓9),在较低的操作系统版本,它是好的工作?
<activity
android:name="com.oracle.aconex.drawing.DrawingActivity"
android:configChanges="orientation"
android:exported="false"
android:screenOrientation="fullUser"/>发布于 2019-01-30 04:53:09
不知道确切原因,但当我在configchanges中添加screenSize时,它开始在设备中工作。
<activity
android:name=".drawing.DrawingActivity"
android:configChanges="orientation|screenSize"
android:exported="false"
android:screenOrientation="fullUser"
/>发布于 2019-01-26 08:38:20
从Android开发者网站,
"fullUser“如果用户锁定了基于传感器的旋转,这与用户的行为相同,否则它的行为与fullSensor相同,并允许4种可能的屏幕方向中的任何一种。在API级别18中添加。
据我所知,只要用户不锁定自动旋转功能,设备和应用程序仍然可以响应自动旋转。我建议使用portrait或landscape来完全防止应用程序的自动旋转。如果您需要一些旋转自由,请使用sensorPortraint或sensorLandscape。
https://stackoverflow.com/questions/54376352
复制相似问题