Fix chinese picker issue
This commit is contained in:
parent
54363e5573
commit
22e293ebf7
|
@ -54,7 +54,13 @@ public class MainApplication extends MultiDexApplication {
|
|||
List<Locale> SUPPORTED_LOCALES = new ArrayList<>();
|
||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE);
|
||||
String defaultLocaleString = sharedpreferences.getString(Helper.SET_DEFAULT_LOCALE_NEW, Helper.getDefaultLocale());
|
||||
Locale defaultLocale = new Locale(defaultLocaleString);
|
||||
Locale defaultLocale;
|
||||
if( defaultLocaleString.equals("zh-CN"))
|
||||
defaultLocale = Locale.SIMPLIFIED_CHINESE;
|
||||
else if( defaultLocaleString.equals("zh-TW"))
|
||||
defaultLocale = Locale.TRADITIONAL_CHINESE;
|
||||
else
|
||||
defaultLocale = new Locale(defaultLocaleString);
|
||||
SUPPORTED_LOCALES.add(defaultLocale);
|
||||
LocaleChanger.initialize(getApplicationContext(), SUPPORTED_LOCALES);
|
||||
}catch (Exception ignored){ignored.printStackTrace();}
|
||||
|
|
Loading…
Reference in New Issue