Applying a theme to v7 Support Action Bar
12,038
You need to provide two API specific styles.xml. In your values/styles.xml use
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/ActionBarTheme</item>
</style>
and in your values-v14/styles.xml use
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ActionBarTheme</item>
</style>
Comments
-
Charlie-Blake almost 2 years
I am using the support v7 library to implement
ActionBar
in my app..I have this in mystyles.xml
file<?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="android:actionBarStyle">@style/ActionBarTheme</item> </style> <style name="ActionBarTheme" parent="android:Widget.ActionBar"> <item name="android:background">#FFFF0000</item> </style> </resources>
However, Eclipse complains in the
actionBarStyle
line. The error is this one:android:actionBarStyle requires API level 11 (current min is 8)
What can I do to apply my theme to API levels 8-10?