Method and device for rapidly loading Activity data for Android system

A fast and data technology, applied in the direction of program control device, program loading/starting, etc., can solve problems such as delayed loading of Activity data

CN105446755AActive Publication Date: 2016-03-30ALIBABA GRP HLDG LTD
3 Cites 20 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2016-03-30

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The application discloses a method and device for rapidly loading Activity data for an Android system The method for rapidly loading Activity data for an Android system comprises: an Activity page non-basic element display control is packed with a user interface component and the Activity is started; an asynchronous loading page data task is started when an onCreate function is called; page basic elements are drawn; when an onWindowFocusChanged function is being called and the asynchronous loading page data task is finished, or when a call of the onWindowFocusChanged function is finished and the asynchronous loading page data task is finished, the component is triggered to draw a page non-basic element display control and the page non-basic element display control is filled with page data. By use of the method provided by the application, users may see the page basic elements as soon as the Activity is opened and page non-basic elements such as asynchronous request response results are rapidly displayed for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] This application relates to the field of smart terminal interface display, and in particular to a method and device for quickly loading Activity data on an Android system. Background technique

[0002] Activity is one of the four most basic and commonly used components of Android components (Activity, Service, ContentProvider, BroadcastReceiver). Activity is an application component that provides users with a visual interface to facilitate user operations, such as making calls, taking pictures, sending emails, or browsing maps. In an android application, an activity is usually a separate screen, which can display some controls or listen to user events and respond accordingly.

[0003] In the official Android documentation, the life cycle of an Activity is such as figure 1 Shown. Activity calls the onCreate function after the page is opened, then calls the onStart function and onResume function to complete the drawing of the page, and finally displays it to ...

Examples

specific Embodiment

[0054] Such as figure 2 As shown, it is a schematic flow diagram of a method for fast loading Activity data on the Android system of this application. The method includes the following steps:

[0055] Step S201: Use the user interface component to encapsulate the display controls of the page non-basic elements in the Activity layout file and start the Activity in the UI main thread.

[0056] The basic elements of the page are part or all of the page frame elements. The non-basic elements of the page are page elements other than the basic elements of the page. The user interface component is capable of controlling the layout of the component and will be rendered into the main interface when needed. If the user interface component is not used to encapsulate the display controls of the non-basic elements of the page, the Android system can choose the drawing timing by itself.

[0057] By using the user interface component to encapsulate the display controls of the non-basic elements...