First 25 11:02:34. 03-431, 6908-6908 / com newenergyjinfu. Jytz D/App: before_onCreate: 25 11:02:34 03-239. 513. 6908-6908 / com newenergyjinfu. Jytz D/App: after_initOkGo (initPicasso) : 25 11:02:34 03-316. 570. 6908-6908 / com newenergyjinfu. Jytz D/App: after_ JPushInterface) : 25 11:02:34 03-365. 572. 6908-6908 / com newenergyjinfu. Jytz D/App: after_onCreate: 25 11:02:34 03-366. 597. 6908-6908 / com newenergyjinfu. Jytz D/WelcomeActivity: before_onCreate: 25 11:02:34 03-390. 663. 6908-6908 / com newenergyjinfu. Jytz D/WelcomeActivity: before_umeng: 25 11:02:34 03-454. 671. 6908-6908 / com newenergyjinfu. Jytz D/WelcomeActivity: after_onCreate: 25 11:02:34 03-460. 681. 6908-6908 / com newenergyjinfu. Jytz D/WelcomeActivity: before_onResume: 25 11:02:34 03-469. 687. 6908-6908 / com newenergyjinfu. Jytz D/WelcomeActivity: after_onResume: 474Copy the code

statistical

  1. App startup, 239
  2. Obtain the Telephone service 240
  3. Initialize Okgo and Picasso 316
  4. Initialize jpush 365
  5. oncreate 390
  6. Oncreate and set background image 454
  7. Example Initialize Fraternal 460
The second 03-25 11:08:02. 843, 9749-9749 / com. Newenergyjinfu. Jytz D/App: before_onCreate: 25 11:08:02 03-282. 908. 9749-9749 / com newenergyjinfu. Jytz D/App: after_initOkGo: 25 11:08:02 03-340. 930. 9749-9749 / com newenergyjinfu. Jytz D/App: after_initPicasso) : 25 11:08:02 03-360. 995. 9749-9749 / com newenergyjinfu. Jytz D/App: after_ JPushInterface) : 25 11:08:02 03-411. 997. 9749-9749 / com newenergyjinfu. Jytz D/App: after_onCreate: 25 11:08:03 03-412. 026. 9749-9749 / com newenergyjinfu. Jytz D/WelcomeActivity: before_onCreate: 25 11:08:03 03-436. 103. 9749-9749 / com newenergyjinfu. Jytz D/WelcomeActivity: before_umeng: 25 11:08:03 03-504. 115. 9749-9749 / com newenergyjinfu. Jytz D/WelcomeActivity: after_onCreate: 25 11:08:03 03-511. 130. 9749-9749 / com newenergyjinfu. Jytz D/WelcomeActivity: before_onResume: 25 11:08:03 03-522. 138. 9749-9749 / com newenergyjinfu. Jytz D/WelcomeActivity: after_onResume: 529Copy the code

statistical

  1. App startup, 282
  2. Gets the initialization okgo 340
  3. Initialize Picasso 360
  4. Initialize jpush 411
  5. oncreate 412
  6. Oncreate and set background image 504
  7. Initializing alliances…

It takes 500 milliseconds from startup to display, which is a bad experience for a blank screen. I wanted to know when the app would display the background of the activity, so I set a background for the XML file that enters the activity. Sleep (4000); sleep(4000);

The application is always in the blank screen state between 0 and 13 and 14 seconds. So the time to display an activity (including setting a background image in the activity’s layout file) is after onResume

Add it under the theme of your app

        <item name="android:windowBackground">@drawable/loading</item>
Copy the code

Observation found that there was no egg use, but changing the opPO real machine test effect,

Red rice 4 is not valid

It works under OPPO, but to prove it does

        <item name="android:windowBackground">@drawable/loading</item>
Copy the code

Property, delete the line in the appTheme, and find that the line is indeed effective…