I just want to know is there any syntax to trigger the internal dark mode of the mobile, I know that I should used SharePreferences to save the Darkmode status in my mobile, but All I want is, is there any function to trigger dark mode into my whole mobile views, not just the app that I've been created. What's the best way to implement darkmode? it is sharedPref?
Instead of clicking that darkmode manually on settings, I want to trigger darkmode through my app button, is that possible?
I just tried this but the result, it is only triggered dark mode just in my app only, not on to the entire mobile. I appreciate any help.
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);

