I want to implement in my app Dark mode. In default I wish it been following by the system, so in Main Activity I’ve placed: It works fine, but I if user wants to change its mind and select certain option in my app menu to toggle off/on dark mode, activity is restarting and app’s still following system rules. How
Tag: android-dark-theme
How to save dark mode state in android when the app is completely closed
I have a little problem. When I turn on dark mode in my app and then close my app completely in android, when I reopen it, it returns to light mode. I use AppCompatDelegate to do this. I have a settings fragment with a switch to turn on or off dark mode and it works well. I have a shared