Package com.example.lottery.util
Class AvatarUtils
java.lang.Object
com.example.lottery.util.AvatarUtils
Utility class to generate default avatar.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic android.graphics.BitmapgenerateDefaultAvatar(String name, int size) Generates a default avatar bitmap with the user's initial.
-
Constructor Details
-
AvatarUtils
public AvatarUtils()
-
-
Method Details
-
generateDefaultAvatar
Generates a default avatar bitmap with the user's initial.- Parameters:
name- The username to derive the initial and color from.size- The size of the bitmap (width and height).- Returns:
- A Bitmap containing the colored circle and initial.
-