Status Update
Comments
vi...@google.com <vi...@google.com> #2
The splash screen is dismissed as soon as the app is drawn and doesn't wait for the animation to finish which might be the reason why the animation doesn't repeat.
At most, the icon will animate for the value set in windowSplashScreenAnimationDuration
.
If that's not the case, can you please share your theme values and icon file? or at least a reproduction sample?
se...@gmail.com <se...@gmail.com> #3
windowSplashScreenBackground is #fff and #000 for dark theme.
The animation duration of Animated Vector Drawable is 1600.
I might not be able to share the icon since it is the one we are going to use in production. Is there any working Animated Vector Drawable you can provide from your side for us to compare? Anything from unit test?
ma...@tillsimon.com <ma...@tillsimon.com> #4
t6...@gmail.com <t6...@gmail.com> #5
In the <objectAnimator
tag, you need the repeat*
attributes
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:valueTo="200"
android:valueType="floatType"
android:propertyName="y"
android:repeatCount="1"
android:repeatMode="reverse"/>
vi...@google.com <vi...@google.com> #6
ke...@google.com <ke...@google.com> #7
vi...@google.com <vi...@google.com> #8
In that case, you'd need to manually make you application repeat using other ObjecAnimator. Since the splash screen is supposed to be short lived, an animation shouldn't need to be repeated.
If the loading time of your application is too high and require the use of some progress indicator, then I suggest to implement that in the app directly, ideally using skeletons loaders (
vi...@google.com <vi...@google.com> #9
al...@google.com <al...@google.com>
ab...@gmail.com <ab...@gmail.com> #10
That's definitely something worth discussing internally, I've added it to the list of thing to consider for the next version. Thanks for your feedback.
ca...@google.com <ca...@google.com> #11
Deeplinks are opened by the browser, and the opening application decides whether to show the splash screen of the new Activity or not. We agree that's it's not ideal, but for Android 12 this is intended and we are working on refining the API for future updates.
[Deleted User] <[Deleted User]> #12
iv...@gmail.com <iv...@gmail.com> #13
This is an important issue, if one app launches another and that's the only time the splash screen looks different to a regular user, it can cause security concerns, that perhaps, just maybe, a fake app was launched. Please provide any workarounds if found.
eu...@gmail.com <eu...@gmail.com> #14
This seemingly happens when opening apps normally while using custom launchers as well (Nova in my case).
mi...@gmail.com <mi...@gmail.com> #15
You can use windowSplashScreenBehavior to specify whether your app always displays the icon on the splash screen in Android 13 and higher. The default value is 0, which displays the icon on the splash screen if the launching activity sets the splashScreenStyle to SPLASH_SCREEN_STYLE_ICON, or follows the system behavior if the launching activity doesn't specify a style. If you prefer to never display an empty splash screen and always want the animated icon to be displayed, set this to the value icon_preferred.
<item name="android:windowSplashScreenBehavior">icon_preferred</item>
from
Description
I created a fresh project from a Android Studio (2020.3.1 Patch 3) template (Bottom Navigation Activity, minSDK 23, Java, compileSDK+targetSDK 31) and implemented the Androidx SplashScreen compat library as described in the docs (https://developer.android.com/guide/topics/ui/splash-screen/migrate ).
So what I did:
installSplashScreen
from the ActivityThen I install the app on a default Pixel5 emulator with Android 12 / API 31
What happened:
(Btw, also no change if I include a custom vector drawable
<item name="windowSplashScreenAnimatedIcon">@drawable/my_splash_logo</item>
)Expected behavior:
The splash screen should always display the icon