Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android UIModeManager and Application Configuration

I need my app to automatically switch between night/day modes. According to the documentation I can use UiModeManager like this:

UiModeManager uiModeManager = (UiModeManager) getSystemService(UI_MODE_SERVICE);        
uiModeManager.setNightMode(UiModeManager.MODE_NIGHT_YES); 

However, the application don't use alternative resources with "night" qualifier. I didn't notice that the application actually changed the configuration. How can I force the app to use night-qualified resources?

like image 899
rus1f1kat0R Avatar asked Apr 26 '26 21:04

rus1f1kat0R


1 Answers

Car or Desk mode must also be active in order for that mode to be effective.

like image 157
jsmith Avatar answered Apr 29 '26 10:04

jsmith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!