Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 主题不起作用_Android_Xml_Android Layout_Android Studio - Fatal编程技术网

Android 主题不起作用

Android 主题不起作用,android,xml,android-layout,android-studio,Android,Xml,Android Layout,Android Studio,我已将styles.xml中的应用程序主题设置为AppCompat.Light.NoActionBar,但它没有在可视化编辑器中隐藏操作栏 这是Styles.xml文件: <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Custo

我已将styles.xml中的应用程序主题设置为AppCompat.Light.NoActionBar,但它没有在可视化编辑器中隐藏操作栏

这是Styles.xml文件:

<resources>

    <!-- Base application theme. -->
        <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

</resources>

@颜色/原色
@颜色/原色暗
@颜色/颜色重音
这就是结果:


如果要隐藏状态栏,可以使用此选项

<style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="@style/Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

真的
假的
真的
@空的
还将此添加到清单中的活动中

<activity
   android:name=".activities.FullViewActivity"
   android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" 
/>


它是一个
状态栏
操作栏
不工作。这就是错误:这不起作用。这是我得到的错误:@EthanAdamsI已经为您更改了我的解决方案。请检查此项。它应该做你的工作