Created
February 2, 2020 10:50
-
-
Save bkhezry/21b3db664225d4f351729a73396dcbf6 to your computer and use it in GitHub Desktop.
Fix dark mode problem with i18n
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void applyOverrideConfiguration(@Nullable Configuration overrideConfiguration) { | |
if (overrideConfiguration != null) { | |
int uiMode = overrideConfiguration.uiMode; | |
overrideConfiguration.setTo(getBaseContext().getResources().getConfiguration()); | |
overrideConfiguration.uiMode = uiMode; | |
} | |
super.applyOverrideConfiguration(getResources().getConfiguration()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment