Fix a bug that caused TextDrawable to not be displayed

This commit is contained in:
Alexander Bakker 2018-06-07 15:23:23 +02:00
parent 606d6e77e9
commit 4e74c5beb9

View file

@ -20,8 +20,8 @@ public class TextDrawableHelper {
int color = ColorGenerator.MATERIAL.getColor(text); int color = ColorGenerator.MATERIAL.getColor(text);
return TextDrawable.builder().beginConfig() return TextDrawable.builder().beginConfig()
.width(view.getWidth()) .width(view.getLayoutParams().width)
.height(view.getHeight()) .height(view.getLayoutParams().height)
.endConfig() .endConfig()
.buildRect(text.substring(0, 1).toUpperCase(), color); .buildRect(text.substring(0, 1).toUpperCase(), color);
} }