I want to change background image of my application when user select the image from setting activity, I set the background image using theme as:
<style name="Theme" parent="@android:style/Theme">
<item name="android:windowBackground">@drawable/sunset</item>
</style>
Now how can I change the android:windowBackground via code.
From your activity, call getWindow().setBackgroundDrawable(Drawable drawable) or getWindow().setBackgroundDrawableResource(int resid).
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