I want to provide my users an in-app (NOT DEVICE-WIDE) locale (language) change. Thats why I setup the following code which triggers when the user clicks on a specific language:
private void setLocale(Locale locale) {
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config,
getBaseContext().getResources().getDisplayMetrics());
}
So far so good but since now I really don't know how to update/refresh all of my active activities (current activity and all activities in the back stack). Do I have to override onResume()
of each activity? Could there be a possibility to generalize that?