Reload strings on localize change
If you change the language in the app (read post before “Force Localize an Application on Android“) you run into the problem to reload the new language strings.
On Application close and reopen all strings are loaded with the language you set before.
But the user must exit the program and start it again.
A simple workaround is to force the reload of the app.
The Android system reloads the app and all string on orientation change (from landscape to portrait).
So simple use this code to reload the strings after language change and the user do not have to exit and reload the progam manually.
Write the code above in the preference screen where the user can switch the language.
Add a setOnPreferenceChangeListener and run this code.
Change the orientation to landscape, the app reloads the strings.
Change the orientation back to the Sensor of the hardware.
The app switch automatically back to orientation portrait.