When i have started my career as an Android Developer in around 2013 i have gone through lot of different design tasks like round corner view, shadow on custom view, highlight the button when it gets clicked etc. These tasks looks smaller now but as a beginner in android development it takes lot of time because you don’t know whether there is any kind of default functionality available or not.
One of the most common task was to create Circular ImageView. Whenever i get a new project, there is a screen where you have to implement Circular ImageView. Either it will be in profile screen or within some listing.
Today we will see what are the different ways to create Circular ImageView in Android. There are lot many libraries to customize your ImageView and make it rounded. Few of them are :
First most library i have used is CircularImageView created by Henning Dodenhof. You just need to write few lines of code in your xml
And that’s it, output will look similar to this
Another nice library is developed by Mikhael Lopez
CircularImageView - Create circular ImageView in Android in the simplest way possible.
It gives you a way to add shadow to your CircularImageView. Like other library, implementation is same, you just need to write few lines of code in xml.
Here is the list of few more libraries which provide similar kind of functionalities
CircularImageView - Custom view for circular images in Android while maintaining the best draw performance
RoundedImageView - A fast ImageView that supports rounded corners, ovals, and circles.
android-shape-imageview - Custom shaped android imageview components
CircleImageView is a component which display circle image with customization options
Similarity in all these libraries is that it will give you a customized ImageView and image will be fitted on that.
There are few more libraries which provides you a way to directly download image from url and make it rounded. I have seen GlideTransformation and PicassoTransformation library created by wasabeef which provides similar kind of functionality.
Now if you have a task related to Circular Images, don’t get afraid like me :)
Enjoy coding and if you like this article don’t forget to like and share it.