I'm trying to change the background color to black in styles.xml. The background changes fine but the actionbar got dirty. Some part of the actiobar background stays the same while the other portion turns black. I don't want the actionbar to change color. Please help
<style name="Theme.ApplicationTheme" parent="@style/Theme.Sherlock">
<item name="android:background">#000000</item> <!-- This line is changing the actionbar color -->
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
</style>
<style name="Widget.MyApplicationTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
<item name="android:background">#2d2d2d</item>
<item name="background">#2d2d2d</item>
</style>
Add following two additional items:
<item name="android:windowBackground">#000000</item>
<item name="android:colorBackground">#000000</item>
So that your style would look like:
<style name="Theme.ApplicationTheme" parent="@style/Theme.Sherlock">
<item name="android:background">#000000</item> <!-- This line is changing the actionbar color -->
<item name="android:windowBackground">#000000</item>
<item name="android:colorBackground">#000000</item>
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</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