I am downloading image from url with ion library.It is working like this:
holder.imageView=(ImageView)convertView.findViewById(R.id.image);
Ion.with(holder.imageView).load(image_url);
My imageView
xml:
<ImageView
android:id="@+id/image"
android:layout_width="64dp"
android:layout_height="64dp"
android:src="@drawable/defaultprofile"/>
I want to use this imageview as circular imageview.
I have found that question:How to Make an ImageView in Circular Shape?
But in that question they are using static image.I mean they don't download from url.How can I use circular image with downloading from url or what is the best library for me ?
Use Picasso. It is the best (for me) image downloading library which also handles caching. https://github.com/square/picasso You can also set a placeholder while the image is loading and you can do so much more than that.
For the circular ImageView you can use this library: https://github.com/hdodenhof/CircleImageView or one of the others Butani Vijay gave, but you can also use transformation specifically for Picasso: https://gist.github.com/julianshen/5829333
I'm using Picasso with this transformation method in my own apps.
You can use any one of below :
https://github.com/hdodenhof/CircleImageView
https://github.com/Pkmmte/CircularImageView
https://github.com/lopspower/CircularImageView
You need to create custome ImageView
Example :
And use as below in your layout :