Status Update
Comments
ca...@google.com <ca...@google.com>
ca...@google.com <ca...@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?
ca...@google.com <ca...@google.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?
da...@gmail.com <da...@gmail.com> #4
da...@gmail.com <da...@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"/>
ca...@google.com <ca...@google.com> #6
da...@gmail.com <da...@gmail.com> #7
ca...@google.com <ca...@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 (
Description
Component used: Core-splashscreen Version used: 1.0.0-beta01 Devices/Android versions reproduced on: Pixel 6 / api 31
In core-splashcreen-1.0.0-beta01,
Theme.Splashscreen
setandroid:windowLayoutInDisplayCutoutMode
param is set toshortEdge
. This flag value is kept after changing to thepostSplashScreenTheme
which is a surprising behavior.A workaround is to set back
android:windowLayoutInDisplayCutoutMode
to default in thepostSplashScreenTheme
.