0

I want get image from url and set to stickerView and convert to bitmap by BitmapFactory for Put on another picture . I want add sticker to picture , but my sticker not in drawable , They are on the web to update.

I get a picture by URL

    Bundle bundle = getIntent().getExtras();
    if(bundle!=null){
        imageURL = "example.com/app/upload/images/image.jpg";
    }
    ImageView imageView = (ImageView) findViewById(R.id.imgPreview1);
    new DownloadImageTask(imageView).execute(imageURL);

I want , set image to setImageResource , But only accepts int

stickerView.setImageResource(my image get by URL in the imgPreview1);


@Override
public void setImageResource(int resId) {
    setBitmap(BitmapFactory.decodeResource(getResources(), resId));
}

Please help thanks

  • 4
    Possible duplicate of [Set Image to a ImageView from URL](https://stackoverflow.com/questions/22008754/set-image-to-a-imageview-from-url) – Parker Jul 01 '17 at 21:00
  • What does this method returns to you? Is it a path or Uri or something else? – Zohaib Hassan Jul 01 '17 at 22:05
  • get image from url and set to stickerView and convert to bitmap by BitmapFactory for Put on another picture . I want add sticker to picture , but my sticker not in drawable , They are on the web to update. – Seyed Mahdi Kermani Jul 02 '17 at 19:05
  • this part of my sorce code : https://github.com/nimengbo/StickerView/blob/master/app/src/main/java/com/example/abner/stickerdemo/view/StickerView.java – Seyed Mahdi Kermani Jul 03 '17 at 03:26

0 Answers0