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
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2016-03-30
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
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...