You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @nospecs! Thank you for your interest in this library. You can't set background manually without several dirty workarounds. The main idea of this library is to set background automatically based on some simple calculations:
val acronym = getAcronym(rawText)
val backgroundColor = colors[Math.abs(rawText.hashCode() % colors.size)]
setImageDrawable(AcronymDrawable(acronym, backgroundColor, zoomOut))
But you still can take Acronym Drawable and implement your own Avatar View. It's not so convenient, I know. I can add this feature a bit later, if you want. Let me know.
Hey guys, thanks for this amazing library.
I did this
<com.redmadrobot.acronymavatar.AvatarView
android:id="@+id/user_avatar"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="24dp"
android:background="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:placeholder="@drawable/ic_logo_rounded" />
The background colour appears but in a square behind the avatar. I need your help.
The text was updated successfully, but these errors were encountered: