User Avatar / Userpic

avatar

Avatars can be used to represent a person, company or object. It can be a photo, icon, or letters.

Usage

avatar

XelaUserAvatar(
    size = XelaUserAvatarSize.LARGE,
    style = XelaUserAvatarStyle.CIRCLE,
    initials = "XE"
)

XelaUserAvatar(
    size = XelaUserAvatarSize.LARGE,
    style = XelaUserAvatarStyle.RECTANGLE,
    initials = "XE",
    decoration = XelaUserAvatarDecoration.INDICATOR,
    decorationPosition = XelaUserAvatarDecorationPosition.BOTTOMRIGHT
)

XelaUserAvatar(
    size = XelaUserAvatarSize.LARGE,
    style = XelaUserAvatarStyle.CIRCLE,
    initials = "XE",
    decoration = XelaUserAvatarDecoration.COUNTER,
    count = 2
)

Properties

Name Type Default Value Required Description
size XelaUserAvatarSize - YES Size for avatar (LARGE, MEDIUM, SMALL)
style XelaUserAvatarStyle - YES Style for avatar (CIRCLE, RECTANGLE)
initials String? null NO Initials String for avatar
icon Int? null NO Icon name from Drawable
image Int? null NO Image name from Drawable
count Int 0 NO Count for decoration COUNTER
decoration XelaUserAvatarDecoration? null NO Decoration for avatar (COUNTER, INDICATOR, PLUS)
decorationPosition XelaUserAvatarDecorationPosition XelaUserAvatarDecorationPosition.TOPRIGHT NO Decoration Position for avatar (BOTTOMRIGHT, TOPRIGHT)
background Color XelaColor.Blue7 NO Background color for avatar
foreground Color Color.White NO Foreground color for icon rendered as template or initials
plusIcon Int? null NO Plus icon name from Drawable for decoration PLUS
decorationBorderColor Color Color.White NO Border color for decorations
counterBackground Color XelaColor.Red3 NO COUNTER decoration background color