我创建了一个QT/QML应用程序。并将应用程序移植到Android。 现在能够在Android设备上运行应用程序。 我想修改方向模式为横向。QT- Android应用程序中的横向模式
我没有手动编辑AndroidManifest.xml
并设置android:screenOrientation="unspecified"
到android:screenOrientation="sensorLandscape"
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
android:name="org.qtproject.qt5.android.bindings.QtActivity"
android:label="Engage"
android:screenOrientation="sensorLandscape"
android:launchMode="singleTop">
每次当我部署它被覆盖,重置为android:screenOrientation="unspecified"
你有没有建立之前,清楚了吗? 'android:screenOrientation =“landscape”'一如既往地为我工作,同时'sensorLandscape'在快速检查中表现得很好。 – BaCaRoZzo
是的,我清除了构建。同样,在部署应用程序时,它重置为'未指定' –