/ Images

A circular ImageView for Android

A circular ImageView for Android


A fast circular ImageView perfect for profile images. This is based on RoundedImageView from Vince Mi which itself is based on techniques recommended by Romain Guy.


It uses a BitmapShader and does not:

create a copy of the original bitmap
use a clipPath (which is neither hardware accelerated nor anti-aliased)
use setXfermode to clip the bitmap (which means drawing twice to the canvas)
As this is just a custom ImageView and not a custom Drawable or a combination of both, it can be used with all kinds of drawables, i.e. a PicassoDrawable from Picasso or other non-standard drawables (needs some testing though).