android langange change not properly

Solutions on MaxInterview for android langange change not properly by the best coders in the world

showing results for - "android langange change not properly"
Manuel
13 Mar 2020
1
2@Override
3public void onCreate() {
4    super.onCreate();
5    LocaleUtil.setLocale(new Locale(LocaleUtil.with(this).getPreference()));
6    LocaleUtil.updateConfig(this,getBaseContext().getResources().getConfiguration());
7}
8// Add this method in all activity
9@Override
10public void onConfigurationChanged(Configuration newConfig) {
11    super.onConfigurationChanged(newConfig);
12    LocaleUtil.setLocale(new Locale(LocaleUtil.with(this).getPreference()));
13    LocaleUtil.updateConfig(this, newConfig);
14}