I am using the support v7 library to implement ActionBar in my app..I have this in my styles.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?
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With