首页 > 解决方案 > Chromium for Android:如何始终保持全屏模式

问题描述

我正在创建一个全屏应用程序,但 Chromium 的 UI 有一个 URL 栏,我不知道如何每次都隐藏它。我发现这个功能进入全屏模式,但不能保留它,如果导航到新的URL就会退出

getFullscreenManager().setPersistentFullscreenMode(true);

还有一个问题:如何关闭红色边框?像这张图片:在此处输入图像描述。但只会遇到 Chromium 的问题。

我在这里使用的项目:https ://github.com/kuoruan/Chromium-Android

标签: androidchromium

解决方案


更新您在清单文件中提到的项目主题

<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


推荐阅读