I\'m using Androids built in day/night mode functionality and I\'d like to add an option to my app for AppCompatDelegate.MODE_NIGHT_AUTO
I\'m having a p
If you are kotlin developer then you can use below code to judge dark mode.
val mode = context?.resources?.configuration?.uiMode?.and(Configuration.UI_MODE_NIGHT_MASK)
when (mode) {
Configuration.UI_MODE_NIGHT_YES -> {}
Configuration.UI_MODE_NIGHT_NO -> {}
Configuration.UI_MODE_NIGHT_UNDEFINED -> {}
}
For more about dark theme mode
https://github.com/googlesamples/android-DarkTheme/