简体   繁体   中英

Android splash screen delay

I have an animation for my splash screen and on some phones which take longer to load things, it starts mid animation.

The splash screen is really an activity that has a View, in which the animation is drawn. Is it possible to wait for the screen to load and then start the thread in the View? I mean can I somehow check if I can begin the animation and it will be shown, the whole thing

Do yourself a favor and DON'T use a splash screen. On Android guidelines Google is extremely against splash screens because they give some sort of slowish UI perception to the user, and it's not a good thing at all.

If you absolutely need to wait for some sort of data to finish loading/network query you can do it much more elegantly by letting the app load normally and give the user a loading indicator (eg SwipeToRefreshLayout from the v7 support lib).

Not actually answering your question but this is a much more elegant solution for a completely wrong approach for a good UX. The Animation.AnimationListener has a callback called onAnimationEnd where you can do whatever after the animation has finished.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM