Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Asynchronous data loading method and device for Android device and its adapter view

A technology of asynchronous data and loading device, applied in the direction of program control device, program loading/starting, etc., can solve problems such as memory overflow, achieve the effect of preventing OOM problem and protecting CPU overhead

Inactive Publication Date: 2017-02-22
南京朗睿软件科技有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The problem to be solved by the embodiment of the present invention is that when the view adapter of the Android device performs asynchronous data loading, the problem of memory overflow is prone to occur

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Asynchronous data loading method and device for Android device and its adapter view
  • Asynchronous data loading method and device for Android device and its adapter view
  • Asynchronous data loading method and device for Android device and its adapter view

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] This embodiment provides an asynchronous data loading method for the adapter view of an Android device, refer to figure 1 , the following are detailed steps through specific steps:

[0042] In step S101, the adapter view unit receives an operation instruction, and sends a call request to the acquire view subunit of the general adapter unit.

[0043]In a specific implementation, the adapter view unit may be AdapterView, the general adapter unit may be GenericAdapter, and the view subunit may be obtained by a getView function. The operation instructions received by the AdapterView can be divided into two types: sliding the AdapterView or sliding the focus to control the AdapterView. AdapterView calls the getView function of GenericAdapter according to the received operation instruction.

[0044] Step S102, the acquiring view subunit creates a thread for loading asynchronous data according to the received call request, and triggers the asynchronous data management unit. ...

Embodiment 2

[0053] This embodiment provides an asynchronous data loading method for the adapter view of an Android device, refer to figure 2 , the following are detailed steps through specific steps:

[0054] In step S201, the AdapterView receives a sliding operation command and calls the getView function of the GenericAdapter.

[0055] In a specific implementation, the operation instructions received by the AdapterView can be divided into two types: sliding the AdapterView or sliding the focus to control the AdapterView. AdapterView calls the getView function of GenericAdapter according to the received operation instruction.

[0056] Step S202, the getView function creates a thread for loading asynchronous data, and triggers the AsyncDataManager class periodically.

[0057] In a specific implementation, the getView function may receive multiple call requests within a timing period. According to the call request, the getView function creates a corresponding thread for loading asynchro...

Embodiment 3

[0074] This embodiment provides an adapter view asynchronous data loading device for an Android device, refer to image 3 , the asynchronous data loading device includes: an adapter view unit 301, a general adapter unit 302, an asynchronous data management unit 303, and an execution task unit 304, wherein:

[0075] The adapter view unit 301 is configured to send a call request to the acquisition view subunit 3021 of the general adapter unit 302 when receiving the operation instruction;

[0076] The universal adapter unit 302 includes an acquisition view subunit 3021, and the acquisition view subunit 3021 is used to create a thread for loading asynchronous data and trigger the asynchronous data management unit 303 according to the received call request;

[0077] The asynchronous data management unit 303 includes a push task subunit 3031, and the push task subunit 3031 is used to push the thread for loading asynchronous data into a thread pool, when the number of threads in the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses Android equipment, and an asynchronous data uploading method and device for AdapterView of the Android equipment. The asynchronous data uploading method for the AdapterView comprises the steps that an AdapterView unit receives an operation instruction, and sends a calling request to a getView subunit of a GenericAdapter unit; the getView subunit creates a thread for uploading asynchronous data according to the received calling request, and triggers an AsyncDataManager unit; a PushTask subunit of the AsyncDataManager unit pushes the thread for uploading the asynchronous data to a thread pool, wherein when the number of threads in the thread pool reaches a preset threshold value, the PushTask subunit is used for performing sequencing and waiting on threads which are newly created by the getView subunit; and an ExecuteTask unit calls the threads in the thread pool and uploads the asynchronous data. By adopting the method, the device and the Android equipment, the CPU overhead of a system can be effectively protected, and an overflow problem of an internal memory can be prevented.

Description

technical field [0001] The invention relates to the field of Android devices, in particular to an asynchronous data loading method and device for an Android device and an adapter view thereof. Background technique [0002] With the rapid development of wireless communication technology, mobile phones based on Android (Android) operating system are becoming more and more popular, making more and more software developers turn to the development of Android mobile phone software. In Android system development, almost every application involves asynchronous data loading of the view adapter (AdapterView). [0003] AdapterView is a class in the Android system, which can include list view (ListView), grid view (GridView) and gallery (Gallery) and other view modes. An existing asynchronous data loading method is to perform asynchronous data loading by monitoring the sliding event of the ListView, or to perform asynchronous data loading by monitoring the sliding event of the GridView...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/445
Inventor 莫文飞吴春雷张文东田路
Owner 南京朗睿软件科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products