Aswin Balaji

Aswin Balaji

186 Sadasivam Nagar,Madipakkam,Chennai, TN 600091
Aswin Balaji

CREATING CIRCULAR IMAGEVIEW IN ANDROID

June 18, 2016, by Aswinbalaji, category ANDROID

Most of Popular android apps especially in messenger app such as WhatsApp, BBM, Path, and Facebook Messenger display our profile pictures in circular shape. While android built-in views or widgets does not provide ImageView in circular shape, so the question is how to make the imageview to be circular. Well The answer is that we have to create our own custom imageview by extending the View or ImageView class. In this Project I do not Program the CircularImageview class from scratch by myself. But I downloaded the class from GitHub (https://github.com/Pkmmte/CircularImageView), some programmers has already programmed for it. In this Project I just want to show how to implement that CircularImageview in a minimum (simple) way, so it could be used and learned by students or beginners and also developers. Below is the image of the project’s result when it is run in android.
Circular Imageview in Android

First of all create a new android application project in Eclipse, and then download these two images [panda1.png, panda2.png] and then put them in the res/drawable-mdpi folder of your project. Next in activity_main.xml write this xml code:
activity_main.xml
Circular Imageview in Android

First of all create a new android application project in Eclipse, and then download these two images [panda1.png, panda2.png] and then put them in the res/drawable-mdpi folder of your project. Next in activity_main.xml write this xml code:
activity_main.xml