android - Chromium for Android:如何始终保持全屏模式
问题描述
我正在创建一个全屏应用程序,但 Chromium 的 UI 有一个 URL 栏,我不知道如何每次都隐藏它。我发现这个功能进入全屏模式,但不能保留它,如果导航到新的URL就会退出
getFullscreenManager().setPersistentFullscreenMode(true);
解决方案
更新您在清单文件中提到的项目主题
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
注意: windowNoTitle 为 true,windowActionBar 为 false
推荐阅读
- regex - 路径验证 - 尝试修改我的正则表达式,使其仅匹配包含带扩展名的文件名的路径
- google-sheets - 排除包含特定单词的单元格的独特公式?
- python - 如何使用 __array_finalize__ 将方法添加到 ndarray 的子类?
- python - 有谁知道为什么我在尝试将列表转换为字典时收到此错误?
- shell - 在多个项目上迭代类似的命令
- pytorch - 未为 coremltools 实现 op 'len' 的 PyTorch 转换功能
- javascript - 从动态列表中渲染动态组件
- javascript - Angular - 将数据订阅到可观察的返回未定义
- karate - 空手道:@parallel=false 功能仍在并行运行
- python - Python GitLab - 获取工件导致列表错误