CN105373534A - List display method, device and list display terminal - Google Patents

List display method, device and list display terminal Download PDF

Info

Publication number
CN105373534A
CN105373534A CN201410397039.1A CN201410397039A CN105373534A CN 105373534 A CN105373534 A CN 105373534A CN 201410397039 A CN201410397039 A CN 201410397039A CN 105373534 A CN105373534 A CN 105373534A
Authority
CN
China
Prior art keywords
layout
areas
data
calculation unit
result
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.)
Granted
Application number
CN201410397039.1A
Other languages
Chinese (zh)
Other versions
CN105373534B (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.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410397039.1A priority Critical patent/CN105373534B/en
Publication of CN105373534A publication Critical patent/CN105373534A/en
Application granted granted Critical
Publication of CN105373534B publication Critical patent/CN105373534B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a list display method, device and a list display terminal and belongs to the field of list development. The method comprises following steps: data to be displayed is received by use of a view factory; the data is assigned to a corresponding layout ALU; in the layout ALU, layout for every layout region in the layout ALU is performed according to the data to obtain layout results of all layout regions; a unit view is created and the unit view is rendered according to the layout results and the data; and the rendered unit view is displayed. According to the invention, through the view factory and the layout ALU, layout is performed according to the data to obtain the layout results, and by use of the layout results, the unit view is rendered to display the data; the problem that a large amount of repeated work is required when new demands are developed in the prior art where a list is displayed by an MVC frame is solved; workload is saved and extension is facilitated by means of the provided method and device when new demands are developed.

Description

End is shown in list methods of exhibiting, device and list
Technical field
The present invention relates to list development field, particularly end is shown in a kind of list methods of exhibiting, device and list.
Background technology
Usually need in client to show each bar information in the form of a list, wherein every bar information as the list items of in this list, can show the list comprising many microbloggings in such as microblog page simultaneously, and every bar microblogging is a list items in this list.
A kind of special case as view shows is shown in list, is usually also to adopt MVC (Model-View – Controller, model-view-controller) framework to carry out showing.Conventional MVC framework comprises: model layer (Model), view layer (View) and key-course (Controller).Utilize show list in traditional MVC framework time, similar with the view of displaying other types, model layer is after acquisition data, after layout encapsulation being carried out to table data by key-course, inform view layer to show, wherein key-course is integrally developed when carrying out layout encapsulation to table data.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem: because the list items in list has similar layout when showing, user's head portrait of such as microblogging is all positioned at the upper left side of microblogging, the text of microblogging is all positioned at the centre position of microblogging, the forwarding review information of microblogging is all positioned at the below etc. of microblogging, and when utilizing MVC framework to carry out list displaying at present, do not consider this singularity of list items, and due to key-course table data is carried out layout encapsulation time integrally develop, when needing to expand certain part in list, need a large amount of repeated works.
Summary of the invention
In order to solve in prior art utilize MVC framework show list time, reckon without the particular topology of list items, causing the problem that the repeated workload when developing new demand is larger, embodiments providing a kind of list methods of exhibiting, device and list and showing end.Described technical scheme is as follows:
First aspect, provides a kind of list methods of exhibiting, and be applied to and include in the model-view-controller framework of layout factory and layout calculation unit, described method comprises:
Utilize described layout factory to receive the data that will show, described data are assigned in corresponding layout calculation unit;
In described layout calculation unit, according to described data, layout is carried out to each layout areas in described layout calculation unit, obtain the layout result of each layout areas;
Creating unit view, plays up described cell view according to described layout result and described data;
Described cell view after playing up is shown as the list items of in list.
Second aspect, provides a kind of list exhibiting device, and be applied to and include in the model-view-controller framework of layout factory and layout calculation unit, described device comprises:
Described data, for utilizing described layout factory to receive the data that will show, are assigned in corresponding layout calculation unit by distribution module;
Layout modules, in described layout calculation unit, carries out layout according to described data to each layout areas in described layout calculation unit, obtains the layout result of each layout areas;
Creation module, for creating unit view, plays up described cell view according to described layout result and described data;
Display module, for showing the described cell view after playing up as the list items of in list.
The third aspect, provides a kind of list and shows end, and described list shows that end comprises:
Touch-screen display, one or more than one processor;
Storer;
And one or more than one program, wherein said more than one or one program is stored in described storer, and be configured to be performed by described more than one or one processor, described more than one or one routine package is containing the instruction for carrying out following operation:
Utilize described layout factory to receive the data that will show, described data are assigned in corresponding layout calculation unit;
In described layout calculation unit, according to described data, layout is carried out to each layout areas in described layout calculation unit, obtain the layout result of each layout areas;
Creating unit view, plays up described cell view according to described layout result and described data;
Described cell view after playing up is shown as the list items of in list.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By the layout factory arranged, data are classified, carry out layout by the layout calculation unit corresponding with data, obtain layout result, when these data shown by needs, utilize the cell view of layout result and establishment to show these data; Due to view layer is divided, layout calculation unit is easy to expansion, and the layout in layout calculation unit is also easily expanded, therefore solve in prior art utilize MVC framework show list time, reckoning without the particular topology of list items, causing the problem that the repeated workload when developing new demand is larger; Reach and be convenient to expansion when developing new demand, save the effect of workload.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Figure 1A is the structural representation of the MVC framework involved by list methods of exhibiting provided in section Example of the present invention;
Figure 1B is the structural representation of the layout factory involved by list methods of exhibiting provided in section Example of the present invention;
The method flow diagram of the list methods of exhibiting provided in Fig. 2 one embodiment of the invention;
Fig. 3 A is the method flow diagram of the list methods of exhibiting provided in another embodiment of the present invention;
Fig. 3 B is the schematic diagram of each layout areas in the layout calculation unit provided in section Example of the present invention;
Fig. 3 C is the process flow diagram of layout calculation unit when carrying out basic layout according to data to layout areas in section Example of the present invention;
Fig. 3 D to Fig. 3 F be provide in section Example of the present invention to layout areas in layout calculation unit carry out vertical direction adjustment time schematic diagram;
Fig. 3 G to Fig. 3 I be provide in section Example of the present invention to layout areas in layout calculation unit carry out horizontal direction adjustment time schematic diagram;
Fig. 4 is the method flow diagram of the list methods of exhibiting provided in another embodiment of the present invention;
Fig. 5 is the structural representation of the list exhibiting device provided in one embodiment of the invention;
Fig. 6 is the structural representation of the list exhibiting device provided in another embodiment of the present invention;
Fig. 7 is the structural representation that end is shown in the list provided in one embodiment of the invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail." electronic equipment " said in literary composition can comprise smart mobile phone, panel computer, intelligent television, E-book reader, music player, pocket computer on knee and desk-top computer etc.
For the ease of the understanding to the embodiment of the present invention, first the key concept involved by the embodiment of the present invention is made an explanation, specific as follows:
MVC (Model-View-Controller, model-view-controller) framework is a kind of pattern using MVC design to create Web page application program.Wherein, Model (model) is the part for the treatment of application data logic in application program, for representing application program core (such as data-base recording list), is usually responsible for access data in a database; View (view) is the part processing data display in application program, for showing data (such as data-base recording and display), normally creates according to model data; Controller (controller) is the part processing user interactions in application program, for the treatment of input (such as write into Databasce record), usually reads data from view, controls user's input, and sends data to model.
Layout factory (ViewFactory), for providing by data to the corresponding configuration shown and transfer process.
Layout calculation unit (LayoutALU), for providing a kind of being configured to and the description of relative position view elements.Also be and need the view elements (such as list items) of showing to provide layout.
Leaf elements (UnitView), the layout result for the element interior layout according to correspondence encapsulates the element in list items.
Element interior layout (ModelUnit), for carrying out layout calculation to the element in list items, obtains layout result, and layout result is supplied to leaf elements.
In order to be more convenient for the understanding of the embodiment of the present invention, first the MVC framework involved by the embodiment of the present invention and layout factory configuration are described, respectively see shown in Figure 1A and Figure 1B.
Figure 1A is the structural representation of the MVC framework involved by list methods of exhibiting provided in section Example of the present invention, and this MVC framework comprises model layer (M layer), view layer (V layer) and key-course (C layer).
Wherein, model layer comprises network storage resource (RemoteDataSource) 102a and local storage resources (LocalStorage) 104a; View layer comprises layout factory (ViewFactory) 106a, layout calculation unit (LayoutALU) 108a and List View (TableView) 110a; Key-course comprises control data corporation (DataManager) 112a, view controller (ViewController) 114a and List View adapter (TableviewAdapter) 116a.
Wherein, the structure of layout factory as shown in Figure 1B.Figure 1B is the structural representation of the layout factory involved by list methods of exhibiting provided in section Example of the present invention, the data of acquisition are distributed to layout calculation unit (LayoutALU) 104b by layout factory (ViewFactory) 102b, and the configuration item of layout calculation unit comprises following three kinds:
The first configuration item is leaf elements (UnitView) 106b, namely in element interior layout (ModelUnit) 108b, carries out layout, utilizes leaf elements 106b to encapsulate layout result;
The second configuration item is layout factory 102b, namely in layout factory 102b, carries out layout, utilizes Aggregation view (AggregateView) 110b to encapsulate layout result;
The third is layout calculation unit 104b, namely in layout calculation unit 104b, carries out layout, utilizes Aggregation view 110b to encapsulate layout result.
The displaying of list is realized, specifically see the description in Fig. 2, Fig. 3 A according to the above-mentioned MVC framework that provides and layout factory.
Shown in Figure 2, the method flow diagram of the list methods of exhibiting provided in one embodiment of the invention is provided.The present embodiment is applied in layout factory shown in MVC framework shown by Figure 1A and Figure 1B with this list methods of exhibiting and illustrates.This list methods of exhibiting can comprise:
201, utilize layout factory to receive the data that will show, data are assigned in corresponding layout calculation unit;
The data of showing are that control data corporation obtains from network storage resource or local storage resources, and are sent in layout factory.
Corresponding, layout factory then receives the data of displaying, and data is assigned in corresponding layout calculation unit.
202, in layout calculation unit, according to data, layout is carried out to each layout areas in layout calculation unit, obtain the layout result of each layout areas;
203, creating unit view, plays up cell view according to layout result and data;
204, the cell view after playing up is shown as the list items of in list.
In sum, the list methods of exhibiting that the embodiment of the present invention provides, by the layout factory arranged, data are classified, layout is carried out by the layout calculation unit corresponding with data, obtain layout result, when these data shown by needs, the cell view of layout result and establishment is utilized to show these data; Due to view layer is divided, layout calculation unit is easy to expansion, and the layout in layout calculation unit is also easily expanded, therefore solve in prior art utilize MVC framework show list time, reckoning without the particular topology of list items, causing the problem that the repeated workload when developing new demand is larger; Reach and be convenient to expansion when developing new demand, save the effect of workload.
Refer to shown in Fig. 3 A, the method flow diagram of the list methods of exhibiting provided in another embodiment of the present invention is provided.The present embodiment is applied in layout factory shown in MVC framework shown by Figure 1A and Figure 1B with this list methods of exhibiting and illustrates.This list methods of exhibiting can comprise:
301, utilize layout factory to receive the data that will show, data are assigned in corresponding layout calculation unit;
The data of showing are that control data corporation obtains from network storage resource or local storage resources, and are sent in layout factory.Here said data one of corresponding in list needs the list items shown, also namely list items is shown according to these data.For example, data can comprise for a microblogging information, one deliver have a talk about comprised information etc.
Generally, before showing some list items in lists, first need to carry out layout to this list items, namely carry out layout according to these data, now then need these data to be assigned in corresponding layout calculation unit.
Layout factory, when data being assigned in corresponding layout calculation unit, first needing the data to receiving to classify, obtaining the type of data, then data be assigned in the layout units corresponding with the type of these data.
In actual applications, show the needs of end according to the list in electronic equipment, may need to set up different lists, the layout of the list items comprised in different lists is also different, and corresponding layout calculation unit also usually can be different.Here said list shows that end can, for being arranged on the client in electronic equipment, also can be the client of webpage version.
For example, microblogging client needs the list shown to comprise many microbloggings, and each microblogging is as the list items of in this list.Because the kind of microblogging is more, such as original microblogging, relay microblogging, Rich Media's microblogging, pure words microblogging, share photograph album microblogging etc., these microbloggings, when by layout, need to be assigned in different layout calculation unit.
302, for each layout areas in layout calculation unit, according to data, basic layout is carried out to layout areas, obtain the basic layout result of this layout areas;
Layout calculation unit can carry out layout according to data, generally, at least one layout areas is provided with in layout calculation unit, layout calculation unit is that the definition of each layout areas has initial phase position and original dimension, each layout areas is used to indicate when these data are demonstrated, and the information in the data corresponding with this layout areas will be shown according to this layout areas.
For example, refer to shown in Fig. 3 B, the schematic diagram of each layout areas in the layout calculation unit provided in section Example of the present invention is provided, wherein, this layout calculation unit corresponds to original microblogging, if when the data corresponding to original microblogging comprise head image information, text message and review information, corresponding, can be provided with head portrait region, text region, comment region in this layout calculation unit, the size in these regions and position are preset by layout calculation unit.Head portrait region is wherein for defining the layout of head image information in microblog data, and text region is for defining the layout of text message in microblog data, and comment region is for defining the layout of review information in microblog data.
In actual applications, byte shared by data is not what be completely fixed, such as original microblogging, text message is no more than 140 characters usually, but the number of characters of text message can for being less than any one of 140 characters, can be such as 80 characters or 101 characters etc., therefore the number of characters of text message still be can not determine, also therefore when the layout calculation unit that the original microblogging of definition is corresponding, the size in the text region corresponding to the text message of original microblogging only can for 140 character setting suitable dimensions when defining, and when the some original microbloggings of actual needs layout, still need the enterprising Row sum-equal matrix of size and position in setting, also the layout of each layout areas is namely recalculated, obtain layout result.
Optionally, for each layout areas in layout calculation unit, layout calculation unit is carrying out basic layout according to data to layout areas, when obtaining basic layout result, refer to shown in Fig. 3 C, it illustrates the process flow diagram when carrying out basic layout according to data to layout areas of layout calculation unit in section Example of the present invention, can comprise:
302a, for each layout areas in layout calculation unit, utilizes this layout areas to identify data segment in data required for layout areas;
302b, utilizes this data segment to calculate the layout parameter of this layout areas;
Optionally, when layout calculation unit is vertical linearity layout, the layout parameter of layout areas at least comprises front one in the region height of layout areas and area coordinate or whole two kinds.When layout calculation unit is vertical linearity layout, each layout areas then vertical linearity layout set in layout calculation unit, at this moment can according to the region height of each layout areas of data point reuse.Optionally, after the height of layout areas is adjusted, cover the subregion of some layout areas possibly, now also need the area coordinate according to circumstances layout regulation region, to ensure when showing these data according to layout result, the position between regional is suitable for.
For example, refer to shown in Fig. 3 D to Fig. 3 F, it illustrates provide in section Example of the present invention to layout areas in layout calculation unit carry out vertical direction adjustment time schematic diagram.Layout areas in layout calculation unit is vertical linearity layout, needs to heighten text region according to calculating, when heightening text region, according to text region and head portrait region and the distance commented between region, can determine at least following three kinds of placement schemes:
Refer to shown in Fig. 3 D, if the text region after heightening and head portrait region and the distance commented between region all suitable, then when adjusting text region, only can adjust the height in text region when keeping the central point d1 coordinate in text region constant.
Referring to shown in Fig. 3 E, if the text region after heightening and the distance between head portrait region are less than distance threshold, then when adjusting text region, when adjusting the height in text region, the central point d1 coordinate in text region can be adjusted to correct position downwards.
Refer to shown in Fig. 3 F, if the text region after heightening and the distance between head portrait region are less than distance threshold, and text region after heightening and the distance between comment region are also less than distance threshold, then the central point d2 coordinate in the central point d1 coordinate in text region and comment region can be adjusted downwards simultaneously, and heighten the height in text region simultaneously.Similar with the layout of the layout and text region of commenting on region for head portrait region, just no longer illustrate here.
Optionally, when layout calculation unit is horizontal linearity layout, the layout parameter of layout areas at least comprises front one in the peak width of layout areas and area coordinate or whole two kinds.When layout calculation unit is horizontal linearity layout, each layout areas then horizontal linearity layout set in layout calculation unit, at this moment can according to the peak width of each layout areas of data point reuse.Optionally, after the width of layout areas is adjusted, cover the subregion of some layout areas possibly, now also need the area coordinate according to circumstances layout regulation region, to ensure when showing these data according to layout result, the position between regional is suitable for.
Again for example, refer to shown in Fig. 3 G to Fig. 3 I, it illustrates provide in section Example of the present invention to layout areas in layout calculation unit carry out horizontal direction adjustment time schematic diagram.Layout areas in this layout calculation unit is horizontal linearity layout, needs to adjust wide text region according to calculating, when adjusting wide text region, according to text region and head portrait region and the distance commented between region, can determine at least following three kinds of placement schemes:
Refer to shown in Fig. 3 G, if adjust wide after text region and head portrait region and the distance commented between region all suitable, then when adjusting text region, only can adjust the width in text region when keeping the central point d1 coordinate in text region constant.
Refer to shown in Fig. 3 H, if adjust wide after text region and head portrait region between distance be less than distance threshold, then when adjusting text region, when adjusting the width in text region, the central point d1 coordinate in text region can be adjusted to correct position to the right.
Refer to shown in Fig. 3 I, if adjust wide after text region and head portrait region between distance be less than distance threshold, and adjust wide after text region and comment region between distance be also less than distance threshold, then the central point d2 coordinate in the central point d1 coordinate in text region and comment region can be adjusted to the right simultaneously, and heighten the width in text region simultaneously.Similar with the layout of the layout and text region of commenting on region for head portrait region, just no longer illustrate here.
302c, is defined as the basic layout result of this layout areas by the layout parameter of this layout areas.
Like this, for the data needing to show, each layout areas in corresponding layout calculation unit all can to there being a basic layout result, such as at least comprise the front one in the region height of this layout areas and area coordinate or whole two kinds, when not showing these data, the layout result of the set of each the basic layout result obtained according to this data layout as these data can be stored.
303, the configuration item corresponding to this layout areas and data, carry out refine layout to this layout areas, obtains refine layout's result of this layout areas;
When layout areas is also provided with configuration item, usually showing can also according to configuration item to the further refine layout of layout areas.This is because when basic layout, only can limit size and the coordinate of each layout areas, if the size of certain layout areas is adjusted when basic layout, then the size of the inner element set in this layout areas and position may also need to do further adjustment.For example, when head portrait region is adjusted, because head portrait region also may comprise head portrait element and the user name element of setting, now, in order to as far as possible attractive in appearance, all right correct pixel element and the further refine layout of user name element, to reach while guarantee is attractive in appearance, save arrangement space further.Again for example, when text region can identification data segment correspond to forward microblogging original text time, microblogging original text due to forwarding is also a complete Wen Bo, now configuration item is then layout factory or layout calculation unit, namely need according to layout factory or layout calculation unit to text Regional Distribution, this process can see the process of recurrence as.
Therefore, need the configuration item corresponding to layout areas and data, carry out refine layout to layout areas, obtain refine layout's result, when specific implementation, the configuration item according to layout areas carries out refine layout, specifically can comprise the steps:
The first, determine the configuration item corresponding with layout areas;
According to Figure 1B, the configuration item that layout areas is corresponding can be leaf elements, layout factory or layout calculation unit.
The second, if configuration item is leaf elements, then corresponding according to leaf elements element interior layout calculates the layout parameter of inner element in layout areas, and the layout parameter of inner element at least comprises size and the relative position of inner element;
When the configuration item of certain layout areas is leaf elements, then mean the inner element including in this layout areas and set relative position, now need the element interior layout of leaf elements to carry out each inner element in this layout areas of refine layout, obtain refine layout's result of this layout areas.
For example, head portrait region can comprise head portrait element and the user name element of setting, now all right correct pixel element and the further refine layout of user name subregion element, obtain refine layout's result, such as layout obtains head portrait element and the phase position of user name element in this layout areas, respective size and respective coordinate.
3rd, the layout parameter of each inner element of layout areas is defined as refine layout's result of this layout areas.
4th, if configuration item is layout calculation unit, then the data segment that this layout areas identifies from data is sent to the layout calculation unit indicated by configuration item, using data segment as the data be dispensed in layout calculation unit, perform for each layout areas in layout calculation unit, according to data, basic layout is carried out to layout areas, obtain the step of basic layout result;
When the configuration item of certain layout areas is layout calculation unit, then the data segment that this layout areas identifies can be sent in the layout calculation unit corresponding with this segment type, and then perform step 302, namely perform recursive procedure.It should be noted that, data be initially assigned to layout calculation unit and configuration item indicated by layout calculation unit can be same layout calculation unit, also can be different layout calculation unit.
For example, when text region can identification data segment correspond to forward microblogging original text time, microblogging original text due to forwarding is also a complete microblogging, now then need layout factory or layout calculation unit to text Regional Distribution, this process is recursive procedure, until obtain the layout result of this layout areas.
5th, if configuration item is layout factory, then the data segment that layout areas identifies from data is sent to the layout factory indicated by configuration item, using data segment as the data that will show, performing utilizes layout factory to receive the data that will show, data is assigned to the step in corresponding layout calculation unit.
When the configuration item of certain layout areas is layout factory, then the data segment that this layout areas identifies can be sent in the layout factory corresponding with this segment type, and then perform step 301, namely perform recursive procedure.It should be noted that, in data, the layout factory indicated by initial input layout factory extremely and configuration item can be same layout factory, also can be different layout factories.
For example, when text region can identification data segment correspond to forward microblogging original text time, microblogging original text due to forwarding is also a complete Wen Bo, and now then need layout factory or layout calculation unit to carry out layout to text region, this process can see the process of recurrence as.
It may be noted that explanation, if when the layout calculation unit of certain layout areas required in recurrence can be multiple, then need the configuration item of this layout areas to be set to layout factory, determine recurrence is to which layout calculation unit by layout factory.Obviously, configuration item is a kind of special case that the situation of layout calculation unit can be regarded as that configuration item is layout factory, i.e. an only corresponding layout calculation unit under the layout factory of recurrence, now then directly can be set as layout calculation unit by configuration item.
304, refine layout's result of this layout areas is added in the basic layout result of this layout areas, the basic layout result being added with refine layout's result is defined as the layout result of this layout areas;
Common, for a layout areas, basic layout result and refine layout's result of this layout areas is obtained through layout, then usual this refine layout's result is added in the basic layout result of same layout areas, the set of the basic layout result after interpolation is defined as the layout result of this layout areas, in this layout calculation unit, the set of the layout result of each layout areas is then the layout result of this layout calculation unit, and preserves this layout result.Obviously, the basic layout result of same layout areas and refine layout's result also in conjunction with storage, and can not carry out separate, stored.
305, creating unit view, plays up cell view according to the layout result of each layout areas and data;
Optionally, List View (TableView) can be utilized to create a cell view, view layer can be played up this cell view according to layout result and data.
306, the cell view after playing up is shown as the list items of in list.
That is, when needing to show the list items corresponding to these data, first need to carry out layout to these data, then creating unit view, and utilize layout result and data to play up this cell view, the cell view after playing up is shown as the list items of in list.
It can thus be appreciated that, when needing the list items showing newtype, only need in layout factory, add the layout calculation unit that corresponds to this newtype list items, then by this layout calculation unit for this newtype carries out correspondence, these data, when receiving the data corresponding with this list items, can be assigned in this layout calculation unit newly increased according to type by such layout factory.Therefore, when expanding list, being more prone to expansion, and avoiding a large amount of duplicated code.
In sum, the list methods of exhibiting that the embodiment of the present invention provides, by the layout factory arranged, data are classified, layout is carried out by the layout calculation unit corresponding with data, obtain layout result, when these data shown by needs, the cell view of layout result and establishment is utilized to show these data; Due to view layer is divided, layout calculation unit is easy to expansion, and the layout in layout calculation unit is also easily expanded, therefore solve in prior art utilize MVC framework show list time, reckoning without the particular topology of list items, causing the problem that the repeated workload when developing new demand is larger; Reach and be convenient to expansion when developing new demand, save the effect of workload.
The list methods of exhibiting that the embodiment of the present invention provides, when carrying out refine layout, if the configuration item of layout areas is leaf elements, then directly carry out refine layout, if the configuration item of layout areas is layout calculation unit or layout factory, then continue recurrence, until get refine layout's result of this layout areas; Thus make, for when being nested with the data of other types data segment, still can determine the final layout result of these data, due to can recurrence recycling layout factory and/or layout calculation unit, therefore avoid code and repeat, decrease workload during exploitation.
Configuration item due to layout areas can be leaf elements, layout calculation unit and layout factory, when configuration item be layout calculation unit and layout factory time, then need to be realized by recurrence, specifically refer to the following description to Fig. 4.
Shown in Figure 4, the method flow diagram of the list methods of exhibiting provided in another embodiment of the present invention is provided.The present embodiment is applied in layout factory shown in MVC framework shown by Figure 1A and Figure 1B with this list methods of exhibiting and illustrates.This list methods of exhibiting can comprise:
401, utilize layout factory to receive the data that will show, data are assigned in corresponding layout calculation unit;
402, for each layout areas in layout calculation unit, according to data, basic layout is carried out to layout areas, obtain the basic layout result of this layout areas;
Step 401, step 402 are identical with the step 301 in Fig. 3 A, step 302 respectively, specifically refer to the description to step 301, step 302, just repeat no more here.
403, determine the configuration item corresponding with layout areas;
According to Figure 1B, the configuration item that layout areas is corresponding can be leaf elements, layout factory or layout calculation unit.
Whether 404, detecting this configuration item is leaf elements;
405, if this configuration item is leaf elements, then corresponding according to leaf elements element interior layout calculates the layout parameter of inner element in layout areas, the layout parameter of each inner element of layout areas is defined as refine layout's result of layout areas;
When the configuration item of certain layout areas is leaf elements, then mean the inner element including in this layout areas and set relative position, now need the element interior layout of leaf elements to carry out each inner element in this layout areas of refine layout, obtain refine layout's result of this layout areas.
For example, head portrait region can comprise head portrait element and the user name element of setting, now all right correct pixel element and the further refine layout of user name subregion element, obtain refine layout's result, such as layout obtains head portrait element and the phase position of user name element in this layout areas, respective size and respective coordinate.
Optionally, the layout parameter of inner element at least comprises the size of inner element.
406, whether if this configuration item is not leaf elements, then detecting this configuration item is layout calculation unit;
407, if this configuration item is layout calculation unit, then the data segment that layout areas identifies from data is sent to the layout calculation unit indicated by configuration item, using data segment as the data be dispensed in layout calculation unit, perform for each layout areas in layout calculation unit, according to data, basic layout is carried out to layout areas, obtain the step of the basic layout result of this layout areas;
When the configuration item of certain layout areas is layout calculation unit, then the data segment that this layout areas identifies can be sent in the layout calculation unit corresponding with this segment type, and then perform step 402, namely perform recursive procedure.It should be noted that, data be initially assigned to layout calculation unit and configuration item indicated by layout calculation unit can be same layout calculation unit, also can be different layout calculation unit.
For example, when text region can identification data segment correspond to forward microblogging original text time, microblogging original text due to forwarding is also a complete Wen Bo, and now then need layout factory or layout calculation unit to text Regional Distribution, this process can see the process of recurrence as.
408, whether if this configuration item is not layout calculation unit, then detecting this configuration item is layout factory;
409, if this configuration item is layout factory, then the data segment that layout areas identifies from data is sent to the layout factory indicated by configuration item, using data segment as the data that will show, performing utilizes layout factory to receive the data that will show, data is assigned to the step in corresponding layout calculation unit;
When the configuration item of certain layout areas is layout factory, then the data segment that this layout areas identifies can be sent in the layout factory corresponding with this segment type, and then perform step 401, namely perform recursive procedure.It should be noted that, in data, the layout factory indicated by initial input layout factory extremely and configuration item can be same layout factory, also can be different layout factories.
For example, when text region can identification data segment correspond to forward microblogging original text time, microblogging original text due to forwarding is also a complete Wen Bo, and now then need layout factory or layout calculation unit to text Regional Distribution, this process can see the process of recurrence as.
It may be noted that explanation, if when the layout calculation unit of certain layout areas required in recurrence can be multiple, then need the configuration item of this layout areas to be set to layout factory, determine recurrence is to which layout calculation unit by layout factory.Obviously, configuration item is a kind of special case that the situation of layout calculation unit can be regarded as that configuration item is layout factory, i.e. an only corresponding layout calculation unit under the layout factory of recurrence, now then directly can be set as layout calculation unit by configuration item.
410, refine layout's result of layout areas is added in the basic layout result of this layout areas, the basic layout result being added with refine layout's result is defined as the layout result of layout areas;
411, creating unit view, plays up cell view according to the layout result of each layout areas and data;
412, the cell view after playing up is shown as the list items of in list.
Step 410 is identical to step 306 with step 304 in Fig. 3 A to step 412, specifically to refer to step 304 to the description of step 306, just repeats no more here.
In sum, the list methods of exhibiting that the embodiment of the present invention provides, by the layout factory arranged, data are classified, layout is carried out by the layout calculation unit corresponding with data, obtain layout result, when these data shown by needs, the cell view of layout result and establishment is utilized to show these data; Due to view layer is divided, layout calculation unit is easy to expansion, and the layout in layout calculation unit is also easily expanded, therefore solve in prior art utilize MVC framework show list time, reckoning without the particular topology of list items, causing the problem that the repeated workload when developing new demand is larger; Reach and be convenient to expansion when developing new demand, save the effect of workload.
The list methods of exhibiting that the embodiment of the present invention provides, when carrying out refine layout, if the configuration item of layout areas is leaf elements, then directly carry out refine layout, if the configuration item of layout areas is layout calculation unit or layout factory, then continue recurrence, until get refine layout's result of this layout areas; Thus make, for when being nested with the data of other types data segment, still can determine the final layout result of these data, due to can recurrence recycling layout factory and/or layout calculation unit, therefore avoid code and repeat, decrease workload during exploitation.
Be below device embodiment of the present invention, for the details of wherein not detailed description, can with reference to the embodiment of the method for above-mentioned correspondence.
Shown in Figure 5, the structural representation of the list exhibiting device provided in one embodiment of the invention is provided.The present embodiment is applied in layout factory shown in MVC framework shown by Figure 1A and Figure 1B with this list exhibiting device and illustrates.This list exhibiting device can comprise: distribution module 502, layout modules 504, creation module 506 and display module 508.
This distribution module 502 may be used for utilizing layout factory to receive the data that will show, data is assigned in corresponding layout calculation unit;
This layout modules 504 may be used in layout calculation unit, carries out layout, obtain the layout result of each layout areas according to data to each layout areas in layout calculation unit;
This creation module 506 may be used for creating unit view, plays up cell view according to layout result and data;
This display module 508 may be used for the cell view after playing up to show as the list items of in list.
In sum, the list exhibiting device that the embodiment of the present invention provides, by the layout factory arranged, data are classified, layout is carried out by the layout calculation unit corresponding with data, obtain layout result, when these data shown by needs, the cell view of layout result and establishment is utilized to show these data; Due to view layer is divided, layout calculation unit is easy to expansion, and the layout in layout calculation unit is also easily expanded, therefore solve in prior art utilize MVC framework show list time, reckoning without the particular topology of list items, causing the problem that the repeated workload when developing new demand is larger; Reach and be convenient to expansion when developing new demand, save the effect of workload.
Shown in Figure 6, the structural representation of the list exhibiting device provided in another embodiment of the present invention is provided.The present embodiment is applied in layout factory shown in MVC framework shown by Figure 1A and Figure 1B with this list exhibiting device and illustrates.This list exhibiting device can comprise: distribution module 602, layout modules 604, creation module 606 and display module 608.
This distribution module 602 may be used for utilizing layout factory to receive the data that will show, data is assigned in corresponding layout calculation unit;
This layout modules 604 may be used in layout calculation unit, carries out layout, obtain the layout result of each layout areas according to data to each layout areas in layout calculation unit;
This creation module 606 may be used for creating unit view, plays up cell view according to layout result and data;
This display module 608 may be used for the cell view after playing up to show as the list items of in list.
In a kind of possible embodiment, layout modules 604 can comprise: basic layout units 604a, refine layout unit 604b and layout determining unit 604c.
This basic layout units 604a may be used for, for each layout areas in layout calculation unit, carrying out basic layout, obtain basic layout result according to data to layout areas;
This refine layout unit 604b may be used for configuration item corresponding to layout areas and data, carries out refine layout, obtain refine layout's result to layout areas;
This layout determining unit 604c may be used for refine layout's result of layout areas to be added in the basic layout result of layout areas, the basic layout result being added with refine layout's result is defined as the layout result of layout areas.
In a kind of possible embodiment, basic layout units 604a can comprise: recognin unit 604a1, the first computation subunit 604a2 and first determine subelement 604a3.
This recognin unit 604a1 may be used for utilizing layout areas to identify data segment in data required for layout areas;
This first computation subunit 604a2 may be used for utilizing data segment to calculate the layout parameter of layout areas;
This first determines that subelement 604a3 may be used for the layout parameter of layout areas to be defined as the basic layout result of layout areas;
Wherein, when layout calculation unit is vertical linearity layout, the layout parameter of layout areas at least comprises front one in the region height of layout areas and area coordinate or whole two kinds; When layout calculation unit is horizontal linearity layout, the layout parameter of layout areas at least comprises front one in the peak width of layout areas and area coordinate or whole two kinds.
In a kind of possible embodiment, refine layout unit 604b can comprise: second determines that subelement 604b1, the second computation subunit 604b2 and the 3rd determine subelement 604b3.
This second determines that subelement 604b1 may be used for determining the configuration item corresponding with layout areas;
This second computation subunit 604b2 may be used for when configuration item is leaf elements, the element interior layout corresponding according to leaf elements calculates the layout parameter of inner element in layout areas, and the layout parameter of inner element at least comprises size and the relative position of inner element;
3rd determines that subelement 604b3 may be used for the layout parameter of each inner element of layout areas to be defined as refine layout's result of layout areas.
In a kind of possible embodiment, refine layout unit 604b can also comprise: first sends subelement 604b4 and second sends subelement 604b5.
This first transmission subelement 604b4 may be used for when configuration item is layout calculation unit, the data segment identified from data by layout areas is sent to the layout calculation unit indicated by configuration item, using data segment as the data be dispensed in layout calculation unit, trigger layout modules 604 in layout calculation unit, according to data, layout is carried out to each layout areas in layout calculation unit, obtain the layout result of each layout areas;
This second transmission subelement 604b5 may be used for when configuration item is layout factory, the data segment identified from data by layout areas is sent to the layout factory indicated by configuration item, using data segment as the data that will show, triggering distribution module 602 utilizes layout factory to receive the data that will show, data is assigned in corresponding layout calculation unit.
In a kind of possible embodiment, distribution module 602 can comprise: taxon 602a and allocation units 602b.
This taxon 602a may be used for utilizing layout factory to classify to data, obtains the type of data;
These allocation units 602b may be used for data being assigned in the layout calculation unit corresponding with the type of data.
In sum, the list exhibiting device that the embodiment of the present invention provides, by the layout factory arranged, data are classified, layout is carried out by the layout calculation unit corresponding with data, obtain layout result, when these data shown by needs, the cell view of layout result and establishment is utilized to show these data; Due to view layer is divided, layout calculation unit is easy to expansion, and the layout in layout calculation unit is also easily expanded, therefore solve in prior art utilize MVC framework show list time, reckoning without the particular topology of list items, causing the problem that the repeated workload when developing new demand is larger; Reach and be convenient to expansion when developing new demand, save the effect of workload.
The list exhibiting device that the embodiment of the present invention provides, when carrying out refine layout, if the configuration item of layout areas is leaf elements, then directly carry out refine layout, if the configuration item of layout areas is layout calculation unit or layout factory, then continue recurrence, until get refine layout's result of this layout areas; Thus make, for when being nested with the data of other types data segment, still can determine the final layout result of these data, due to can recurrence recycling layout factory and/or layout calculation unit, therefore avoid code and repeat, decrease workload during exploitation.
It should be noted that: the list exhibiting device provided in above-described embodiment is when carrying out list and showing, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, the inner structure be about to as the electronic equipment showing end is divided into different functional modules, to complete all or part of function described above.In addition, the list exhibiting device that above-described embodiment provides and list methods of exhibiting embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
Shown in Figure 7, the block diagram of end is shown in the list that it illustrates provides in one embodiment of the invention.The list methods of exhibiting that end 700 provides for implementing above-described embodiment is shown in this list.List in the present invention shows that end 700 can comprise one or more following ingredient: for performing computer program instructions to complete the processor of various flow process and method, for information and stored program instruction random access memory (RAM) and ROM (read-only memory) (ROM), for storing the storer of data and information, I/O equipment, interface, antenna etc.Specifically:
List shows that end 700 can comprise RF (RadioFrequency, radio frequency) parts such as circuit 710, storer 720, input block 730, display unit 740, sensor 750, voicefrequency circuit 760, Wi-Fi (WirelessFidelity, Wireless Fidelity) module 770, processor 780, power supply 782, camera 790.It will be understood by those skilled in the art that the restriction of end structure not structure paired terminal is shown in list shown in Fig. 7, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.
Below in conjunction with Fig. 7, list is shown that each component parts of end 700 carries out concrete introduction:
RF circuit 710 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, process to processor 780; In addition, the up data of design are sent to base station.Usually, RF circuit includes but not limited to antenna, at least one amplifier, transceiver, coupling mechanism, LNA (LowNoiseAmplifier, low noise amplifier), diplexer etc.In addition, RF circuit 710 can also by radio communication and network and other devices communicatings.Radio communication can use arbitrary communication standard or agreement, include but not limited to GSM (GlobalSystemofMobilecommunication, global system for mobile communications), GPRS (GeneralPacketRadioService, general packet radio service), CDMA (CodeDivisionMultipleAccess, CDMA), WCDMA (WidebandCodeDivisionMultipleAccess, Wideband Code Division Multiple Access (WCDMA)), LTE (LongTermEvolution, Long Term Evolution), Email, SMS (ShortMessagingService, Short Message Service) etc.
Storer 720 can be used for storing software program and module, and processor 780 is stored in software program and the module of storer 720 by running, thus performs various functions application and the data processing of list displaying end 700.Storer 720 mainly can comprise storage program district and store data field, and wherein, storage program district can store operating system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of list displaying end 700.In addition, storer 720 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.
Input block 730 can be used for the numeral or the character information that receive input, and with list, generation shows that the user of end 700 is arranged and function controls the input of relevant key signals.Particularly, input block 730 can comprise contact panel 731 and other input equipments 732.Contact panel 731, also referred to as touch-screen, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on contact panel 731 or near contact panel 731 such as finger, stylus) thereon, and drive corresponding coupling arrangement according to the formula preset.Optionally, contact panel 731 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 780, and the order that energy receiving processor 780 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize contact panel 731.Except contact panel 731, input block 730 can also comprise other input equipments 732.Particularly, other input equipments 732 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 740 can be used for the various menus showing information or the information being supplied to user and the list displaying end 700 inputted by user.Display unit 740 can comprise display panel 741, optionally, the form such as LCD (LiquidCrystalDisplay, liquid crystal display), OLED (OrganicLight-EmittingDiode, Organic Light Emitting Diode) can be adopted to configure display panel 741.Further, contact panel 731 can cover display panel 741, when contact panel 731 detects thereon or after neighbouring touch operation, send processor 780 to determine the type of touch event, on display panel 741, provide corresponding vision to export with preprocessor 780 according to the type of touch event.Although in the figure 7, contact panel 731 and display panel 741 be as two independently parts to realize input and the input function that end 700 is shown in list, but in certain embodiments, can by integrated to contact panel 731 and display panel 741 and realize the input and output function that list shows end 700.
List shows that end 700 also can comprise at least one sensor 750, such as gyro sensor, magnetic induction sensor, optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display panel 741, proximity transducer when list shows that end 700 moves in one's ear, can cut out display panel 741 and/or backlight.As the one of motion sensor, acceleration transducer can detect the size of all directions (are generally three axles) acceleration, size and the direction of gravity can be detected time static, can be used for recognized list and show the end application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of attitude, Vibration identification correlation function (such as passometer, knock) etc.; Show end 700 also other sensors such as configurable barometer, hygrometer, thermometer, infrared ray sensor as list, do not repeat them here.
Voicefrequency circuit 760, loudspeaker 761, microphone 762 can provide user and list to show audio interface between end 700.Voicefrequency circuit 760 can by receive voice data conversion after electric signal, be transferred to loudspeaker 761, by loudspeaker 761 be converted to voice signal export; On the other hand, the voice signal of collection is converted to electric signal by microphone 762, voice data is converted to after being received by voicefrequency circuit 760, after again voice data output processor 780 being processed, through RF circuit 710 to send to such as another terminal, or export voice data to storer 720 to process further.
Wi-Fi belongs to short range wireless transmission technology, and list shows that end 700 can help user to send and receive e-mail by Wi-Fi module 770, browse webpage and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 7 shows Wi-Fi module 770, be understandable that, it does not belong to list and shows must forming of end 700, can omit in the scope not changing disclosed essence as required completely.
Processor 780 is control centers that end 700 is shown in list, various interface and the whole list of connection is utilized to show the various piece of end, software program in storer 720 and/or module is stored in by running or performing, and call the data be stored in storer 720, perform various function and process data that end 700 is shown in list, thus list is shown that end carries out integral monitoring.Optionally, processor 780 can comprise one or more processing unit; Preferably, processor 780 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 780.
List shows that end 700 also comprises the power supply 782 (such as battery) of powering to all parts, preferably, power supply can be connected with processor 782 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.
Camera 790 is generally made up of camera lens, imageing sensor, interface, digital signal processor, CPU, display screen etc.Wherein, camera lens is fixed on the top of imageing sensor, manually can change focusing by adjustable lens; Imageing sensor is equivalent to " film " of traditional camera, is the heart of camera collection image; Interface is used for utilizing winding displacement, board to board connector, spring connected mode and list to show camera and holds mainboard to be connected, the image of collection is sent to storer 720; Digital signal processor is processed the image gathered by mathematical operation, the analog image of collection is converted to digital picture and sends to storer 720 by interface.
Although not shown, list shows that end 700 can also comprise bluetooth module etc., does not repeat them here.
List shows that end 700 is except comprising one or more processor 780, also includes storer, and one or more program, and one or more program is stored in storer, and is configured to be performed by one or more processor.One or more program above-mentioned has following function:
Utilize layout factory to receive the data that will show, data are assigned in corresponding layout calculation unit;
In layout calculation unit, according to data, layout is carried out to each layout areas in layout calculation unit, obtain the layout result of each layout areas;
Creating unit view, plays up cell view according to layout result and data;
Cell view after playing up is shown as the list items of in list.
In a kind of possible embodiment, one or more program above-mentioned also has following function:
In layout calculation unit, according to data, layout is carried out to each layout areas in layout calculation unit, obtains the layout result of each layout areas, comprising:
For each layout areas in layout calculation unit, according to data, basic layout is carried out to layout areas, obtain basic layout result;
Configuration item corresponding to layout areas and data, carry out refine layout to layout areas, obtains refine layout's result;
Refine layout's result of layout areas is added in the basic layout result of layout areas, the basic layout result being added with refine layout's result is defined as the layout result of layout areas.
In a kind of possible embodiment, one or more program above-mentioned also has following function:
According to data, basic layout is carried out to layout areas, comprising:
Layout areas is utilized to identify data segment in data required for layout areas;
Data segment is utilized to calculate the layout parameter of layout areas;
The layout parameter of layout areas is defined as the basic layout result of layout areas;
Wherein, when layout calculation unit is vertical linearity layout, the layout parameter of layout areas at least comprises front one in the region height of layout areas and area coordinate or whole two kinds; When layout calculation unit is horizontal linearity layout, the layout parameter of layout areas at least comprises front one in the peak width of layout areas and area coordinate or whole two kinds.
In a kind of possible embodiment, one or more program above-mentioned also has following function:
State the configuration item corresponding to layout areas and data, refine layout carried out to layout areas, obtain refine layout's result, comprising:
Determine the configuration item corresponding with layout areas;
If configuration item is leaf elements, then corresponding according to leaf elements element interior layout calculates the layout parameter of inner element in layout areas, and the layout parameter of inner element at least comprises size and the relative position of inner element;
The layout parameter of each inner element of layout areas is defined as refine layout's result of layout areas.
In a kind of possible embodiment, one or more program above-mentioned also has following function:
After determining the configuration item corresponding with layout areas, also comprise:
If configuration item is layout calculation unit, then the data segment that layout areas identifies from data is sent to the layout calculation unit indicated by configuration item, using data segment as the data be dispensed in layout calculation unit, perform in layout calculation unit, according to data, layout is carried out to each layout areas in layout calculation unit, obtain the step of the layout result of each layout areas;
If configuration item is layout factory, then the data segment that layout areas identifies from data is sent to the layout factory indicated by configuration item, using data segment as the data that will show, performing utilizes layout factory to receive the data that will show, data is assigned to the step in corresponding layout calculation unit.
In a kind of possible embodiment, one or more program above-mentioned also has following function:
Data are assigned in corresponding layout calculation unit, comprise:
Utilize layout factory to classify to data, obtain the type of data;
Data are assigned in the layout calculation unit corresponding with the type of data.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (13)

