正在尝试设置android actionbar 2.1版(API 7)及以上版本的背景
好吧,我一直在尝试设计我的动作条,但它似乎不起作用 themes.xml正在尝试设置android actionbar 2.1版(API 7)及以上版本的背景,android,android-layout,android-actionbar,Android,Android Layout,Android Actionbar,好吧,我一直在尝试设计我的动作条,但它似乎不起作用 themes.xml <resources> <!-- the theme applied to the application or activity --> <style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <
<resources>
<!-- the theme applied to the application or activity -->
<style
name="CustomActionBarTheme"
parent="@style/Theme.AppCompat.Light.DarkActionBar">
<!-- Support library compatibility -->
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<!-- ActionBar styles -->
<style
name="MyActionBar"
parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<!-- Support library compatibility -->
<item name="background">@drawable/actionbar_background</item>
</style>
</resources>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/CustomActionBarTheme" >
@样式/MyActionBar
@可绘制/操作栏\u背景
manifest.xml
<resources>
<!-- the theme applied to the application or activity -->
<style
name="CustomActionBarTheme"
parent="@style/Theme.AppCompat.Light.DarkActionBar">
<!-- Support library compatibility -->
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<!-- ActionBar styles -->
<style
name="MyActionBar"
parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<!-- Support library compatibility -->
<item name="background">@drawable/actionbar_background</item>
</style>
</resources>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/CustomActionBarTheme" >
我确保在正确的文件夹中有actionbar_background.png(基本上是一个带颜色的正方形图像)。然而。当我运行up时,我仍然看到旧的操作栏,好像没有任何变化。不是缓存,我只是尝试在不同的设备上运行它,一个虚拟设备都显示了旧的操作栏。这里回答:谢谢,这是解决方案