I have an app that uses the AppCompat
support libary for ActionBars
. Now I tried to create a new themes.xml file with some style for that purpose.<
Add the below in styles.xml
under res/values-14
<style name="Theme.Styled" parent="@style/Theme.AppCompat.Light">
<!-- Setting values in the android namespace affects API levels 14+ -->
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>
<style name="Widget.Styled.ActionBar" parent="@style/Widget.AppCompat.Light.ActionBar">
<!-- Setting values in the android namespace affects API levels 14+ -->
<item name="android:background">#FFFFFF</item>
</style>
You would then need add the following into the values folder: res/values/styles.xml
<style name="Theme.Styled" parent="@style/Theme.AppCompat.Light">
<!-- Setting values in the default namespace affects API levels 7-13 -->
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>
<style name="Widget.Styled.ActionBar" parent="@style/Widget.AppCompat.Light.ActionBar">
<!-- Setting values in the default namespace affects API levels 7-13 -->
<item name="background">#FFFFFF</item>
</style>
For more details
http://android-developers.blogspot.in/2013/08/actionbarcompat-and-io-2013-app-source.html
Notice the change for API level 14+
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
To API level 7-13
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>