Status Update
Comments
al...@google.com <al...@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?
ex...@gmail.com <ex...@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?
ra...@gmail.com <ra...@gmail.com> #4
pe...@gmail.com <pe...@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"/>
pe...@gmail.com <pe...@gmail.com> #6
ex...@gmail.com <ex...@gmail.com> #7
pe...@gmail.com <pe...@gmail.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 (
jo...@gmail.com <jo...@gmail.com> #9
j....@mrchadd.nl <j....@mrchadd.nl> #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
I didn't manage to reproduce on any Xiaomi devices.
- I tried with a Mi 8, Mi 8 Pro, Redmi 7 and 8.
- With and without dark mode enabled.
- With a png drawable in drawable-night/
If I can get a sample project to help me reproduce the bug, it would be helpful.
Description
Component used: core-splashscreen
Version used: 1.0.0-alpha02
Devices/Android versions reproduced on: Xiaomi Mi9 (API 30 with enabled dark mode)
Two background drawables (
compat_splash_screen_no_icon_background.xml
andcompat_splash_screen_no_icon_background.xml
) including only a stroke definition. In some cases, without any other inputs, this causes the fill color to be inferred as black.I managed to solve this by adding:
at the end of masking shape.