Krishna Mohan Varma Krishna Mohan Varma - 4 months ago 34
Android Question

How to use setImageURI() in android?

I tried

imageView=(ImageView)view.findViewById(R.id.imageView);
Uri photoUrl = profile1.getPhotoUrl();
imageView.setImageURI(photoUrl);


But i dont see anything.
I am getting url when i am printing it
Thanks in advance

tpA tpA
Answer

Try to use picasso for this:

 Picasso.with(context)
           .load(url)
           .placeholder(R.drawable.placeholder)
           .resize(imgWidth, imgHeight)
           .centerCrop()
           .into(image);