Answer the question
In order to leave comments, you need to log in
Android, when changing the language in the system, not all resources are updated, what should I do?
Hello. There is an activity with a form for creating a record - text fields, autocomplete, checkboxes, captions for all this, etc.
The string resources are written in two languages.
If you minimize the application, change the language in the system and go back, the following happens:
- in general, string resources are switched to the desired language
- the text in the autocomplete does not switch, when you click on the field, the autocomplete list does not drop out (although I looked with the logcat, it is there). I tried to do manually setText, nothing happens. In general, it is not clear on what event the string resource in the widget is updated and how to catch it.
- the standard validation message in the text field, if it came out before switching the language, does not change the text either. if you call the validation message again, it will already be with the correct language.
In general, a complete mess. So I'm thinking - either force reload the activity (but then it's not clear what to do with user input), or make some kind of crutches for validation and autocomplete.
I also tried to catch the broadcast message about changing the language, but there is no sense in this, because it comes when the application is still minimized, and the resources are updated when the activity appears on the screen.
I saw this topic https://qna.habr.com/q/12584, but the question remained.
Answer the question
In order to leave comments, you need to log in
because it comes when the application is still minimized, and the resources are updated when the activity appears on the screen.
Very similar to solving the problem:
https://stackoverflow.com/questions/18365354/local...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question