How To Add Round Corners On ImageView In Android

I actually forgot where I got this but if you Google it, there should be a ton of them scattered across forums posting the same method such as the one below.

While some of you may want the implementation as a custom ImageView class widget so it can be used in XML (this will be in another post), this piece of code aims to help users attain the same result through code.

Considering that widgets do not accept custom views, this method simply did the trick.

The parameter radius indicates how slanted the rounded corner you want it to be. The bigger the value, the more rounded the corner will be.

Related Posts Plugin for WordPress, Blogger...

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *