简体   繁体   中英

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. I'm using my Samsung Galaxy S4 to test it. What's wrong?

My Manifest includes this line: android:theme="@style/AppTheme"
and the Style.xml is this one:

**<!-- 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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