CN109240792A - Device, method and the storage medium of data are shown using composite data type - Google Patents

Device, method and the storage medium of data are shown using composite data type Download PDF

Info

Publication number
CN109240792A
CN109240792A CN201811134423.7A CN201811134423A CN109240792A CN 109240792 A CN109240792 A CN 109240792A CN 201811134423 A CN201811134423 A CN 201811134423A CN 109240792 A CN109240792 A CN 109240792A
Authority
CN
China
Prior art keywords
data
data type
type
initial
assignment
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.)
Pending
Application number
CN201811134423.7A
Other languages
Chinese (zh)
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.)
Wuhan Huazhong Shixun Technology Co Ltd
Original Assignee
Wuhan Huazhong Shixun Technology 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 Wuhan Huazhong Shixun Technology Co Ltd filed Critical Wuhan Huazhong Shixun Technology Co Ltd
Priority to CN201811134423.7A priority Critical patent/CN109240792A/en
Publication of CN109240792A publication Critical patent/CN109240792A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention discloses a kind of device, method and storage medium that data are shown using composite data type.Wherein the method includes according to original data type configuration and the different truthful data type of assignment;The initial data of interception input list element;Judge whether the initial data is complex data;The truthful data type of the complex data is determined after judging the initial data for complex data and obtains the assignment of the truthful data type;List element shows the initial data according to the assignment.It is different truthful data types that the present invention, which can be pre-configured with original data type,;The truthful data type after initial data according to initial data is obtained again, and fast resolving simultaneously shows initial data.

Description

