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

Adaptation method and device for list item view in Android system, equipment and medium

A list item and view technology, applied in the computer field, can solve problems such as low adaptation efficiency and code redundancy, and achieve the effect of improving adaptation efficiency and reducing code redundancy

Pending Publication Date: 2022-03-15
WUHAN DOUYU NETWORK TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantages of the existing list item view adaptation method include at least: when multiple list items need to be adapted, multiple adapter functions need to be implemented, resulting in low adaptation efficiency and serious code redundancy

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
  • Adaptation method and device for list item view in Android system, equipment and medium
  • Adaptation method and device for list item view in Android system, equipment and medium
  • Adaptation method and device for list item view in Android system, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0022] figure 1 It is a schematic flowchart of a method for adapting a list item view in an Android system provided by Embodiment 1 of the present invention. The method for adapting the list item view in the Android system disclosed in this embodiment is applicable to the case of adapting multiple list item views. The method for adapting the list item view in the Android system disclosed in this embodiment can be executed by an electronic device, and specifically can be implemented by software and / or hardware in the electronic device.

[0023] see figure 1 As shown, the adaptation method of the list item view in the Android system includes the following steps:

[0024] S110. In response to the adaptation instruction, acquire the number of items of the list item view to be adapted based on the predefined adapter, and obtain the item type of each item in the list item view cyclically until the number of times of acquisition reaches the number of items.

[0025] In the Android...

Embodiment 2

[0084] figure 2 It is a schematic structural diagram of a device for adapting a list item view in an Android system provided by Embodiment 2 of the present invention. see figure 2 As shown, the adaptation devices for the list item view in the Android system include:

[0085] The item type obtaining module 210 is configured to obtain the number of items of the list item view to be adapted based on the predefined adapter in response to the adaptation instruction, and obtain the item type of each item in the list item view in a loop until the number of times of acquisition reaches the number of items ;

[0086] The view container object acquisition module 220 is used to call the view container acquisition method of the view container management class corresponding to the currently acquired item type based on the view container creation method of the predefined adapter in the process of cyclically acquiring the item type of each item, A view container object can be de...

Embodiment 3

[0102] image 3 It is a schematic structural diagram of an electronic device provided in Embodiment 3 of the present invention. image 3 A block diagram of an exemplary electronic device 12 suitable for implementing any of the embodiments of the invention is shown. image 3 The electronic device 12 shown is only an example, and should not limit the functions and scope of use of the embodiments of the present invention. The device 12 is typically an electronic device that undertakes the adaptation of the list item view in the Android system.

[0103] Such as image 3 As shown, electronic device 12 takes the form of a general-purpose computing device. Components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, memory 28, bus 18 connecting the various components including memory 28 and processing unit 16.

[0104] Bus 18 represents one or more of several types of bus structures, including a memory bus or mem...

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 embodiment of the invention discloses an adaptation method and device for a list item view in an Android system, equipment and a medium, and the method comprises the steps: obtaining the number of items of the list item view to be adapted based on a predefined adapter, and circularly obtaining the item type of each item in the list item view; in the process of circularly obtaining the item type of each item, calling a view container obtaining method of a view container management class corresponding to the currently obtained item type based on a view container creating method of a predefined adapter, so as to define a view container object through the view container obtaining method; and based on a data binding method of a predefined adapter, calling a view container processing method of a view container management class corresponding to the view container object, so as to bind data corresponding to at least one class of view control elements to the view container object through the view container processing method. Various adaptation businesses of the view are realized through the self-defined view container management class, so that the adaptation efficiency can be improved, and the code redundancy can be reduced.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, device and medium for adapting a list item view in an Android system. Background technique [0002] Currently, each list item view presented on the interface in the Android system (such as a list item view containing element information such as text, pictures, or videos) requires a corresponding adapter Adapter to create a view container and bind data to achieve Fit data to list item view. The disadvantages of the existing list item view adaptation method include at least: when multiple list items need to be adapted, multiple adapter functions need to be implemented, resulting in low adaptation efficiency and serious code redundancy. Contents of the invention [0003] In view of this, the embodiments of the present invention provide a method, device, device and medium for adapting a list item view in an Android system, which ca...

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
IPC IPC(8): G06F8/20G06F8/38G06F9/451
CPCG06F8/24G06F8/38G06F9/451
Inventor 张磊
Owner WUHAN DOUYU NETWORK TECH CO LTD
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