CN107436759B - Multi-level list display method for android system - Google Patents
Multi-level list display method for android system Download PDFInfo
- Publication number
- CN107436759B CN107436759B CN201710464813.XA CN201710464813A CN107436759B CN 107436759 B CN107436759 B CN 107436759B CN 201710464813 A CN201710464813 A CN 201710464813A CN 107436759 B CN107436759 B CN 107436759B
- Authority
- CN
- China
- Prior art keywords
- list
- data
- display
- sub
- parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention relates to a multi-level list display method for an android system, which comprises the following steps: packaging and storing all data to be displayed in the multilevel list in a classified manner to obtain packaged data, a list data storage set and a list data display set; and updating the list data display set according to the requirements of the user, and displaying the updated list data display set to realize the hierarchical display of the list according with the requirements of the user. Compared with the prior art, the invention has the advantages of high display speed, high display efficiency, convenient realization and the like.
Description
Technical Field
The invention relates to the field of system development, in particular to a multi-level list display method for an android system.
Background
With the development of the internet era, business requirements are endless, and the existing control at the APP end can not basically meet the current development requirements. The content becomes more and more complex, and the multi-level display forms are more and more, and the levels can reach 5 and 6 levels at most.
The development tool provided by the android system is only suitable for displaying a 2-level list, and in order to achieve the purpose of multi-level display, the multi-level list is displayed by using common system nesting in the existing method, the multi-level list is nested and stored layer by layer according to the hierarchy of the multi-level list, all the hierarchies are required to be traversed from top to bottom until the hierarchy to be displayed is found during display, the speed and the efficiency of display are reduced due to the mode, and meanwhile, when the content of the multi-level list is required to be modified, the difficulty and the complexity of modification are greatly increased due to nesting of the hierarchies.
Disclosure of Invention
The invention aims to provide a multi-level list display method for an android system aiming at the problems.
The purpose of the invention can be realized by the following technical scheme:
a multi-level list presentation method for an android system, the method comprising the steps of:
1) packaging and storing all data to be displayed in the multilevel list in a classified manner to obtain packaged data, a list data storage set and a list data display set;
2) and updating the list data display set according to the requirements of the user, and displaying the updated list data display set to realize the hierarchical display of the list according with the requirements of the user.
The step 1) is specifically as follows:
11) packaging all data to be displayed in the multilevel list to obtain all packaged data;
12) storing all the packaged data into the same set to obtain a list data storage set;
13) and storing the first-level packaging data into the same set as an initial set of the list data display set.
The step 11) is specifically as follows:
111) defining a sub-list pointing parameter and a sub-list display parameter, and setting an initial value for the sub-list display parameter, wherein the number of the sub-list pointing parameter and the sub-list display parameter is consistent with the number of data to be displayed;
112) and respectively packaging each piece of data to be displayed with the sub-list pointing parameter and the sub-list display parameter together as packaged data.
The sub-list pointing parameter is used for pointing to the position of the next-level data of the corresponding encapsulated data in the list data storage set, and when the corresponding data to be displayed does not have the next-level data, the sub-list pointing parameter points to the empty set.
The sub-list display parameter is used for indicating whether the corresponding packaging data displays the next-level data, and the initial value of the sub-list display parameter is not displayed.
The step 2) is specifically as follows:
21) modifying the parameter values of the corresponding encapsulated data according to the requirements of the user, and updating the list data storage set;
22) updating the list data display set according to the parameter values of all the packaged data;
23) and displaying all the data to be displayed in the updated list data display set, so as to realize the hierarchical display of the list meeting the user requirements.
The step 21) is specifically as follows:
211) reading a sublist pointing parameter of packaging data needing to be displayed at a lower level according to the requirement of a user;
212) judging whether the packaging data needing to display the subordinate is subordinate or not according to the reading result, if so, entering a step 213), and if not, finishing the operation;
213) and changing the sub-list display parameter values in the packaging data needing to be displayed at the next stage into reverse values, and updating the list data storage set.
The step 22) is specifically as follows:
221) deleting all non-first-level packaging data in the list data display set;
222) obtaining all sub-list display parameter values as displayed packaging data from the list data storage set;
223) reading corresponding sub-list pointing parameters for the encapsulated data obtained in the step 222);
224) according to the position pointed by the sub-list pointing parameter in step 223), extracting corresponding packaging data from the list data storage set, and adding the packaging data to the list data display set.
Compared with the prior art, the invention has the following beneficial effects:
(1) by packaging the data to be displayed, the hierarchy of the data is expressed in a mode that the sublist points to the parameters, and compared with the mode that the data is directly nested layer by layer according to the hierarchy, the mode of pointing by using the parameters greatly reduces the relevance between the data, thereby avoiding the process that all hierarchies need to be traversed from top to bottom in the hierarchical display process, greatly reducing the complexity of the display process, and improving the display speed and efficiency.
(2) All the encapsulated data are stored in the list data storage set, the data to be displayed are stored in the list data display set, when a user changes the display level, corresponding parameters of the encapsulated data are modified to serve as the updating basis of the list data display set, and compared with nested storage, the storage mode is simpler and more convenient for developers to modify, the display efficiency is improved, and the working strength of the developers is reduced.
(3) When parameters of the encapsulated data are modified, the sublist pointing parameters of the encapsulated data to be modified are read firstly, the operation is directly finished when the sublist pointing parameters point to the empty set, the encapsulated data of which the sublist pointing parameters do not point to the empty set are modified with the sublist display parameters, and the phenomenon that the sublist without the next level is meaningless operated is avoided through one-time pre-judgment, so that the display efficiency is improved.
(4) In the process of updating the list data display set, all the first-level packaging data are reserved, and the mode indicates that the first-level data are always displayed, so that the subsequent operation is not limited by the hierarchy.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a diagram illustrating the orientation relationship of each level in the present embodiment;
fig. 3 is a flow chart of multi-level list display in the present embodiment.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
As shown in fig. 1, this embodiment proposes a multi-level list display method for an android system, where the method includes the following steps:
1) packaging and storing all data to be displayed in the multilevel list in a classified mode to obtain packaged data, a list data storage set and a list data display set:
11) packaging all data to be displayed in the multilevel list to obtain all packaged data:
111) defining a sub-list pointing parameter and a sub-list display parameter (the sub-list pointing parameter is used for pointing to the position of the next-level data of the corresponding encapsulated data in the list data storage set, and when the corresponding data to be displayed does not have the next-level data, the sub-list pointing parameter points to an empty set; the sub-list display parameter is used for indicating whether the corresponding packaging data displays the next-level data or not, the initial value of the sub-list display parameter is not displayed), and the initial value is set for the sub-list display parameter, and the number of the sub-list pointing parameter and the number of the sub-list display parameter are consistent with the number of the data to be displayed;
112) packaging each data to be displayed with the sub-list pointing parameter and the sub-list display parameter as packaged data;
12) storing all the packaged data into the same set to obtain a list data storage set;
13) storing the first-level packaging data into the same set as an initial set of a list data display set;
2) updating the list data display set according to the requirement of the user, and displaying the updated list data display set to realize the hierarchical display of the list according with the requirement of the user, which specifically comprises the following steps:
21) according to the requirement of a user, modifying the parameter value of the corresponding encapsulated data, and updating the list data storage set:
211) reading a sublist pointing parameter of packaging data needing to be displayed at a lower level according to the requirement of a user;
212) judging whether the packaging data needing to display the subordinate is subordinate or not according to the reading result, if so, entering a step 213), and if not, finishing the operation;
213) changing the sub-list display parameter values in the packaging data needing to be displayed at the next level into reverse values, and updating the list data storage set;
22) and updating the list data display set according to the parameter values of all the packaged data:
221) deleting all non-first-level packaging data in the list data display set;
222) obtaining all sub-list display parameter values as displayed packaging data from the list data storage set;
223) reading corresponding sub-list pointing parameters for the encapsulated data obtained in the step 222);
224) extracting corresponding packaging data from the list data storage set according to the position pointed by the sub-list pointing parameter in the step 223), and adding the packaging data into the list data display set;
23) and displaying all the data to be displayed in the updated list data display set, so as to realize the hierarchical display of the list meeting the user requirements.
The display list hierarchy in this embodiment is shown in fig. 2, and the process of performing hierarchical display on the display list in fig. 2 according to the above steps is shown in fig. 3, specifically:
first two sets O, S are created. Wherein the O set is the original data and the S set is the display data. Let x be each element in the set, and x contains the following data: level: the level sequence number, level, of the current view is increased with the level of the service, for example, the first level: level is 0; and a second level: level is 1, and so on. hasChild: whether there is a child view; showcold: whether to display the child view; let O ═ x1, x2, x3 … xn ], and level ═ 0 in x1, x10, x11, be the first level; default to display the first level, then S ═ x1, x10, x 11. x2 is a sub-view of x1, then x2.level is 1; x3, x4... x9 is a sub-view of x2, with x3.level 2, and x4.level 2 … x9.level 2.
Assuming that the user clicks x1, that is, all data in x1 can be obtained, x1 can be found in the O set (original data), and it is determined whether x1 has a child view, if yes, the showcold of x1 is set as display (showcold true), the S set originally displayed is cleared, and then the view currently displayed (showcold true) is added to the S set, and the data in the set is: s ═ x1, x2, x10, x 11; when x2 in the set is clicked, the O set is removed again to find x2, if there is a child view, the display is set to be (showcold true), and the S set is cleared, all views of showcold true are added to the S set, so that S is [ x1, x2, x3 … x9, x10, x11], and thus, the display of the tertiary directory is completed. If the current view is already displayed (showcold ═ true), then set not to display, showcold ═ false.
Claims (3)
1. A multi-level list display method for an android system is characterized by comprising the following steps:
1) packaging and storing all data to be displayed in the multilevel list in a classified manner to obtain packaged data, a list data storage set and a list data display set;
2) updating the list data display set according to the requirements of the user, and displaying the updated list data display set to realize the hierarchical display of the list according with the requirements of the user;
the step 1) is specifically as follows:
11) packaging all data to be displayed in the multilevel list to obtain all packaged data;
12) storing all the packaged data into the same set to obtain a list data storage set;
13) storing the first-level packaging data into the same set as an initial set of a list data display set;
the step 11) is specifically as follows:
111) defining a sub-list pointing parameter and a sub-list display parameter, and setting an initial value for the sub-list display parameter, wherein the number of the sub-list pointing parameter and the sub-list display parameter is consistent with the number of data to be displayed;
112) packaging each data to be displayed with the sub-list pointing parameter and the sub-list display parameter as packaged data;
the step 2) is specifically as follows:
21) modifying the parameter values of the corresponding encapsulated data according to the requirements of the user, and updating the list data storage set;
22) updating the list data display set according to the parameter values of all the packaged data;
23) displaying all the data to be displayed in the updated list data display set, and realizing the hierarchical display of the list meeting the user requirements;
the step 22) is specifically as follows:
221) deleting all non-first-level packaging data in the list data display set;
222) obtaining all sub-list display parameter values as displayed packaging data from the list data storage set;
223) reading corresponding sub-list pointing parameters for the encapsulated data obtained in the step 222);
224) extracting corresponding packaging data from the list data storage set according to the position pointed by the sub-list pointing parameter in the step 223), and adding the packaging data into the list data display set;
the sub-list display parameter is used for indicating whether the corresponding packaging data displays the next-level data, and the initial value of the sub-list display parameter is not displayed.
2. The multi-level list presentation method for the android system of claim 1, wherein the sub-list pointing parameter is used to point to a position of next-level data of the corresponding packaged data in a list data storage set, and when no next-level data exists in the corresponding data to be presented, the sub-list pointing parameter points to an empty set.
3. The multi-level list display method for the android system according to claim 1, wherein the step 21) is specifically:
211) reading a sublist pointing parameter of packaging data needing to be displayed at a lower level according to the requirement of a user;
212) judging whether the packaging data needing to display the subordinate is subordinate or not according to the reading result, if so, entering a step 213), and if not, finishing the operation;
213) and changing the sub-list display parameter values in the packaging data needing to be displayed at the next stage into reverse values, and updating the list data storage set.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710464813.XA CN107436759B (en) | 2017-06-19 | 2017-06-19 | Multi-level list display method for android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710464813.XA CN107436759B (en) | 2017-06-19 | 2017-06-19 | Multi-level list display method for android system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107436759A CN107436759A (en) | 2017-12-05 |
CN107436759B true CN107436759B (en) | 2020-12-04 |
Family
ID=60458636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710464813.XA Active CN107436759B (en) | 2017-06-19 | 2017-06-19 | Multi-level list display method for android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107436759B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647011A (en) * | 2018-04-28 | 2018-10-12 | 北京酷我科技有限公司 | A kind of realization of unlimited level tree control |
CN113535170B (en) * | 2021-07-16 | 2024-07-26 | 京东方科技集团股份有限公司 | Multi-level list display method and terminal |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101126978A (en) * | 2007-09-25 | 2008-02-20 | 康佳集团股份有限公司 | Multi-stage menu implement method |
CN103558963A (en) * | 2013-11-11 | 2014-02-05 | 北京网秦天下科技有限公司 | System and method for displaying multi-level list |
US9934249B2 (en) * | 2014-06-03 | 2018-04-03 | Conduent Business Machines Services, Llc | Systems and methods for context-aware and personalized access to visualizations of road events |
CN104461571A (en) * | 2014-12-29 | 2015-03-25 | 乐视致新电子科技(天津)有限公司 | Menu level operating method and device |
CN105183460B (en) * | 2015-08-14 | 2018-09-14 | 魅族科技(中国)有限公司 | A kind of list methods of exhibiting and terminal |
CN106648485A (en) * | 2015-10-29 | 2017-05-10 | 阿里巴巴集团控股有限公司 | Page display method and client |
CN106598570A (en) * | 2016-11-15 | 2017-04-26 | 积成电子股份有限公司 | Construction and display method of multilevel menu in embedded system |
CN106649889B (en) * | 2017-01-18 | 2020-12-29 | 深圳市华第时代科技有限公司 | Data display method and device |
-
2017
- 2017-06-19 CN CN201710464813.XA patent/CN107436759B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107436759A (en) | 2017-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI709866B (en) | Equipment model identification method, device and processing equipment | |
CN108228169A (en) | Chart production method, apparatus, equipment and medium based on eCharts tools | |
US12008013B2 (en) | Applying a visual analytics intent language to generate data visualizations | |
CN100550059C (en) | A kind of vector graph acceleration method and multimedia player | |
CN104731590B (en) | A kind of user interface controls implementation method and device | |
JP2004506280A (en) | View images and image transitions | |
CN106033471A (en) | Method and device for processing form | |
JP7566270B2 (en) | Systems, methods and apparatus for image processing - Patents.com | |
CN107463366A (en) | A kind of interface mobilism method based on mobile App | |
CN107729396B (en) | Data dynamic query method and device | |
CN107436759B (en) | Multi-level list display method for android system | |
CN105389170A (en) | Drawing method and system | |
CN111210490B (en) | Electronic map construction method, device, equipment and medium | |
CN106649889B (en) | Data display method and device | |
CN108874392A (en) | User's guideline interface generation method and device | |
CN107621951B (en) | View level optimization method and device | |
CN106157353B (en) | A kind of text rendering method and text rendering device | |
CN105426384A (en) | Proposed target location generation method and apparatus | |
CN104951192A (en) | Method for optimizing user interface menu | |
CN103164230B (en) | Requirement modeling method based on new characteristic model and model transformation method | |
WO2016181566A1 (en) | Character recognition method, character recognition device, and character recognition program | |
US11561998B2 (en) | Implementing a visual analytics intent language across multiple devices | |
JP2013178670A (en) | Information processor and information processing method | |
CN102902534A (en) | Transparent OSD (Optical Scanning Device) software realization method | |
CN104156185A (en) | Three-dimensional font display method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 8 / F, building B, 388 xijiangwan Road, Hongkou District, Shanghai 200083 Patentee after: Shanghai Gaodun Education Technology Co.,Ltd. Address before: 8 / F, building B, 388 xijiangwan Road, Hongkou District, Shanghai 200083 Patentee before: SHANGHAI GAODUN EDUCATION & TRAINING Co.,Ltd. |