- How i can change the language in all activities when i chose another language? If i go back to an activity that is previously open it remains with the same configuration. How can refresh that activity too?
i'm using this method:
public void setLocale(String lang) {
Locale myLocale = new Locale(lang);
Resources res = getResources();
DisplayMetrics dm = res.getDisplayMetrics();
android.content.res.Configuration conf = res.getConfiguration();
conf.locale = myLocale;
res.updateConfiguration(conf, dm);
Intent refresh = new Intent(this, Language.class);
startActivity(refresh);
finish();
}
- How can i save my configurations? If i close the app and open again i want the last configuration.