Answers for "android langange change not properly"

1

android langange change not properly

@Override
public void onCreate() {
    super.onCreate();
    LocaleUtil.setLocale(new Locale(LocaleUtil.with(this).getPreference()));
    LocaleUtil.updateConfig(this,getBaseContext().getResources().getConfiguration());
}
// Add this method in all activity
@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    LocaleUtil.setLocale(new Locale(LocaleUtil.with(this).getPreference()));
    LocaleUtil.updateConfig(this, newConfig);
}
Posted by: Guest on August-17-2021

Code answers related to "android langange change not properly"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language