@Override protected void attachBaseContext(Context newBase) { Resources resources = newBase.getResources(); Configuration config = resources.getConfiguration(); String lang = SharedPerferenceUtil.getInstance(HLApplication.getContext()).getLanguage(); switch (lang) { case "simplified": config.locale = Locale.CHINA; break; case "traditional": config.locale = Locale.TAIWAN; break; case "english": config.locale = Locale.US; break; default: break; } String scale=SharedPerferenceUtil.getInstance(HLApplication.getContext()).getFontScale(); config.fontScale=Float.parseFloat(scale); super.attachBaseContext(newBase.createConfigurationContext(config)); }