I am trying to create a background for the action bar for versions 2.2> =. I want to have a dark red color in the title and lighter on the tabs. I have a similar file placed in v11 values and v14 values respectively. It works in accordance with the requirements of ICS and Kitkat I. At 2.x, the color on backgroundStacked is displayed both on the title bar and on the tabs.
Why is this happening? I do not want to use Android Asset Studio, because I do not want to add additional images, if possible.
res/values/styles.xml
<style name="MyAppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar.Solid">
<item name="background">@color/dark_red</item>
<item name="backgroundStacked">@color/lighter_red</item>
<item name="titleTextStyle">@style/MyActionBarTabText</item>
</style>
<style name="MyActionBarTabText" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">@color/white</item>
</style>
source
share