Tyde
Tyde

Reputation: 343

Change Activity Background while using ActionBarSherlock

I've changed the background color of my ActionBar in my App, and it worked fine. But then I wanted to change my background color in my activity and now it is looking quite bad.

Here is my theming xml:

<style name="TucanActionBarStyle" parent="Widget.Sherlock.Light.ActionBar">
    <item name="android:background">@color/actionbar_green</item>
</style>


<style name="Theme.TucanActionBar" parent="@style/Theme.Sherlock.Light">
    <item name="android:actionBarStyle">@style/TucanActionBarStyle</item>   
    <item name="android:background">@android:color/white</item>
</style>

And that is how it looks: http://dl.dropbox.com/u/2683101/Screenshot_2012-05-18-19-49-23.png

Upvotes: 3

Views: 938

Answers (1)

Jake Wharton
Jake Wharton

Reputation: 76075

You should be using android:windowBackground to change the activity background. Changing android:background will affect many other things due to how the context and ContextThemeWrappers are used.

Upvotes: 8

Related Questions