Icon color on different topics

Different Android devices have different themes. This means that the background colors, for example, in dialogs, may vary in versions of Android and among manufacturers.

This can cause the icons to become β€œinvisible”:

compare: 2.3 <-> 4.0.3

The problem with Android stock themes can be solved relatively easily by providing various colored icons in target specific folders, for example. white icons in drawable-v14 folder and black drawable-v10 in drawable-v10 . But this does not solve the problem associated with custom themes from manufacturers, perhaps TouchWiz, Blur or Sense. It is simply not possible to cover every device with this method.

Another way: draw a small black frame around white icons and vice versa. But if the background is gray, as in ICS, this also does not look very good.

So the question is: How to create custom icons that will work well on each topic without touching the topic itself?

+4
source share
1 answer

Taking all vendor selection options (and errors) into account will be a pain.

I see a couple of options:

  • Explicitly choose a stock theme and hope for the best
  • Select a custom theme created from a stock theme where you control the background color
  • Dynamically evaluate the background color for the selected theme and set an icon based on the tipping point (for example, dark icons if the background is light enough). Not sure if this will be practical, but at least it should be somewhat universal.

I recently went with hard-coded colors in a derived theme to fix a mistake in choosing the color of the Nook dialog dialog box. More extensive testing is likely to show me another platform with which I just did worse.

Hopefully someone has a better answer than those because none of them seem to be completely clean and universal. After reading the message again, it seems that none of these options meet your criteria that are not related to the topic.

+1
source

Source: https://habr.com/ru/post/1401492/


All Articles