1. a list methods of exhibiting, is characterized in that, be applied to and include in the model-view-controller framework of layout factory and layout calculation unit, described method comprises:
Utilize described layout factory to receive the data that will show, described data are assigned in corresponding layout calculation unit;
In described layout calculation unit, according to described data, layout is carried out to each layout areas in described layout calculation unit, obtain the layout result of each layout areas;
Creating unit view, plays up described cell view according to described layout result and described data;
Described cell view after playing up is shown as the list items of in list.
2. method according to claim 1, is characterized in that, described in described layout calculation unit, carries out layout, obtain the layout result of each layout areas, comprising according to described data to each layout areas in described layout calculation unit:
For each layout areas in described layout calculation unit, according to described data, basic layout is carried out to described layout areas, obtain the basic layout result of described layout areas;
Configuration item corresponding to described layout areas and described data, carry out refine layout to described layout areas, obtains refine layout's result of described layout areas;
The described refine layout result of described layout areas is added in the described basic layout result of described layout areas, the described basic layout result being added with described refine layout result is defined as the described layout result of described layout areas.
3. method according to claim 2, is characterized in that, describedly carries out basic layout according to described data to described layout areas, obtains the basic layout result of described layout areas, comprising:
Described layout areas is utilized to identify data segment described in described data required for layout areas;
Described data segment is utilized to calculate the layout parameter of described layout areas;
The layout parameter of described layout areas is defined as the basic layout result of described layout areas;
Wherein, when described layout calculation unit is vertical linearity layout, the layout parameter of described layout areas at least comprises front one in the region height of described layout areas and area coordinate or whole two kinds; When described layout calculation unit is horizontal linearity layout, the layout parameter of described layout areas at least comprises front one in the peak width of described layout areas and area coordinate or whole two kinds.
4. method according to claim 2, is characterized in that, described configuration item corresponding to described layout areas and described data, carries out refine layout, obtain refine layout's result of described layout areas, comprising described layout areas:
Determine the configuration item corresponding with described layout areas;
If described configuration item is leaf elements, then corresponding according to described leaf elements element interior layout calculates the layout parameter of inner element in described layout areas, and the layout parameter of described inner element at least comprises size and the relative position of described inner element;
The layout parameter of described each inner element of layout areas is defined as refine layout's result of described layout areas.
5. method according to claim 4, is characterized in that, described determine the configuration item corresponding with described layout areas after, also comprise:
If described configuration item is layout calculation unit, then the data segment that described layout areas identifies from described data is sent to the layout calculation unit indicated by described configuration item, using described data segment as the data be dispensed in described layout calculation unit, perform described in described layout calculation unit, according to described data, layout is carried out to each layout areas in described layout calculation unit, obtain the step of the layout result of each layout areas;
If described configuration item is layout factory, then the data segment that described layout areas identifies from described data is sent to the layout factory indicated by described configuration item, using described data segment as the data that will show, perform and describedly utilize described layout factory to receive the data that will show, described data are assigned to the step in corresponding layout calculation unit.
6. according to described method arbitrary in claim 1 to 5, it is characterized in that, describedly described data to be assigned in corresponding layout calculation unit, comprising:
Utilize described layout factory to classify to described data, obtain the type of described data;
Described data are assigned in the layout calculation unit corresponding with the type of described data.
7. a list exhibiting device, is characterized in that, be applied to and include in the model-view-controller framework of layout factory and layout calculation unit, described device comprises:
Described data, for utilizing described layout factory to receive the data that will show, are assigned in corresponding layout calculation unit by distribution module;
Layout modules, in described layout calculation unit, carries out layout according to described data to each layout areas in described layout calculation unit, obtains the layout result of each layout areas;
Creation module, for creating unit view, plays up described cell view according to described layout result and described data;
Display module, for showing the described cell view after playing up as the list items of in list.
8. device according to claim 7, is characterized in that, described layout modules, comprising:
Basis layout units, for for each layout areas in described layout calculation unit, carries out basic layout according to described data to described layout areas, obtains the basic layout result of described layout areas;
Refine layout's unit, for the configuration item corresponding to described layout areas and described data, carries out refine layout to described layout areas, obtains refine layout's result of described layout areas;
Layout determining unit, for being added in the described basic layout result of described layout areas by the described refine layout result of described layout areas, the described basic layout result being added with described refine layout result is defined as the described layout result of described layout areas.
9. device according to claim 8, is characterized in that, described basic layout units, comprising:
Recognin unit, for the data segment utilizing described layout areas to identify layout areas described in described data;
First computation subunit, for the layout parameter utilizing described data segment to calculate described layout areas;
First determines subelement, for the layout parameter of described layout areas being defined as the basic layout result of described layout areas;
Wherein, when described layout calculation unit is vertical linearity layout, the layout parameter of described layout areas at least comprises front one in the region height of described layout areas and area coordinate or whole two kinds; When described layout calculation unit is horizontal linearity layout, the layout parameter of described layout areas at least comprises front one in the peak width of described layout areas and area coordinate or whole two kinds.
10. device according to claim 8, is characterized in that, described refine layout unit, comprising:
Second determines subelement, for determining the configuration item corresponding with described layout areas;
Second computation subunit, for when described configuration item is leaf elements, the element interior layout corresponding according to described leaf elements calculates the layout parameter of inner element in described layout areas, and the layout parameter of described inner element at least comprises size and the relative position of described inner element;
3rd determines subelement, for the layout parameter of described each inner element of layout areas being defined as refine layout's result of described layout areas.
11. devices according to claim 10, is characterized in that, described refine layout unit, also comprises:
First sends subelement, for when described configuration item is layout calculation unit, the data segment that described layout areas identifies from described data is sent to the layout calculation unit indicated by described configuration item, using described data segment as the data be dispensed in described layout calculation unit, trigger described layout modules in described layout calculation unit, according to described data, layout is carried out to each layout areas in described layout calculation unit, obtain the layout result of each layout areas;
Second sends subelement, for when described configuration item is layout factory, the data segment that described layout areas identifies from described data is sent to the layout factory indicated by described configuration item, using described data segment as the data that will show, triggering described distribution module utilizes described layout factory to receive the data that will show, described data is assigned in corresponding layout calculation unit.
12. according to described device arbitrary in claim 7 to 11, and it is characterized in that, described distribution module, comprising:
Taxon, for utilizing described layout factory to classify to described data, obtains the type of described data;
Allocation units, for being assigned to described data in the layout calculation unit corresponding with the type of described data.
End is shown in 13. 1 kinds of lists, it is characterized in that, described list shows that end comprises:
Touch-screen display, one or more than one processor;
Storer;
And one or more than one program, wherein said more than one or one program is stored in described storer, and be configured to be performed by described more than one or one processor, described more than one or one routine package is containing the instruction for carrying out following operation:
Utilize described layout factory to receive the data that will show, described data are assigned in corresponding layout calculation unit;
In described layout calculation unit, according to described data, layout is carried out to each layout areas in described layout calculation unit, obtain the layout result of each layout areas;
Creating unit view, plays up described cell view according to described layout result and described data;
Described cell view after playing up is shown as the list items of in list.
CN201410397039.1A 2014-08-12 2014-08-12 List display method and device and list display terminal Active CN105373534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410397039.1A CN105373534B (en) 2014-08-12 2014-08-12 List display method and device and list display terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410397039.1A CN105373534B (en) 2014-08-12 2014-08-12 List display method and device and list display terminal

