Lazy loading implementation method and device, electronic equipment and storage medium
An implementation method and lazy loading technology, applied in the field of communication, can solve problems such as limited application scope, increase development workload, affect loading service access, etc., and achieve the effect of improving applicable scenarios.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] figure 1 This is a flowchart of the method for implementing lazy loading in Embodiment 1 of the present invention, and this embodiment is applicable to the situation where lazy loading is implemented in the AndroidX version. The method may be performed by a lazy loading implementation apparatus, which may be implemented in software and / or hardware, and may be configured in an electronic device, for example, the electronic device may be a background server or other device with communication and computing capabilities. like figure 1 As shown, the method specifically includes:
[0026] Step 101: Determine the lazy-loading class defined as an abstract class to implement the lazy-loading logic function, and define a target abstract method in the lazy-loading class to realize the target logic. At least two target business classes inherit the lazy-loading logic by inheriting the lazy-loading class Function.
[0027] Among them, lazy loading refers to the situation where the...
Embodiment 2
[0042] figure 2 This is a flowchart of the method for implementing lazy loading in the second embodiment of the present invention, and the second embodiment is further optimized on the basis of the first embodiment. like figure 2 As shown, the method includes:
[0043] Step 201: Determine the lazy loading class defined as an abstract class to realize the lazy loading logic function, and define the target abstract method in the lazy loading class to realize the target logic. At least two target business classes inherit the lazy loading logic by inheriting the lazy loading class Function.
[0044] Step 202 , when the page is loaded, by overriding the onCreateView function provided by the system, so as to call back the onCreateView function when the page is loaded to realize the specific page layout loading logic.
[0045] Among them, page loading is the initial process in the page implementation process. When the page is lazy loaded, the first page is loaded. When the page ...
Embodiment 3
[0080] image 3 This is a schematic structural diagram of the device for implementing lazy loading in Embodiment 3 of the present invention, and this embodiment is applicable to the situation where lazy loading is implemented in the AndroidX version. like image 3 As shown, the device includes:
[0081] The abstract definition module 310 is configured to determine a lazy loading class defined as an abstract class to realize the lazy loading logic function, and define a target abstract method in the lazy loading class to realize the target logic, and at least two target business classes inherit the The lazy loading class inherits the lazy loading logic function;
[0082] The function rewriting module 320 is used to implement the logical function of the target function when calling back the target function by rewriting the target function provided by the system during the page realization process;
[0083] The method inputting module 330 is used to input the target abstract m...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com