Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android ask if system is in dark mode

switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
    case Configuration.UI_MODE_NIGHT_YES:
       //process
        break;
    case Configuration.UI_MODE_NIGHT_NO:
        // process
        break; 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #system #dark #mode
ADD COMMENT
Topic
Name
5+5 =