Publications (2)

Publication Number Publication Date
CN105373534A true CN105373534A (en) 2016-03-02
CN105373534B CN105373534B (en) 2020-07-07

Family

ID=55375741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410397039.1A Active CN105373534B (en) 2014-08-12 2014-08-12 List display method and device and list display terminal

Country Status (1)

Country Link
CN (1) CN105373534B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304114A (en) * 2018-01-30 2018-07-20 深圳市富途网络科技有限公司 A kind of customized list interactive system
CN109471689A (en) * 2018-09-30 2019-03-15 广州虎牙信息科技有限公司 Interface display driving method, device, electronic equipment and storage medium
CN109614194A (en) * 2018-12-11 2019-04-12 北京微播视界科技有限公司 Display methods, device, equipment and the storage medium of list interface
CN109614195A (en) * 2018-12-11 2019-04-12 北京微播视界科技有限公司 A kind of preloading method, apparatus, equipment and the storage medium of list items
CN112346813A (en) * 2021-01-08 2021-02-09 北京小米移动软件有限公司 Control method and device of operation list
CN112652383A (en) * 2020-12-23 2021-04-13 武汉联影医疗科技有限公司 Image visualization layout method and device, image analysis system and storage medium
CN113138827A (en) * 2021-04-29 2021-07-20 北京百度网讯科技有限公司 Method, device, electronic equipment and medium for displaying data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716252A (en) * 2004-06-30 2006-01-04 微软公司 Aligned behavior in templated lists
US20100277767A1 (en) * 2009-04-30 2010-11-04 John Henry Klippenstein Profit based layouts
CN102929603A (en) * 2012-09-28 2013-02-13 用友软件股份有限公司 Interface control arrangement device and interface control arrangement method
CN103092583A (en) * 2011-11-01 2013-05-08 腾讯科技(深圳)有限公司 Method and device for dynamically generating setting item list views
CN103677789A (en) * 2012-09-25 2014-03-26 深圳市金正方科技有限公司 Table data displaying method and system based on GRID assembly

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716252A (en) * 2004-06-30 2006-01-04 微软公司 Aligned behavior in templated lists
US20100277767A1 (en) * 2009-04-30 2010-11-04 John Henry Klippenstein Profit based layouts
CN103092583A (en) * 2011-11-01 2013-05-08 腾讯科技(深圳)有限公司 Method and device for dynamically generating setting item list views
CN103677789A (en) * 2012-09-25 2014-03-26 深圳市金正方科技有限公司 Table data displaying method and system based on GRID assembly
CN102929603A (en) * 2012-09-28 2013-02-13 用友软件股份有限公司 Interface control arrangement device and interface control arrangement method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304114A (en) * 2018-01-30 2018-07-20 深圳市富途网络科技有限公司 A kind of customized list interactive system
CN109471689A (en) * 2018-09-30 2019-03-15 广州虎牙信息科技有限公司 Interface display driving method, device, electronic equipment and storage medium
CN109614194A (en) * 2018-12-11 2019-04-12 北京微播视界科技有限公司 Display methods, device, equipment and the storage medium of list interface
CN109614195A (en) * 2018-12-11 2019-04-12 北京微播视界科技有限公司 A kind of preloading method, apparatus, equipment and the storage medium of list items
CN109614194B (en) * 2018-12-11 2020-06-30 北京微播视界科技有限公司 List interface display method, device, equipment and storage medium
CN112652383A (en) * 2020-12-23 2021-04-13 武汉联影医疗科技有限公司 Image visualization layout method and device, image analysis system and storage medium
CN112652383B (en) * 2020-12-23 2022-07-26 武汉联影医疗科技有限公司 Image visualization layout method and device, image analysis system and storage medium
CN112346813A (en) * 2021-01-08 2021-02-09 北京小米移动软件有限公司 Control method and device of operation list
CN112346813B (en) * 2021-01-08 2021-04-13 北京小米移动软件有限公司 Control method and device of operation list
CN113138827A (en) * 2021-04-29 2021-07-20 北京百度网讯科技有限公司 Method, device, electronic equipment and medium for displaying data

