Launcher3 no icon Problems

Source: Internet
Author: User

Mtk8382/8121 platform.

 

After the machine (8-inch, default portrait screen) is burned for the first time, it starts in a horizontal position and finds that the launcher does not have an icon, but the portrait screen does not have this problem. During the test, we found that this problem also exists after setting clear data. Therefore, it can be preliminarily determined that it is a database initialization problem, because the database stores the data of favorite icon and workspace.

Compared with the database, it is found that the workspaces field is not written. View the output log and find that the biggest difference is that during the initialization process of step 1

setApplicationContext called [email protected] new[email protected]

. Find the location of the warning output and find it in oncreate. That is to say, during the initialization process, launcher3 oncreate twice.

 

We know that in order to re-layout, the launcher will re-create oncreate each screen conversion. When the screen is placed on a horizontal screen, the screen is converted again in a short time in the default vertical screen state.

After reading androidmanifest. XML, we found that the Android: screenorientation attribute is nosensor, so each start is default (portrait screen ). After changing to sensor, if the first initialization direction is the same as the actual direction, oncreate () will not be executed twice.

 

In launchermodel. Java, search "Step 1" to find the process of initializing the workspace. This workspace Initialization is not protected by synchronized.

Launcher3 no icon Problems

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.