我有这种风格定义
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated with http://android-holo-colors.com -->
<resources>
<style name="FUTheme" parent="@style/_FUTheme"/>
<style name="_FUTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/MyActionBar</item>
<!-- Support library compatibility -->
<item name="actionBarStyle">@style/MyActionBar</item>
....
</style>
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">#7C2582</item>
<!-- Support library compatibility -->
<item name="background">@drawable/futheme_list_selector_holo_light</item>
</style>
</resources>
在我的清单中
android:theme="@style/FUTheme"
我做错了什么?我正在使用AppCompat库
答案 0 :(得分:-2)
将它放在onCreate void in Activity。
ActionBar bar = getActionBar();
bar.setBackgroundDrawable(new. ColorDrawable(Color.parseColor("#0000ff")));