I would like the application language to be set in accordance with the user settings, but so far it does not work as I would like.
I set the default values: strings.xml, as well as es-values ββwith strings.xml inside in Spanish. I have a menu item that leads the user to Preference activity, where he can amon gother things chosen language.
So here are some excerpts from the code:
public class Preference extends PreferenceActivity implements OnSharedPreferenceChangeListener { ......
Therefore, when I change the language, it works, but then, when I return later or restart the emulator, the language will return to the default language, en_US and the application language will again change to the default value. What can I do to deal with this?
I know that I can get this preference (which I can access from all my actions) and then set the language standard each time, but I find it a little heavy, there is no way to do this in a more elegant way ?
What I would like to do is if the user sets the language, so when he returns in 2 days, he should not change the language again.
Any ideas?
source share