updateLocale(); from main activity doesnt work on Android 7 and below
See original GitHub issueCalling updateLocale() from the mainActivity which is called its baseActivity, this doesn’t seem to change the locale on Android 7 and 6.
Running this in loop shows no new locale was added or updated
`
Locale locale = this.getResources().getConfiguration().locale; //Always shows the same even after updating
String languageGW = //Language code derived from backend String phoneLocale = locale.toLanguageTag();
if(languageGW != null && !phoneLocale.equals(languageGW)){ //Change language now, discrepancy found between backend and local phone language updateLocale(Locale.forLanguageTag(languageGW));
}
`
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Why change locale doesn't work on Android ... - Stack Overflow
0' library. I use this code to change default locale of App. For Android API level >= 24 @TargetApi(Build.VERSION_CODES.N) ...
Read more >Language and locale resolution overview - Android Developers
Starting with Android 7.0 (API level 24), Android exposes the LocaleList.getDefault() API that lets apps directly query the list of languages a ...
Read more >Slow rendering - Android Developers
UI Rendering is the act of generating a frame from your app and displaying it on the screen. To ensure that a user's...
Read more >Intents and Intent Filters - Android Developers
The first activity, MainActivity , is the app's main entry point—the activity that opens when the user initially launches the app with the...
Read more >Application Fundamentals - Android Developers
Although the activities work together to form a cohesive user experience in ... Android apps don't have a single entry point (there's no...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have this problem too. I use the solution https://stackoverflow.com/a/58004553/3751051. It’s working.
@codeItRalf Yes, it seems there is an issue for androidx.appcompat v1.1.0