Class AvatarUtils

java.lang.Object
com.example.lottery.util.AvatarUtils

public class AvatarUtils extends Object
Utility class to generate default avatar.
  • Constructor Details

    • AvatarUtils

      public AvatarUtils()
  • Method Details

    • generateDefaultAvatar

      public static android.graphics.Bitmap generateDefaultAvatar(String name, int size)
      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.