Jetpack启动画面图标在暗模式下无法显示

8
我已经使用Jetpack启动屏幕API创建了一个启动屏幕,除了在打开深色模式时无法显示windowSplashScreenAnimatedIcon之外,一切都正常工作。
即使我使用了材料设计的日间主题,强制将浅色设置为默认主题(AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
我知道在谷歌开发者门户网站上详细介绍了应用图标的注意事项。
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
    <item name="windowSplashScreenBackground">@color/white</item>
    <item name="windowSplashScreenAnimatedIcon">@drawable/splash_content</item>
    <item name="windowSplashScreenAnimationDuration">500</item>
    <item name="postSplashScreenTheme">@style/Theme.Main</item>
</style>

任何帮助都将不胜感激。

谢谢


@Praveen 是的,我已经尝试过了,但没有成功。 - undefined
@Mable John 我也遇到了同样的问题,你找到解决办法了吗? - undefined
@Vahan 不,我还在寻找解决问题的方法。 - undefined
@MableJohn 我觉得这是一个splash lib的bug,它目前还处于alpha版本。如果你找到任何解决方案,请在这里写下来。 - undefined
1个回答

0
我的图标在暗模式下是一个全黑的圆圈,但在亮模式下是正常的PNG图像。我的解决方案是将我的Splash API从androidx.core:core-splashscreen:1.0.0-beta01更新到implementation 'androidx.core:core-splashscreen:1.1.0-alpha02。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接