Hello!
I have an issue that I want to switch to dark mode without using
Copy code
AppCompatDelegate.setDefaultNightMode(true)
Because when I use that it's blank and I loose the state of some variables.
But when using just Theme:
Copy code
val autColors = if (isSystemInDarkTheme()) DarkColorPalette else LightColorPalette
It works great like I want just with one issue is when navigate from screen to another a white flash apears !!!
this happen just with Dark mode.
So anyone here was able to solve this issue ?
t
Tash
09/23/2021, 9:09 PM
is some layer above the screens, like a nav host or something in the heirarchy that isn’t getting the theme’s colors?
a
Akram Bensalem
09/23/2021, 9:23 PM
Yes
Akram Bensalem
09/23/2021, 9:30 PM
@Tash
Did you notice the white screen that appear (like a flash)
Do you know how to fix it without using