Android开发华为手机不弹出Toast,报HwRTBlurUtils: check blur style for HwToast-Toast...的原因

华为手机不弹出Toast,log报的信息:HwRTBlurUtils: check blur style for HwToast-Toast, themeResId : 0x7f0c0005, context : 。。。
我的原因是:重写了getResources方法时调用了setToDefaults()方法导致的。
override fun getResources(): Resources {
val resources = super.getResources()
val config = resources.configuration
// config.setToDefaults()  //原因就是调用了这行代码。。。
config.fontScale = 1.0f
resources.updateConfiguration(config, resources.displayMetrics)
return resources
}

猜你喜欢

转载自www.cnblogs.com/yongfengnice/p/11328616.html