-2

How to load images in same image view from web or local android gallery?

I have an image view which has three options for loading images templates from web service,from gallery, from camera.I am using Glide library to load images from web service, Now, if i load image from web by glide and remove that image by remove button which i have for removing a picture after i pick image from gallery it doesn't load the image from gallery instead load the same image from glide which i removed before.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Sarim Ahmed
  • 195
  • 7
  • 2
    Possible duplicate of [Load image from SD card using Glide](https://stackoverflow.com/questions/34443171/load-image-from-sd-card-using-glide) – Maddy Aug 11 '17 at 12:36

2 Answers2

0

write the code like this for loading image .

Glide.with(mContext).load(imgUrl)
                .thumbnail(0.5f)
                .crossFade()
                .diskCacheStrategy(DiskCacheStrategy.ALL)
                .into(imageView);

Glide Library Intoduction Go through with this link, hope it will be work

Amit Verma
  • 391
  • 2
  • 18
0

You can use Picasso library. Image loading using Picasso is very easy, you can do it like this way

Picasso.with(context).load("https://i.stack.imgur.com/jEIKP.jpg").into(imageView);

and in their website you can get every details.

and another Library is Glide. You can use Glide too for loading image..

You can also use Glide:

Glide.with(context).load(image).asBitmap().placeholder(R.drawable.placeholder).error(R.drawable.error).into(imageview);

Upendra Shah
  • 2,218
  • 17
  • 27