Aegis
Aegis copied to clipboard
When the text is empty, the generated TextDrawable uses a grey bgcolor
When the text is empty, the generated TextDrawable uses a grey bgcolor. This will help remind customers that this is where an icon is selected. I wanted to use arrays.xml/colors.xml to manage the colors at first, but after looking at the source code(The color generator is also hardcoded, so I followed), I used a hardcoded way. Because the current TextDrawableHelper.java does not have a Context to load resources.
This is a suggested change, please evaluate.
Effect:
Yes, the same color value is used in both modes. I will revise it later.
By the way: the colors of _generator(in TextDrawableHelper), I think it can also be managed by xml. Would this be a better way?
like this:
List<Integer> bg_colors=Arrays.stream(view.getResources().getIntArray(R.array.text_drawable_colors)).boxed().collect(Collectors.toList());
ColorGenerator _generator = ColorGenerator.create(bg_colors);
Yeah, let's do that.
What's the status here?
Since there hasn't been any activity here for a while, I'm closing this one to clean the up the list of open pull requests a bit.