Random color doesn't work
rodrinac opened this issue · 1 comments
rodrinac commented
Hi,
This is the code I have
private val textBuilder = TextDrawable.builder()
private val colorGenerator = ColorGenerator.MATERIAL;
fun String.toTextDrawable() : TextDrawable {
return textBuilder.buildRound(
this[0].toString(),
colorGenerator.randomColor
)
}
The generated drawable has aways a gray background.
buildbro commented
I faced something similar today and wasted 30 minutes looking in the wrong place. Turns out I was using :tint in my XML to color the imageview gray. Remove that property fixed the issue for me.