Reputation: 3826
I am trying to set the background globally in the styles.xml using the following code
styles.xml
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="android:Theme.Light" >
<item name="android:background">@drawable/background</item>
</style>
</resources>
I have also added it in AndroidManifest.xml file
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:theme="@style/AppTheme">
....
</application>
But the image is not getting displayed. I have images in all the drawable folders.
Upvotes: 0
Views: 138
Reputation: 56925
Try this.
<style name="Theme" parent="@android:style/Theme">
<item name="android:windowBackground">@drawable/background</item>
</style>
Upvotes: 1