0
Arfmann
4y

I have a question about Android dark theme

I've added dark theme support for my application using 2 different themes declared in styles.xml.

On official android developer site:

"In order to support Dark theme, you must set your app's theme (usually found in res/values/styles.xml) to inherit from a DayNight theme"

and this is what I've done. I've also created colors-night.xml to avoid modifying colors that cannot be modified in styles.xml by coding and this works too: when dark mode is activated from device system, colors changes automatically.

At this point, I was wondering which is the best way to implements dark theme: creating 2 different themes, using colors-night (and drawable-night) or a combination of these 2 ways?

Comments
Add Comment