YASAN
04/22/2021, 10:34 PMAppCompatDelegate
to change dark mode but on my Compose app it has no effect.
It looks like isSystemInDarkTheme()
just checks the system settings and even when I use my own function to check dark mode, it only effects the Compose MaterialTheme colors which I don't use much. I use resources for dark/light colors and it works fine except this.
How can I handle this in Compose? It does not look like AppCompatDelegate
has any effect on Compose.Chris Sinco [G]
04/22/2021, 10:53 PMChris Sinco [G]
04/22/2021, 10:54 PMChris Sinco [G]
04/22/2021, 10:55 PMdarkColors()
) but it’s entirely in your control to pass them into MaterialTheme
that is at the root of your Compose app hierarchy. isSystemInDarkTheme()
is there for convenience, but the conditional can be custom as you mentioned.Chris Sinco [G]
04/22/2021, 11:00 PMYASAN
04/22/2021, 11:05 PM