Also Published As

Publication number Publication date
CN105373534B (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN105373534A (en) List display method, device and list display terminal
CN105005457A (en) Geographical location display method and apparatus
CN104133624B (en) Web animation display packing, device and terminal
CN105095432A (en) Display method and device for webpage annotations
CN105187930A (en) Video live broadcasting-based interaction method and device
CN103414766A (en) Method, device and terminal equipment for installing application
CN105446726A (en) Method and device for generating webpage
CN105847996A (en) Video playing method and apparatus
CN105094809A (en) Combined picture layout modification method and device and terminal equipment
CN104881844B (en) Picture combination method and device and terminal equipment
CN105022616A (en) Method and device for generating web page
CN103984493A (en) Sliding control method and terminal
CN105224556A (en) Waterfall stream interface display packing and device
CN104021129A (en) Picture group display method and terminal
CN105046059A (en) Game movement trajectory determination method and apparatus
CN105606117A (en) Navigation prompting method and navigation prompting apparatus
CN106411448A (en) Play control method and device, and terminal
CN104252341A (en) Method and device for resurfacing application program and client side device of application program
CN104157007A (en) Video processing method and apparatus
CN105447124A (en) Virtual article sharing method and device
CN104954159A (en) Network information statistics method and device
CN104216645A (en) Input method and device on touch screen terminal and touch screen terminal
CN104899912A (en) Cartoon manufacture method, playback method and equipment
CN104378755A (en) Terminal interaction method and device
CN103491421B (en) Content displaying method, device and intelligent television

Legal Events

Date Code Title Description
C06 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