When the Android device set to dark mode. But the user wants to see Light mode only on this app. Is there any idea to handle this?
This code does not work for me
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
none of these codes is working
val config: Configuration = resources.getConfiguration()
config.uiMode = Configuration.UI_MODE_NIGHT_NO
resources.configuration.uiMode= Configuration.UI_MODE_NIGHT_NO
applicationContext.createConfigurationContext(config)
resources.updateConfiguration(config, getResources().getDisplayMetrics())