AvatarView is a library that implements an view used for displaying user avatar. It implements the the Google Play avatars described in this article.
To include this library just add the custom view to your layout:
<org.janusauskas.avatarview.AvatarView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
You can customize the shadow and outline, by setting a diferent Painter
fot the AvatarView
.
avatarView.setPainter(new Painter.Builder().setShadowColor(Color.LTGRAY).setOutlineColor(Color.WHITE).build());
The example project is avalable here.