set image source to Bitmap in Drawable

view story

http://stackoverflow.com – I have created XML file in drawable folder as code below: XML Name is : background_bitmap_layout.xml <?xml version="1.0" encoding="utf-8"?> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center" android:src="@drawable/background" android:tileMode="disabled" /> Now, I want set the image to this xml file dynamically[through code]. I am making an app in which I have to set different background in each activity and those images are coming from online. I did not found any solution to set the image src to this xml file as bitmap. however I have (HowTos)