Krishna Mohan Varma Krishna Mohan Varma -5 years ago 246
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

Answer Source

Try to use picasso for this:

 Picasso.with(context)
           .load(url)
           .placeholder(R.drawable.placeholder)
           .resize(imgWidth, imgHeight)
           .centerCrop()
           .into(image);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download