-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert drawables to svg and use resource resolution for light/dark theming #68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks.
Yeah, those are the two svgs I had to recreate by hand, I tried to make them exactly the same but evidently didn't succeed.
It's much more visible in your screenshot than what I saw on the emulator. The visibility of the end of the gradient depends on how I look at the monitor, it seems 🤣. Getting this gradient right seems to be no easy task, let me thinker a bit with it and see if I can improve it. |
b170d7f
to
dd56fe1
Compare
Could you not just use an existing SVG for that? |
I didn't realize those existed as SVGs already. If you can point me at them then I can definitely import them. |
(it looks like we no longer need loop icon, so we can delete it, I like the new one more) |
Ah, i looked in the
👍 |
Do you want me to put the two |
No, we don't need that |
Looks like I cant use the foreground logo unfortunately, it contains some SVG elements that are not supported in Android drawables:
|
Can you just copy the gradient values from it then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it's not easly doable, it seems. LGTM then
Yeah, I tried as well, but no success. |
This converts all of our drawables to svgs. We can do this because svg drawables are supported from Android API
21
onward, which is our current minimum target sdk version.By converting to svg we reduce the size of the application and make it look sharp regardless of the screen resolution.
We can't remove the
launch_foreground.png
yet, because gradient color is not supported below API24
.This also removes the different resources for light and dark themes and the system brightness listener in
AudioHandler
, and instead relies on the automatic themed resource lookup, which get's triggered automatically when the system theme changes. This part is really hard to test, because most systems apply their own theming for media control buttons (e.g. in the Android emulators, they are always white). I observed the switching of colors on my real phone, but if you have a setup that you used to test this when developing it originally, please make sure to test with these changes again.For context, this is part of my work towards a home screen widget, I want to reuse these drawables.