question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple language didn't work with dark mode in 1.1.0-alpha07

See original GitHub issue

Description: Multiple language App work fine. After adding the dark mode option to it and use

getDelegate().setLocalNightMode(
                        AppCompatDelegate.MODE_NIGHT_YES);

to change the theme to dark, strings.xml didn’t load from values-uk folder and load from values folder.

Expected behavior: In the dark mode, strings.xml should be load from the selected language.

Source code: https://github.com/bkhezry/LanguageTest

Android API version: 28

Material Library version: 1.1.0-alpha07

Appcompat version: 1.1.0-rc01

Device: Xiaomi Redmi Note 7

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mraslamiiicommented, Jul 26, 2020

Hello for fix this error you must use this code : delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_YES;

1reaction
ikim24commented, Jan 23, 2020

Please see the comment from when this was closed:

Hello! The setLocalNightMode() functionality is part of AppCompat as opposed to the Material library. You can file a bug here instead : http://issuetracker.google.com/issues/new?component=460343

Also, you might want to try using AppCompatDelegate#setDefaultNightMode instead, which will recreate the Activity for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android custom locale lost during Dark Mode (Night Mode ...
Our app requires us to be able to change the language based on user selection rather than just relying on the device locale....
Read more >
Compose UI - Android Developers
Structure. Compose is combination of 7 Maven Group Ids within androidx . Each Group contains a targeted subset of functionality, each with it's...
Read more >
Dark Mode toggle resets local language setting to Default ...
Our app requires us to be able to change the language based on user selection rather than just relying on the device locale....
Read more >
diff - Google Git
+ * See the License for the specific language governing permissions and + ... + * - This can happen on devices that...
Read more >
Google Translate's dark mode looks better now, but hasn't yet ...
Read update. New design. Many of Google's most popular apps have received an update with dark mode, but Translate remains an outlier. It's ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found