Am I misunderstanding `isSystemInDarkTheme()`? I ...
# compose
a
Am I misunderstanding
isSystemInDarkTheme()
? I have set
android:configChanges="uiMode|screenSize|smallestScreenSize|orientation|screenLayout"
to avoid recreating my Single Activity when the theme or screen orientation changes. I expect the value of
isSystemInDarkTheme()
or
LocalConfiguration.current.uiMode
to change as soon as I change the theme in Android System Settings. However, this is not the case, and I need to re-launch the app to detect system theme change. What am I missing? And how to actually observe system theme changes in Compose?
Okay, nevermind, I've ran into the same issue as this guy 3 years ago https://kotlinlang.slack.com/archives/CJLTWPH7S/p1624895100032700 Lesson learned, don't mess with
attachBaseContext
in the Application class!
f
Ah thanks for sharing the solution 😉 !
👍 1