-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Android: Set up Day/Night mode for system-compatible optional dark theme #8660
Conversation
Please provide some screenshots. |
Done. I'm actually glad you asked, I found a bug I somehow missed with the Settings screen. |
Um, perhaps add |
Github doesn't support that syntax anymore, see here. I had to switch to an |
Oooh, okay, well that's a bit annoying but I appreciate you going through the trouble. |
Sure, I also went ahead and made the screenshots side-by-side comparisons, which I think is a better way to show the changes. |
Yeah that looks much nicer. |
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.
Can you rebase this to the latest master? And in styles.xml, can you replace all MaterialComponents
with AppCompat
(see #8659)?
Also note that the color of the "+" button has changed, but I don't mind that.
Done and done. I was going to remove the gradle dependency entirely, but it looks like its components are still used throughout the app elsewhere.
Apparently switching the MaterialComponents to AppCompat in styles fixed it. |
This PR has had master merged into it instead of being rebased on top of master. Could you rebase the PR to get rid of the unrelated commits? |
Sorry about that! Should be fixed now. |
Can you squash those two commits? |
Sure, does it look alright now? |
Settings submenu transition animations don't work properly in this PR. They appear to be fine in 5.0-11770. Tested on: |
I took a look and it turns out it's related to the hardcoded color value that was set in the settings recyclerview. I removed the color so the background would change along with the day/night theme, but it seems that the color is part of what makes the transition look the way it does. I replaced it with the default background color based on day/night. This is the relevant line:
I tested it out and the transition works properly with both day and night mode now. Let me know if you encounter any more issues. |
The contrast level for the purple text seems to be a bit low. Is it possible to use a less saturated colour for the dark theme? |
Yeah, I see what you mean. How does this look? I can make the purple accent color lighter in dark mode, like this. |
Anything more I can do to get this merged? Don't want it to sit around forever. |
Updated Material Components dependency and implemented System-controlled Day/Night (Light/Dark) theming
Testing notes: Dark theme can be toggled through system settings in Android 10 (Q) and higher, or through an app like Night Mode for earlier Android versions.
Light Mode vs Dark Mode Screenshots: