Closed jswn0203 closed 2 years ago
@Override public Resources getResources() { Resources res = super.getResources(); Configuration config = new Configuration(); config.setToDefaults(); config.setLocale(AppLocale.getDefault()); res.updateConfiguration(config, res.getDisplayMetrics()); AutoSizeCompat.autoConvertDensityOfGlobal(res);//如果没有自定义需求用这个方法 return res; }
再部分锤子手机上这样写会闪退,提示java.lang.illegalstateexception: not in applications main thread
https://github.com/JessYanCoding/AndroidAutoSize/issues/359
@Override public Resources getResources() { Resources res = super.getResources(); Configuration config = new Configuration(); config.setToDefaults(); config.setLocale(AppLocale.getDefault()); res.updateConfiguration(config, res.getDisplayMetrics()); AutoSizeCompat.autoConvertDensityOfGlobal(res);//如果没有自定义需求用这个方法 return res; }
再部分锤子手机上这样写会闪退,提示java.lang.illegalstateexception: not in applications main thread