In my application to set background of layout from web url through the JSON. But in image view I am setting like this
try {
ImageView i = (ImageView)findViewById(R.id.animation);
Bitmap bitmap = BitmapFactory.decodeStream((InputStream)new URL("http://alpharithm.in/manager/test/img/files/products/mushroom-soup.jpg").getContent());
i.setImageBitmap(bitmap);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Not to set as a background. How can I set a background for the layout?