Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RoundedImageView - drop dead easy way to do this with RoundedBitmapDrawable
Bitmap batmapBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.batman);
RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), batmapBitmap);
// option 1 h/t [Chris Banes](
// option 2 h/t @csorgod in the comments
System.out.prinln("MyActivity", "That's all folks");

This comment has been minimized.

Copy link

@csorgod csorgod commented Nov 20, 2016


You can use circularBitmapDrawable.setCircular(true) instead of "circularBitmapDrawable.setCornerRadius(batmapBitmap.getWidth());".


This comment has been minimized.

Copy link
Owner Author

@kaushikgopal kaushikgopal commented Nov 21, 2016

@csorgod : hot damn! oddly i've never run into it. Thanks! will add that usage too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment