I am trying to change the color of the ActionBar of a new Android application made by the Eclipse wizard, after the Android tutorial ( here ), but I had some problems.
I set minSdkVersion to 10 (it should be android 2.1 or so).
When I embed this code in theme.xml (as stated in the lesson):
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomActionBarTheme"
parent="@style/AppTheme">
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyActionBar"
parent="@style/AppTheme">
<item name="android:background">#FFFFFF</item>
<item name="background">#FFFFFF</item>
</style>
</resources>
Eclipse give me these errors:
- line 5: android: actionBarStyle requires API level 11 (current min is 10)
- line 8: error: error: no resource was found matching the specified name: attr 'actionBarStyle'.
- line 16: error: error: resource not found which matches the specified name: attr 'background'.
I changed the little things (base theme and color), however the clean code is in the tutorial.
My Styles.xml :
<style name="AppBaseTheme" parent="android:Theme.Light">
</style>
<style name="AppTheme" parent="AppBaseTheme">
</style>
</resources>
?