Aegis icon indicating copy to clipboard operation
Aegis copied to clipboard

When the text is empty, the generated TextDrawable uses a grey bgcolor

Open Hovn opened this issue 2 years ago • 2 comments

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: image

Hovn avatar Aug 06 '22 02:08 Hovn

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);

Hovn avatar Aug 23 '22 07:08 Hovn

Yeah, let's do that.

alexbakker avatar Sep 05 '22 16:09 alexbakker

What's the status here?

alexbakker avatar Dec 24 '22 17:12 alexbakker

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.

alexbakker avatar Aug 16 '23 14:08 alexbakker