How to get RoundImage from a Squared ImageView in Android

Posted on .
featured

Hello nerds ! How you doing ? Today’s tutorial is very short and very unique that is how to Round an Squared Image.

So checkout this awesome and Easy tutorial and you can download source code here.

Download Code

Lets Code , Lets start with designing part , I have activity_main.xml file in which i have taken two imageView one is showing input and another is showing output(UPPER IMAGE).

activity_main.xml

put your image in drawable folder my squared image is –

round_image_android

Now make a class namely RoundImage.java in which we will make our image round and paste this file in your package .

RoundImage.java

Now your MainActivity.java file in which you will call RoundImage Object.

MainActivity.java

Now Run your App and you will surprise to see –

Output – 

output_round

 

Feel free to download the source code and ask any query. Happy Coding :p