Android 导航栏覆盖颜色

Android 导航栏覆盖颜色,android,android-styles,navigationbar,Android,Android Styles,Navigationbar,所以我有一个应用程序,所有的屏幕都满了。事实上,即使在用户点击时,状态栏和导航栏也会隐藏。现在的问题是,当导航栏被隐藏时,它的位置有一个黑色层 我的风格是这样的 <style name = "NoActionBar" parent = "@android:style/Theme.NoTitleBar.Fullscreen"> <item name = "android:windowActionBar">false</item> <ite

所以我有一个应用程序,所有的屏幕都满了。事实上,即使在用户点击时,状态栏和导航栏也会隐藏。现在的问题是,当导航栏被隐藏时,它的位置有一个黑色层

我的风格是这样的

<style name = "NoActionBar" parent = "@android:style/Theme.NoTitleBar.Fullscreen">
    <item name = "android:windowActionBar">false</item>
    <item name = "android:windowNoTitle">true</item>
</style>
这是我的
.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:id="@+id/rl_main">
<WebView
    android:id="@+id/webView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>
</RelativeLayout>

我试过:

android:fitsSystemWindows=“true”


假的
真的
@android:彩色/黑色
假的
假的
假的

什么都没用。任何帮助都将不胜感激。TIA

这是您可以全屏显示活动的方式

编辑styles.xml

<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">#00ffffff</item>
<item name="android:windowDrawsSystemBarBackgrounds" tools:targetApi="lollipop">true</item>
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowFullscreen">true</item>
false
真的
#00ffffff
真的
真的
真的

您必须至少显示xml布局和activity.onCreate。@luiscosta我已经添加了xml。onCreate中没有新的调用,只需设置内容并初始化webview。工具栏在哪里D如果您根本没有工具栏,为什么要隐藏它?请尝试将其添加到清单中的活动:
android:theme=“@android:style/theme.transparent.NoTitleBar”
我不是在说工具栏。这是软导航栏(底部带有home n recent按钮),它会引起问题。这应该是什么基本主题?
<style name="NoActionBar" parent="@android:style/Theme.NoTitleBar.Fullscreen">
    <item name="android:windowActionBar">false</item>
    <item name="android:windowNoTitle">true</item>
    <item name="actionModeBackground">@android:color/black</item>
    <item name="android:windowDrawsSystemBarBackgrounds">false</item>
    <item name="android:windowTranslucentNavigation">false</item>
    <item name="android:windowActionModeOverlay">false</item>
</style>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">#00ffffff</item>
<item name="android:windowDrawsSystemBarBackgrounds" tools:targetApi="lollipop">true</item>
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:windowFullscreen">true</item>