In the v21 of the Support library there is now a solution to this: it's called [RoundedBitmapDrawable][1].
It's basically just like a normal Drawable except you give it a corner radius for the clipping with:
setCornerRadius(float cornerRadius)
So, starting with Bitmap src and a target ImageView, it would look something like this:
RoundedBitmapDrawable dr = RoundedBitmapDrawableFactory.create(res, src);
dr.setCornerRadius(cornerRadius);
imageView.setImageDrawable(dr);
[1]: https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable
In the v21 of the Support library there is now a solution to this: it's called [RoundedBitmapDrawable][1].
It's basically just like a normal Drawable except you give it a corner radius for the clipping with:
setCornerRadius(float cornerRadius)
So, starting with `Bitmap src` and a target `ImageView`, it would look something like this:
RoundedBitmapDrawable dr = RoundedBitmapDrawableFactory.create(res, src);
dr.setCornerRadius(cornerRadius);
imageView.setImageDrawable(dr);
[1]: http://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable.html