Addev
Addev

Reputation: 32273

Change the background of all the activities in the app

I'm trying to define a background as default for all the activities in the app. So I have used:

<style name="testStyle" parent="@android:style/Theme.NoTitleBar">
    <item name="android:background">@color/app_background_color</item>
</style>

and then in the manifest

<application
    android:icon="@drawable/icon"
    android:theme="@style/testStyle" 
    .....

But that way the background is applied to other elements like Dialogs title and Toasts backgrounds. How can I make that style only affect the background of the activities?

Thanks

Upvotes: 2

Views: 739

Answers (1)

Jason Hanley
Jason Hanley

Reputation: 3225

Use android:windowBackground in your theme.

Upvotes: 1

Related Questions