I want to disable darkmode in app based on a flag Programmatically. I have defined custom colors in the values-night folder for darkmode.
I have tried the following solutions for disabling darkmode but not worked.
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
Is there any way to disable darkmode programmatically without removing values-night folder?
from Disable Dark Mode Programmatically in Android
No comments:
Post a Comment