简体   繁体   中英

Android splash screen and async

When creating a splash screen for an Android app, does the code that runs while the splash screen is visible need to be asynchronous? If so, why? Thanks.

Yes, otherwise your splash image will never show until the code completes. Because Android has the single UI thread. If you do anything else in that UI thread then no UI changes are possible until your other code finishes.

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