I'm attempting to modify the theme for my application. I've been able to successfully set the background color for my app, and the background color for my action bar.
Unfortunately, the background color of the items WITHIN the action bar are taking the background color of the app, not the bg color of the action bar.
Here's my code from styles.xml
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:actionBarStyle">@style/MyActionBar</item>
<item name="android:background">#ff0000</item>
</style>
<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">#fefefe</item>
</style>
and here's a screenshot of what's happening.
Hoping I'm missing something stupid here...
Thanks!
I'm pretty sure your theme background is being applied to everything. Instead, you only want the activity's background to be that color. So instead of setting the background color in the theme, you should set it for the activity. If you have many activities that will use this background color, then create a style for your activities and apply it to each one.
Try using:
Worked for me.