Icon colors don't change on API <20
what happened
On devices running an API level <20 icon colors in the app don't change between dark and light themes. They also don't change when fields are disabled.
what you expected to happen instead
Icons should be light in dark theme and dark in light theme just like they are for devices with a higher API level.
steps to reproduce the problem
- Create an AVD with API level <20 (I use 16)
- Open the app on the device
- Switch to dark theme
- Icons are still back with a dark background
Hi,
Can you help us to fix the remaining graphical glitches a bit?
Absolutely. I've been looking into it in my down time. The change is a little more complicated than I expected it to be. According to the release notes for support library 23.2 there is support for vector drawables. But at the time I didn't realize how limited this support was. It allows vectors to be included in older projects and even allows you to disable converting vectors to pngs. But it only added vector support to ImageView and ImageButton. The pngs are still used for everything else. Syncthing Android uses drawables in other types of views such as TextViews which did not get updated for support vector drawables. As such it's not as simple as updating the dependency and changing the name of the drawable properties. But there is still hope according to this stack overflow post.
That post recommends either updating to an alpha JetPack build or creating a custom TextView that adds the vector programmatically. Updating to JetPack looks like a huge change that needs to be made on it's own so I've been looking into using a custom view. I've written code for one of the drawables, but the color isn't changing and I don't know why yet. I'll continue to look into it in my down time. But that means it's not going to be done very fast. Is there a timeline that this is needed by?
@camingus : Thanks for your explanation and getting back to me. There isn't any hurry from my side, I appreciate your help and work on this very much :-). Take all time you need.
If this is something you want very much, knock yourself out - any contribution in this or another area is very much appreciated. However don't feel obliged in any way as API <20 isn't even (security) supported any more by google, so in my opinion it's not an unreasonable limitation to those users to not have a black theme (or a buggy one).