Skip to content

Instantly share code, notes, and snippets.

@mrsid96
Created June 18, 2017 17:14
Show Gist options
  • Save mrsid96/7018fc87c7549c5b99dbf5f26cc6fb2e to your computer and use it in GitHub Desktop.
Save mrsid96/7018fc87c7549c5b99dbf5f26cc6fb2e to your computer and use it in GitHub Desktop.
Adding Gravatar images based on emails in Android
String hash = MD5Util.md5Hex(email);
String gravatarUrl = "http://www.gravatar.com/avatar/" + hash + "?s=204&d=404";
Picasso.with(mContext)
.load(gravatarUrl)
.placeholder(R.drawable.avatar_empty)
.into(holder.userImageView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment