CN103699374B - A method of the flexible customed grid control based on Android platform - Google Patents

A method of the flexible customed grid control based on Android platform Download PDF

Info

Publication number
CN103699374B
CN103699374B CN201310630629.XA CN201310630629A CN103699374B CN 103699374 B CN103699374 B CN 103699374B CN 201310630629 A CN201310630629 A CN 201310630629A CN 103699374 B CN103699374 B CN 103699374B
Authority
CN
China
Prior art keywords
cell
customed
grid control
android platform
data source
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
Application number
CN201310630629.XA
Other languages
Chinese (zh)
Other versions
CN103699374A (en
Inventor
柳素华
庄宗辉
周思政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yaxun Zhilian Technology Co ltd
Original Assignee
Xiamen Yaxon Networks Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201310630629.XA priority Critical patent/CN103699374B/en
Publication of CN103699374A publication Critical patent/CN103699374A/en
Application granted granted Critical
Publication of CN103699374B publication Critical patent/CN103699374B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

A kind of method that the present invention provides flexible customed grid control based on Android platform calculates the width of table each column, and data source information is stored in two-dimensional array firstly, the initialization of list data, obtains the width of device screen;Then, list data loads: calculating the length and width of each cell according to data source information, successively adds control later;Finally, setting unit lattice point hits the trigger module of event.Realizing can be diversified in display, and user oneself can set trigger module, and flexile customed grid control can satisfy the various display demands of different user.

Description

A method of the flexible customed grid control based on Android platform
Technical field
The method of the present invention relates to a kind of flexible customed grid control based on Android platform.
Background technique
It is relatively simple for traditional grid control design pattern based on Android platform.Such as Android itself The each column of grid control GridView, which can only be fixed, is set to the same width;It may be implemented using the table that ListView is realized Every column width and every row height adaptively adjust according to demand, but the pattern of table is only simple to wait the column such as rows to show;Its His succession View or the customized table for inheriting GroupView are that the mode of table realization is different, the effect of realization Do not have difference substantially with ListView.
This single grid control design pattern shows not the data of some complexity to Android platform at present Meet demand again.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of flexible customed table control based on Android platform The method of part realizes the diversification of display.
A kind of method of the flexible customed grid control based on Android platform of the present invention specifically comprises the following steps:
The initialization of step 10, list data obtains the width of device screen, calculates the width of table each column, and will Data source information is stored in two-dimensional array, and wherein the width of table each column is deposited in an one-dimension array;
Step 20, list data load, the length of each cell are calculated according to the data source information, according to the number It is that cell distributes sash according to line number shared by cell each in source information and columns, completes the design of table display interface, In the length of each cell deposit in an one-dimension array;
Step 30, the adding unit lattice into table, and be numbered for each cell;
Step 40, setting unit lattice point hit the trigger module of event.
Further, using the upper left corner of table as starting point, successively from left to right, adding unit lattice from top to bottom are simultaneously Each cell is numbered;
Further, the data source information includes that cell shows columns shared by content, cell, shared by cell Line number, the line number of table and table columns.
Further, the trigger module is interface form.
The present invention has the advantage that the method for the electrical form of the Android platform freely customized, improves at present Android platform grid control style sheet one can not intuitively illustrate complicated data source the status of content.Table style Design use free design form, completely by user according to demand come oneself customization, not only display is upper can be diversified, right The operation of table is also free and open, and user oneself can set trigger module completely, and flexile customed grid control can To meet the various display demands of different user.
Detailed description of the invention
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the execution flow chart of method of the invention.
Specific embodiment
As shown in Figure 1, a kind of quick distributed data paging method, includes the following steps:
The initialization of step 10, list data obtains the width of device screen, calculates the width of table each column, and will Data source information is stored in two-dimensional array, and wherein the width of table each column is deposited in an one-dimension array, the data source Information includes that cell shows line number shared by columns shared by content, cell and cell;
Step 20, list data load, the length of each cell are calculated according to the data source information, according to the number It is that cell distributes sash according to line number shared by cell each in source information and columns, completes the design of table display interface, In the length of each cell deposit in an one-dimension array;
Step 30, the adding unit lattice into table, and be numbered for each cell;It is with the upper left corner of table Point, successively from left to right, adding unit lattice from top to bottom, while being numbered for each cell;
Step 40, setting unit lattice point hit the trigger module of event, and the trigger module is interface form.
Specific embodiment is as follows:
Step 1: obtaining the width of equipment, provided data source information is stored in two-dimensional array, certainly according to user The width ratio of the table each column of oneself setting, calculates the width of each column of table, they is stored in an one-dimension array, Data source information includes that cell shows line number shared by columns shared by content, cell and cell;
Step 2: the cell information according to provided in data source information, length needed for calculating each cell, It stores in one-dimension array, convenient for taking, uses Android normal view ScrollView as container, believed according to data source Line number shared by each cell and columns distribution sash design the display interface of table to cell in breath;
Step 3: using the upper left corner of table as starting point, successively from left to right, adding unit lattice from top to bottom, and to be added The cell added is numbered, and facilitates and is indexed below to cell;
Step 4: setting unit lattice point hits the trigger module of time, the module is with interface form, according to practical use come complete It is apt to the module.
The present invention has the advantage that the method for the electrical form of the Android platform freely customized, improves at present Android platform grid control style sheet one can not intuitively illustrate complicated data source the status of content.Table style Design use free design form, completely by user according to demand come oneself customization, not only display is upper can be diversified, right The operation of table is also free and open, and user oneself can set trigger module completely, and flexile customed grid control can To meet the various display demands of different user.
Although specific embodiments of the present invention have been described above, those familiar with the art should be managed Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, it is familiar with this The technical staff in field should be covered of the invention according to modification and variation equivalent made by spirit of the invention In scope of the claimed protection.

Claims (4)

1. a kind of method of the flexible customed grid control based on Android platform, characterized by the following steps:
The initialization of step 10, list data obtains the width of device screen, calculates the width of table each column, and by data Source information is stored in two-dimensional array;
Step 20, list data load, the length of each cell are calculated according to the data source information, according to the data source Line number shared by each cell and columns are that cell distributes sash in information, complete the design of table display interface;
Step 30, the adding unit lattice into table, and be numbered for each cell;
Step 40, setting unit lattice point hit the trigger module of event.
2. a kind of method of flexible customed grid control based on Android platform according to claim 1, feature Be: step 30 is further specifically:
Step 31, using the upper left corner of table as starting point, successively from left to right, adding unit lattice from top to bottom, while being each list First lattice are numbered.
3. a kind of method of flexible customed grid control based on Android platform according to claim 1, feature Be: the data source information includes that cell shows line number shared by columns shared by content, cell and cell.
4. a kind of method of flexible customed grid control based on Android platform according to claim 1, feature Be: the trigger module is interface form.
CN201310630629.XA 2013-12-02 2013-12-02 A method of the flexible customed grid control based on Android platform Active CN103699374B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310630629.XA CN103699374B (en) 2013-12-02 2013-12-02 A method of the flexible customed grid control based on Android platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310630629.XA CN103699374B (en) 2013-12-02 2013-12-02 A method of the flexible customed grid control based on Android platform

Publications (2)

Publication Number Publication Date
CN103699374A CN103699374A (en) 2014-04-02
CN103699374B true CN103699374B (en) 2019-07-02

Family

ID=50360913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310630629.XA Active CN103699374B (en) 2013-12-02 2013-12-02 A method of the flexible customed grid control based on Android platform

Country Status (1)

Country Link
CN (1) CN103699374B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630986A (en) * 2015-12-25 2016-06-01 中国航天系统工程有限公司 Method for acquiring multidimensional data from database for grid display
CN106021340A (en) * 2016-05-09 2016-10-12 统通信(苏州)有限公司 A method for realizing Android terminal dynamic table controls
CN107066439B (en) * 2017-04-07 2024-04-19 广州市玄武无线科技股份有限公司 Method and device for customizing form control and electronic equipment
CN110201390A (en) * 2019-04-24 2019-09-06 深圳点猫科技有限公司 The implementation method and electronic equipment of the gradual control system of game based on programming
CN110457016B (en) * 2019-08-02 2021-02-05 上海融客软件科技有限公司 Data visualization processing method and device, computer equipment and storage medium
CN112990769A (en) * 2021-04-21 2021-06-18 北京宇信科技集团股份有限公司 Service processing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794280A (en) * 2010-03-11 2010-08-04 北京中科辅龙计算机技术股份有限公司 Form automatic generation method and system based on form template set
CN102880620A (en) * 2011-07-15 2013-01-16 深圳市金蝶友商电子商务服务有限公司 Method for creating spreadsheet

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794280A (en) * 2010-03-11 2010-08-04 北京中科辅龙计算机技术股份有限公司 Form automatic generation method and system based on form template set
CN102880620A (en) * 2011-07-15 2013-01-16 深圳市金蝶友商电子商务服务有限公司 Method for creating spreadsheet

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Android自定义表格控件";mmy博客园;《https://www.cnblogs.com/mmy0925/archive/2013/02/05/2892688.html》;20130205;第1-5页
"数据表格JgGrid自适应列宽度";Ajax;《http://vipshow.iteye.com/blog/1812381》;20130222;第1-3页

Also Published As

Publication number Publication date
CN103699374A (en) 2014-04-02

Similar Documents

Publication Publication Date Title
CN103699374B (en) A method of the flexible customed grid control based on Android platform
CN103870255B (en) Floatation element display methods and device
CN103699369B (en) A kind of message display method and device of mobile terminal
Muller-Landau The tolerance–fecundity trade-off and the maintenance of diversity in seed size
CN105549729B (en) Electronic device for operating the method for sensor panel and for supporting this method
CN104204994B (en) Augmented reality computing device, equipment and system
CN107402667A (en) Electronic equipment comprising display
US20130076774A1 (en) Electronic device having function of automatically arranging icons and method therefor
CN108427586B (en) Using push terminal, method and the computer readable storage medium of theme
JP2013218495A5 (en)
JP2019194893A5 (en) Tournament management system, display control device, and program
CN106164836A (en) Organizing user interface element
CN106354378B (en) A kind of method and apparatus for quickly choosing multiple targets
CN105068777A (en) Display control method and electronic equipment
JP2014176513A5 (en)
CN105700767A (en) File stacking type display system and method
CN104346042A (en) Display area setting method and device
US10444935B2 (en) User interface display method
JP2012175705A5 (en)
CN106033495B (en) A kind of processing method and processing device of human body physiological characteristics data
CN104123077B (en) Unlocking method and mobile terminal
CN106648708B (en) Control method and system for android system grid view
JP2014059758A5 (en)
JP2014057869A5 (en) Information processing apparatus and game program
Leone Quanta and qualia in the semiotic theory of culture

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 361009 Xiamen Torch High tech Zone Software Park Innovation Building C Area 303-E, Fujian Province

Patentee after: Xiamen Yaxun Zhilian Technology Co.,Ltd.

Country or region after: China

Address before: 361009 No.46, guanri Road, phase II, software park industrial base, Xiamen City, Fujian Province

Patentee before: XIAMEN YAXON NETWORK Co.,Ltd.

Country or region before: China