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.<
Try to use this:
Bitmap bmpOriginal = BitmapFactory.decodeResource(getResources(), R.drawable.img); BitmapDrawable bmpBackground = new BitmapDrawable(getResources(), bmpOriginal)