我正在学习Android 12引入的新的SplashScreen API。目前我已经在模拟器和Google Pixel 4A上成功运行了它,但我希望增加它的持续时间。在我的启动画面中,我不需要花哨的动画,只需要一个静态的drawable。
我知道,我知道(叹息),你们中的一些人可能会认为,我不应该增加持续时间,我知道有几个很好的理由支持不这样做。然而,对于我来说,一个没有动画的启动画面的持续时间太短了(不到一秒钟),我认为这引起了可访问性方面的问题,特别是因为它无法被禁用(具有讽刺意味)。简单地说,产品或品牌/产品身份背后的组织在那个大小和时间上不能被新用户充分吸收或识别,使新的启动画面变得多余。
我看到主题中的property windowSplashScreenAnimationDuration,但这对持续时间没有影响,因为我没有进行动画。
我知道,我知道(叹息),你们中的一些人可能会认为,我不应该增加持续时间,我知道有几个很好的理由支持不这样做。然而,对于我来说,一个没有动画的启动画面的持续时间太短了(不到一秒钟),我认为这引起了可访问性方面的问题,特别是因为它无法被禁用(具有讽刺意味)。简单地说,产品或品牌/产品身份背后的组织在那个大小和时间上不能被新用户充分吸收或识别,使新的启动画面变得多余。
我看到主题中的property windowSplashScreenAnimationDuration,但这对持续时间没有影响,因为我没有进行动画。
<style name="Theme.App.starting" parent="Theme.SplashScreen">
<!--Set the splash screen background, animated icon, and animation duration.-->
<item name="windowSplashScreenBackground">@color/gold</item>
<!-- Use windowSplashScreenAnimatedIcon to add either a drawable or an
animated drawable. One of these is required-->
<item name="windowSplashScreenAnimatedIcon">@drawable/accessibility_today</item>
<item name="windowSplashScreenAnimationDuration">300</item> <!--# Required for-->
<!--# animated icons-->
<!--Set the theme of the activity that directly follows your splash screen-->
<item name="postSplashScreenTheme">@style/Theme.MyActivity</item>
<item name="android:windowSplashScreenBrandingImage">@drawable/wculogo</item>
</style>
有没有一种简单的方法来延长非动画启动画面的持续时间?