

Google has just published the documentation on the dark theme at the end of I/O 2019, here.


Is there a nice API for apps to handle the chosen theme? Meaning that if the OS is in certain theme, so will the current app? Is the new API somehow related to night mode too? How do those work together? Is there any kind of API to get the theme of the OS ? From which version? Is there an API to get which colors the OS is set to use ? I also know how to request the OS to change color using the live wallpaper, but this seems to be changing on Android Q, at least according to what I've seen when trying it (I think it's more based on time-of-day, but not sure). The only thing I've found so far is the above articles, and that I'm following this kind of topic. So, if you enable dark mode (manually, as written here), you get the app's settings screen as such: Somehow a launcher called "Smart Launcher" has ridden on it, offering to use the theme right on itself (article here). Starting from Android 9.0, it is now possible to choose which theme to have: light, dark or automatic (based on wallpaper) :Īnd now on the near Android Q, it seems it went further, yet it's still unclear to what extent. This is done by calling notif圜olorsChanged and then provide them using onComputeColors That's why I even made an app that lets you have any wallpaper while still be able to choose the colors ( here). In addition, if you developed a live wallpaper app, you could tell the OS which colors it has (3 types of colors), which affected the OS colors too (at least on Vanilla based ROMs and on Google devices). If the user chooses to have a dark wallpaper, some UI components of the OS would turn black (article here). Starting from Android 8.1, Google provided some sort of dark theme. The problemĮven though there is a lot of talk about dark mode in the point-of-view for users, there is almost nothing that's written for developers.

On recent Android versions, ever since Android 8.1, the OS got more and more support for themes.
