android - Android studio 3.6 给 android:screenOrientation="portrait" 加红线,需要更改 android:screenOrientation="fullSensor" 吗?
问题描述
当我更新 android studio 3.6 时,它在下面给我一条红线android:screenOrientation="portrait"
。
它的说法是改变为android:screenOrientation="fullSensor"
谁能知道它背后的原因是什么?
解决方案
在 Android Studio 3.6.0 中,我猜他们希望用户处理方向并鼓励开发人员使用 ViewModel 的东西。让我详细解释一下 screenOrientation
android:screenOrientation="portrait"
会给你错误你必须指定
android:screenOrientation="fullSensor" or android:screenOrientation="unspecified"
fullSensor 表示您是否已打开“旋转关闭”,否则它将根据您移动手机而改变方向
未指定表示如果您打开了旋转关闭,那么它将仅保持该方向,如果没有,则它将根据您移动手机而改变方向。
推荐阅读
- c# - IoT Edge 模块 - 远程调试 python 模块问题
- .net - 是否有使用 Directory.Build.Props 从 csproj 项目中引用 sqlproj 项目的正确方法?
- java - 数据集
将其传递给基于 MapFunction 接口的类 Java Spark 时为 null - opc-ua - 创建文件夹或对象有什么区别?
- javascript - 将类添加到选定按钮
- typo3 - TYPO3 9.5 从父元素排序子元素
- javascript - 改变 D3 动画/过渡的方向?
- javascript - React:如何防止表单提交后整数值变为 NaN
- google-colaboratory - TFF:自定义模型实现
- laravel - 作曲家需要 laravel/ui --dev