Anki-Android
Anki-Android copied to clipboard
[Feature] Add Splash screen
Purpose / Description
Splash screen is one of new Android features and it makes user experiences richer.
This animation is Inspired by the navbar branding image of Anki Web
Fixes
- Fixes #14838
Approach
create splash screen
~android 11 | android 12 |
---|---|
How Has This Been Tested?
- physical device (Android 13)
- emulator on Android Studio (Android 7.1) P.S the difference of color of star is already fixed.
Checklist
Please, go through these checks before submitting the PR.
- [x] You have a descriptive commit message with a short title (first line, max 50 chars).
- [x] You have commented your code, particularly in hard-to-understand areas
- [x] You have performed a self-review of your own code
- [x] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
- [x] UI Changes: You have tested your change using the Google Accessibility Scanner
Is this really needed that too using a dependency? we already have a splash screen ig
Is this really needed that too using a dependency? we already have a splash screen ig
Ops, this fallback method for android11 and below seems not to depend on androidx.core.core-splashscreen. I'll remove the dependency within a few hours (because I'm not in home now.)
I can't determine what is wrong because the lint error happens in the code whch has'nt been modified. I'll try to reset my git commits and recommit.
Thanks for trying, I'll take a look
From the video, the spinning animation seems much too fast, I'd see about reducing the speed to maybe 0.75x what's currently there.
Thank you for your advice. I changed the rotation speed, however, both my smartphone and pc are not high end models, and it was found I couldn't record the screen as usual. So, I would like to ask @david-allison to check the animation yourself.
The following are unused:
-
Theme_Dark.Launcher.NoTitleBar
-
splash_icon_adaptive.xml
We need to improve our lint error reporting
There's not enough time to show the 'star' before the splash screen disappears
Same here. In those cases, having no animation looks better IMHO
On my phone/emulator, the opposite problem occurs:
There's not enough time to show the 'star' before the splash screen disappears
When I add a sleep, the star spins too quickly
Don't worry about the lint errors for now, I've added this to make them easier to diagnose, should be in
main
later:
I fixed these problems, however, I realized a hack* to rotate star infinitely didn't work well on Android13 and avobe, so I made the star rotate jsut once.
I thought It might be better not to rotate the star.
* This hack is to set
android:repeatMode="restart"
android:repeatCount="infinite"
to objectAnimator
.
Splash screen is removed when windowSplashScreenAnimationDuration
pass and the system is ready for drawing the view.
On Android 12 the hack works well because windowSplashScreenAnimationDuration
is set in style.xml manually.
On Android 13 and avobe, however, the system set windowSplashScreenAnimationDuration
0
automatically and start removing splash screen as soon as it's ready and then splash screen doesn't last until the animation finish.
The reason why it happens is that the system on Android 11 and avobe tries to estimate the duration of the vector animation automatically, but it can't because of the hack.
Due to the bad performance of my smartphone, I couldn't realize that the hack doesn't work.
Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically
Would like to take over it
Sounds good