Android operating UI in a child thread causes fragment to display blank issues

Source: Internet
Author: User

Demand is such that when no network requests to display the data in the cache, so that in the absence of the network without the interface of nothing, to the user's experience is not good, so added a cache mechanism, but this cache code is I copy from the home company, not how to look carefully, when in the absence of the net, The Switch tab appears, fragment display blank problem, even the title bar is not displayed, and then I put the cached comment on the problem is good, so the problem is to locate the cache this piece, find the problem is equal to the problem solved half, and then found that the callback is in the sub-thread, And I'm manipulating the UI in this callback,

That's why the interface is blank in this record.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android operating UI in a child thread causes fragment to display blank issues

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.