首页
学习
活动
专区
工具
TVP
发布
您找到你想要的搜索结果了吗?
是的
没有找到

Android 12:SplashScreen Compat源码解析

新功能:SplashScreen优化启动体验中我们介绍了Android 12上的一个新功能SplashScreen,同时提到了Google为了兼容低版本也提供了Androidx SplashScreen compat...SplashScreenViewProvider Androidx SplashScreen compat库的代码其实很少,只有两个类:SplashScreenViewProvider和SplashScreen...这里也就解释了为什么Androidx SplashScreen compat库不支持windowSplashScreenBrandingImage这个属性,因为在低版本上只有中间的一个ImageView...所以可以看到在31版本上,Androidx SplashScreen compat库并没有进行太多处理,而是全部托管给新版本自带的SplashScreen功能。...总结 综上,我们可以看到,虽然Androidx SplashScreen compat库向后兼容,但是因为在低版本上布局和处理都比较简单,所以低版本上的效果实际上并不如Android 12,大家做迁移兼容的时候一定要注意

50120
领券