I’m working on a Compose app that lets users switch between dark, light and system default themes. Currently I’m having a problem where if the user selects the dark theme, the resources I have in the
drawable-night
resource set are not used, and instead the regular
drawable
resources are used, which leads to a very weird-looking UI. I know I can inform the system of the selected theme by doing either
UiModeManager.setApplicationNightMode()
or
AppCompatDelegate.setDefaultNightMode()
, and it seems to work, but for some reason it breaks the theme change when the users selects the system default option. Are there additional considerations for doing this in Compose that I’m missing?