Device, method and the storage medium of data are shown using composite data type
Technical field
The present invention relates to the technical fields of mobile terminal, show number using composite data type in particular to a kind of According to device, method and storage medium.
Background technique
List View element input initial data after list view elements would generally follow set process show it is original Data.No matter the original data type of initial data is why, the layout pattern of each view layout have and only can with it is single Data type association.
In order to improve the efficiency and fault-tolerance of data processing, developer is usually actively single type in the prior art Initial data is split as a variety of different patterns;But the prior art, when coping with complex scene, initial data needs are split Pattern is more, scalability.
Summary of the invention
The embodiment of the present invention at least provides a kind of method for showing data using composite data type, can be pre-configured with original Beginning data type is different truthful data type;The truthful data type after initial data according to initial data is obtained again, fastly Speed parses and shows initial data.The described method includes:
Step100, the simultaneously different truthful data type of assignment is configured according to original data type;
The initial data of Step200, interception input list element;
Step300, judge whether the initial data is complex data;
Step400, the truthful data type that the complex data is determined after judging the initial data for complex data And obtain the assignment of the truthful data type;
Step500, list element show the initial data according to the assignment.
Preferably, the Step100 is configured that
Step110, preparatory acquisition have the original data type of at least two parameters;
The value of parameter described in Step120, combination any two and the parameter is different truthful data type;
Step130, the respectively different truthful data type of assignment.
Preferably, the Step300 is configured to judge whether the initial data includes at least two parameters.
Preferably, the Step300 is configured to judge whether the data type of the initial data is the composite number prestored According to type.
Preferably, the Step500 is configured that
Step510, list element obtain the initial data original data type and the assignment;
Step520, list element show the initial data according to the assignment and the original data type.
Preferably, the Step400 is configured with and obtains the original number after judging the initial data for complex data According to the check value of the correspondence original data type;
The Step500 is configured that
Step510, list element obtain the check value and the assignment;
Step520, list element show the initial data according to the assignment and the check value.
Preferably, the initial data is shown in the Step520, be configured that
Step521, the original data type that the initial data is determined according to the check value;
Step522, the value that parameter in the original data type is determined according to the assignment;
Step523, it is laid out according to the value match views of the original data type and the parameter;
Step524, view container is established according to the view layout;
Step525, the binding initial data and the view container.
Preferably, the Step400 is configured to after judging the initial data for single data through the list group Part shows the initial data.
The embodiment of the present invention at least discloses a kind of storage medium, for storing computer instruction, which is characterized in that the finger Above-mentioned steps are realized when order is executed by processor.
The embodiment of the present invention at least discloses a kind of device that data are shown using composite data type.
Described device includes:
Data processing module, according to original data type configuration and the different truthful data type of assignment;
Data analysis module, the initial data of interception input list element, judges whether the initial data is composite number According to determining the truthful data type of the complex data after judging the initial data for complex data and obtain described true The assignment of data type;
List element, list element show the initial data according to the assignment.
For above scheme, the present invention is by being referring to the drawings described in detail disclosed exemplary embodiment, also The other feature and its advantage for making the embodiment of the present invention understand.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the schematic diagram of a scenario of chat messages;
Fig. 2 is the flow chart of the present embodiment method;
Fig. 3 is the schematic diagram of truthful data type;
Fig. 4 is the flow chart of Step530;
Fig. 5 is that the module of embodiment device forms figure.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is implemented The component of example can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiments of the present invention, this field is common Technical staff's every other embodiment obtained without creative efforts belongs to the model that the present invention protects It encloses.
The present embodiment discloses a kind of method for showing data using composite data type, can not split data type Under the premise of parse and show initial data.
In order to realize above content, the interface of the preparatory creation composite data type of the method for the present embodiment IMultiType;public interface IMultiType{int getRealType()}.Pass through interface IMultiType The function getRealType of adapter is set to return to the truthful data type of initial data;Configured list component RecyclerView Initial data can be correctly shown according to the truthful data type of return.
Based on above content, the implementation of the present embodiment passes through preference explanation.Fig. 1 is please referred to, preference is list element RecyclerView can correctly show chat message according to the truthful data type of return;Wherein configure original data type For Chat, original data type Chat configuration there are two parameter, parameter first is that " whether being that one's own side receives " and parameter second is that " message Type is picture or text ".
Referring to FIG. 2, the implementation of the present embodiment method includes the following steps.
Step100, it is preparatory configured according to the original data type Chat that can be obtained under chat scenario it is different true Data type and assignment.
Step110, in advance the original data type Chat under acquisition chat scenario.
Step120, following four kinds such as Fig. 3 are returned to according to parameter one, parameter two and parameter one, the possibility value of parameter two Truthful data type:
Truthful data type one, the received text message type of one's own side;
Truthful data type two, the text message type that one's own side sends;
Truthful data type three, the received image information type of one's own side;
Truthful data type four, the image information type that one's own side sends.
Step130, respectively four kinds of assignment different truthful data types;As assignment truthful data type one is 1, true number According to type two be 2, truthful data type three is 3 and truthful data type four is 4.
In four kinds of truthful data types by Step100 preparatory configuration original data type Chat and assignment is true respectively After real data type, the present embodiment returns function getViewType () by the function getViewType () of overriding adapter The truthful data class of initial data is returned, detailed process is as follows.
Step200, the initial data for returning to list element RecyclerView is intercepted.
Step300, judge whether initial data is original data type Chat after obtaining initial data.
Step400, after judging initial data for original data type Chat according to parameter one, parameter two and its value, Determine the truthful data type and assignment of complex data;Meanwhile return assignment and the corresponding original data type of initial data The hash value of Chat.
For example, judge parameter first is that " be for one's own side reception ", parameter second is that " type of message is picture ",;So, it determines true Real data type is to be configured to truthful data type three in Step120, is assigned a value of 3.
Certainly, determine whether that display is former by the preset process of list element after judging initial data for single data Beginning data.
The present embodiment configured list component RecyclerView can receive the tax that overriding function getViewType () returns The hash value of value and original data type Chat, institute in the original data type and original data type for judging initial data There is the value of parameter;
Step500, initial data is shown according to assignment and the hash value of original data type Chat.Step500's is specific Process is as follows.
Step510, list element RecyclerView obtain the initial data class that overriding function getViewType () returns The hash value of type Chat;By comparing the hash value of hash value and preset all original data types, for determining this implementation The corresponding original data type Chat of example initial data.
Step520, list element RecyclerView obtain overriding function getViewType () and return to truthful data type Assignment, for determining the value of parameter one and parameter two in original data type Chat.
Step530, list element RecyclerView are according in the original data type Chat and two for determining initial data Initial data is shown after the value of a parameter.
Referring to FIG. 4, the present embodiment list element RecyclerView in Step530 shows the specific stream of initial data Journey is as follows.
Step531, initial data is filled in matched view layout according to the value of parameter and parameter;
Step532, matched view container is established according to view layout;
Step533, binding initial data and view container.
The method of the present embodiment to judge initial data whether be whether be that the mode of compound type is not construed as limiting;This implementation Example is preferred to provide following two scheme, and the content of the present embodiment is better understood convenient for those skilled in the art.
It is original such as preference one is whether the data type for judging initial data is registered composite data type Data type Chat.If the data type of initial data is registered composite data type, judge that initial data is Complex data.
The second is judging whether initial data includes at least two parameters, as original data type Chat includes in preference Parameter one and parameter two.Determine initial data for complex data after judging that initial data includes at least two parameters.
The present embodiment separately discloses a kind of storage medium, for ease of description, illustrates only relevant to the embodiment of the present invention Part.Storage medium is for storing at least one computer instruction, realization when at least one computer instruction is executed by processor The all or part of the steps of the above method.
Referring to FIG. 5, the present embodiment separately discloses a kind of device for showing data using composite data type, for the ease of saying Bright, only parts related to embodiments of the present invention are shown.Described device includes data processing module, data analysis module and column Table component.
Data processing module is configured to configure the simultaneously different truthful data type of assignment according to original data type;
Data analysis module is configured to the initial data of interception input list element, judges whether the initial data is multiple Data are closed, are determined after judging the initial data for complex data described in the truthful data type of the complex data and acquisition The assignment of truthful data type;
List element is configured to list element and shows the initial data according to the assignment.
These are only the preferred embodiment of the present invention, is not intended to restrict the invention, for those skilled in the art For member, the invention may be variously modified and varied.All within the spirits and principles of the present invention, it is made it is any modification, Equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of method for showing data using composite data type, which is characterized in that
The described method includes:
Step100, the simultaneously different truthful data type of assignment is configured according to original data type;
The initial data of Step200, interception input list element;
Step300, judge whether the initial data is complex data;
Step400, the truthful data type that the complex data is determined after judging the initial data for complex data simultaneously obtain Take the assignment of the truthful data type;
Step500, list element show the initial data according to the assignment.
2. the method for showing data using composite data type as described in claim 1, which is characterized in that the Step100 matches It is set to:
Step110, preparatory acquisition have the original data type of at least two parameters;
The value of parameter described in Step120, combination any two and the parameter is different truthful data type;
Step130, the respectively different truthful data type of assignment.
3. the method for showing data using composite data type as claimed in claim 2, which is characterized in that the Step300 matches It is set to and judges whether the initial data includes at least two parameters.
4. the method for showing data using composite data type as claimed in claim 2, which is characterized in that the Step300 matches It is set to and judges whether the data type of the initial data is the composite data type prestored.
5. the method for showing data using composite data type as described in claim 1, which is characterized in that
The Step500 is configured that
Step510, list element obtain the initial data original data type and the assignment;
Step520, list element show the initial data according to the assignment and the original data type.
6. the method for showing data using composite data type as claimed in claim 5, which is characterized in that
The Step400 corresponds to the original configured with obtaining the initial data after judging the initial data for complex data The check value of beginning data type;
The Step500 is configured that
Step510, list element obtain the check value and the assignment;
Step520, list element show the initial data according to the assignment and the check value.
7. the method for showing data using composite data type as claimed in claim 6, which is characterized in that in the Step520 It shows the initial data, is configured that
Step521, the original data type that the initial data is determined according to the check value;
Step522, the value that parameter in the original data type is determined according to the assignment;
Step523, it is laid out according to the value match views of the original data type and the parameter;
Step524, view container is established according to the view layout;
Step525, the binding initial data and the view container.
8. the method for showing data using composite data type as described in claim 1, which is characterized in that the Step400 matches It is set to and the initial data is shown by the list element after judging the initial data for single data.
9. a kind of storage medium, for storing computer instruction, which is characterized in that realized such as when described instruction is executed by processor The step of claim 1-8 any one the method.
10. a kind of device for showing data using composite data type, which is characterized in that
Described device includes:
Data processing module, according to original data type configuration and the different truthful data type of assignment;
Data analysis module, the initial data of interception input list element, judges whether the initial data is complex data, The truthful data type of the complex data is determined after judging the initial data for complex data and obtains the truthful data The assignment of type;
List element, list element show the initial data according to the assignment.
CN201811134423.7A 2018-09-27 2018-09-27 Device, method and the storage medium of data are shown using composite data type Pending CN109240792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811134423.7A CN109240792A (en) 2018-09-27 2018-09-27 Device, method and the storage medium of data are shown using composite data type

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811134423.7A CN109240792A (en) 2018-09-27 2018-09-27 Device, method and the storage medium of data are shown using composite data type

