简体   繁体   English

使用Style.XML(全息主题)时无法更改操作栏颜色

[英]Can't change the Actionbar color when using the Style.XML (Holo Theme)

Hi, I've been trying for a long time to change the actionbar color in a very simple basic program using the Android Studio - with no success. 嗨,我很久以来一直在尝试使用Android Studio在一个非常简单的基本程序中更改操作栏颜色,但没有成功。 I'm using my Samsung Galaxy S4 to test it. 我正在使用我的Samsung Galaxy S4进行测试。 What's wrong? 怎么了?

My Manifest includes this line: android:theme="@style/AppTheme" 我的清单包含以下行:android:theme =“ @ style / AppTheme”
and the Style.xml is this one: 而Style.xml就是这样的:

**<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light">
    <!-- Customize your theme here. -->
</style>
<style name="MyActionBar" parent="android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#ff0000</item>
</style>**

像这样更改清单中的名称

 @style/AppTheme to @style/MyActionBar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM