1

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?

midhunhk
  • 5,470
  • 7
  • 50
  • 79
Yugesh
  • 3,928
  • 8
  • 53
  • 93

1 Answers1

1

You can get reference form this.

Set Linear Layout Background

Hope this will be helpfull to you.

Community
  • 1
  • 1
AngryBird
  • 344
  • 1
  • 4
  • 15