Open tipa opened 2 years ago
Although this suggestion may be useful anyway, I do not believe that we should implement any modification based upon the rationale that such low API levels are not supported by what currently exists, because "http://gs.statcounter.com/os-version-market-share/android" demonstrates that Android 6 is not currently utilized significantly much.
In the Android drawables, their fill color is defined as `android:fillColor="@color/fluent_default_icon_tint".
The docs say (here) that a default color is used (#212121) which can be overridden. However, there is no default defined, because I am just importing the drawable xmls. So I need to define the color
fluent_default_icon_tint
myself.My goal is to have the icon color match my apps text color (
?android:attr/textColorPrimary
), and because I am using multiple themes in my app which can have different text colors, my first guess was to definefluent_default_icon_tint
like this in mycolors.xml
file:While this does work on higher Android versions, this does not work on Android 6 or Android 9 (and maybe other versions). The problem is documented here
Checking your docs again, it is suggested to use a
fluent_default_icon_tint.xml
file to override (or actually, define) the color:This actually worked on a physical Android 6 device, but still not on my Android 6 + 9 emulators as well as a API level 9 physical Chromebook. The icons are all in magenta (#FF00FF) color....
So my suggestion would be to use a similar system like the Material icons from Google: https://fonts.google.com/icons
android:tint="?attr/colorControlNormal"
could be replaced withandroid:tint="?attr/fluent_default_icon_tint"
.