| | |
| | | @Override |
| | | protected void onCreate(@Nullable Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | // String language = SPUtils.getString("language"); |
| | | // String country = SPUtils.getString("country"); |
| | | // if (language != null) { |
| | | // LanguageUtil.changeAppLanguage(this,language,country); |
| | | // } |
| | | initParam(); |
| | | getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); |
| | | EventBus.getDefault().register(this); |
| | |
| | | easyPopup.showCenter(getWindow().getDecorView()); |
| | | } |
| | | }; |
| | | |
| | | // @Override |
| | | // protected void attachBaseContext(Context newBase) { |
| | | // String language = SPUtils.getString("language"); |
| | | // String country = SPUtils.getString("country"); |
| | | // super.attachBaseContext(LanguageUtil.attachBaseContext(newBase, language, "")); |
| | | // } |
| | | |
| | | |
| | | @Override |
| | | protected void attachBaseContext(Context newBase) { |
| | | String langh = SPUtils.getString(Const.language); |
| | | if (langh.isEmpty()) |
| | | langh = "en"; |
| | | Context context = LanguageUtil.changeAppLanguage(newBase, langh, ""); |
| | | //super.attachBaseContext(context); |
| | | super.attachBaseContext(LanguageManager.wrapContext(newBase)); |
| | | } |
| | | |
| | | public void closePop() { |
| | | if (easyPopup != null) { |