"Classic bug" android-initialization splash screen does not disappear

Source: Internet
Author: User

Problem Description:
The business initialization process requires the Display splash screen interface, after a version update, found in some scenarios, the splash screen interface does not disappear after initialization is complete.

Cause of the problem:
Initialization is done on a child thread, and the splash screen belongs to the UI interface, which needs to be displayed by the UI thread. The initialization process and splash screen display on different threads, when the UI thread is busy, the initialization of the business is done and the splash screen is actually displayed.

Resolution:
Scenario One: To change the splash screen display to a synchronization link in the initialization process, blocking the current thread until the splash screen display will continue to execute. -There is a loss

Scenario Two: The splash screen display remains asynchronous, but needs to be added in the splash screen display time judgment, if the initialization has been completed, then directly close the interface.

"Classic bug" android-initialization splash screen does not disappear

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.