Akram Bensalem

    Akram Bensalem

    1 year ago
    Hello! I have an issue that I want to switch to dark mode without using
    AppCompatDelegate.setDefaultNightMode(true)
    Because when I use that it's blank and I loose the state of some variables. But when using just Theme:
    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 ?
    Tash

    Tash

    1 year ago
    is some layer above the screens, like a nav host or something in the heirarchy that isn’t getting the theme’s colors?
    Akram Bensalem

    Akram Bensalem

    1 year ago
    Yes
    @Tash Did you notice the white screen that appear (like a flash) Do you know how to fix it without using
    AppCompatDelegate.setDefaultNightMode(true)
    ?