Skip to content

legarspol/LetterAvatar

Repository files navigation

LetterAvatar

Android library to generate an unique avatar based on the name of the user. The formula to define the color can basically be sumed up with this:

"#" + md5(userName).substring(0, 6)

How to install

Either

  • Copy past the source in your project (do not forget the font asset.)
  • import the module
  • include the aar in your project

then call

Bitmap bm = LetterAvatar.createAvatar(context, userName);
or
Bitmap bm =  LetterAvatar.createAvatar( context, userName, imageWidth, paddinginDP) {
or
String color = LetterAvatar.getColor(userName);

LetterAvatar screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages