I wanted to set Linear Layout background dynamically in the following way:
Fetch image from web url through XML parsing and then store that image into sd card.<
An easier way:
BitmapDrawable d = new BitmapDrawable("/sdcard/data/image.jpg"); linearLayout.setBackgroundDrawable(d);