Publications (1)

Publication Number Publication Date
CN109240792A true CN109240792A (en) 2019-01-18

Family

ID=65056295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811134423.7A Pending CN109240792A (en) 2018-09-27 2018-09-27 Device, method and the storage medium of data are shown using composite data type

Country Status (1)

Country Link
CN (1) CN109240792A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956145A (en) * 2016-05-12 2016-09-21 武汉斗鱼网络科技有限公司 Method and system for carrying out mixed loading on different styles in lists
CN108563961A (en) * 2018-04-13 2018-09-21 中国民航信息网络股份有限公司 The recognition methods of data desensitization platform sensitive data, device, equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956145A (en) * 2016-05-12 2016-09-21 武汉斗鱼网络科技有限公司 Method and system for carrying out mixed loading on different styles in lists
CN108563961A (en) * 2018-04-13 2018-09-21 中国民航信息网络股份有限公司 The recognition methods of data desensitization platform sensitive data, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN106990952B (en) Form verification method and system based on Vue
RU2569066C2 (en) Method and device for displaying instant messaging messages
US10839145B2 (en) Form filling method and related terminal
US20150304266A1 (en) Method and apparatus for adding friend, and storage medium
CN113805870B (en) BFF architecture-based service interface arrangement method and system
CN107911483A (en) A kind of information transferring method and device
CN105610819A (en) Method and apparatus for providing service for inquiring server information
CN110198327B (en) Data transmission method and related equipment
CN106385403A (en) User account registering method and device of self-service printing equipment
CN114237840A (en) Resource interaction method, device, terminal and storage medium
US20240223694A1 (en) Interface display method and electronic device
CN107888989A (en) A kind of interactive system and method live based on internet
CN110516258B (en) Data verification method and device, storage medium and electronic device
CN109240792A (en) Device, method and the storage medium of data are shown using composite data type
CN102929845A (en) Network reading implementation server and method
CN115600980A (en) Method and device for sending message, electronic equipment and storage medium
US10853393B2 (en) Expired map data based anti-counterfeiting method, apparatus, storage medium and device
US20170171320A1 (en) Method, terminal and domain name server for connecting terminal to server
CN103279754A (en) Business card cloud identification method and system
CN114995717A (en) Multi-front-end middle station management method and system
CN107801181A (en) For in cross-platform based on subscriber phone number uniqueness decision method and system
CN109299240B (en) Chat robot knowledge display method and device
CN106230778A (en) A kind of tele-control system
CN110967003A (en) Standard navigation service configuration method, system, request method and navigation service interface
CN104267960A (en) User interface window generation method and equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190118