用android studio打包app时设置横屏,为什么不生效?
设置了setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
和在activity设置了

- 发布:2019-10-12 10:02
- 更新:2019-10-14 09:30
- 阅读:864


2***@qq.com (作者)
manifest 标签加上xmlns:tools="http://schemas.android.com/tools"
在加上下面就竖屏了 tools:replace 就是设置代替lib.5plus.base-release.aar中的设置
<activity
android:name="io.dcloud.PandoraEntryActivity"
android:hardwareAccelerated="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait"
tools:replace="android:screenOrientation"
android:theme="@style/DCloudTheme"
android:windowSoftInputMode="adjustResize" >
</activity>