CN112581589A - View list layout method, device, equipment and storage medium - Google Patents
View list layout method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112581589A CN112581589A CN202011583015.7A CN202011583015A CN112581589A CN 112581589 A CN112581589 A CN 112581589A CN 202011583015 A CN202011583015 A CN 202011583015A CN 112581589 A CN112581589 A CN 112581589A
- Authority
- CN
- China
- Prior art keywords
- size
- displayed
- list
- view area
- typesetting
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 238000004590 computer program Methods 0.000 claims description 6
- 238000004064 recycling Methods 0.000 claims description 3
- 238000009877 rendering Methods 0.000 abstract description 11
- 238000010586 diagram Methods 0.000 description 18
- 230000015654 memory Effects 0.000 description 15
- 230000008569 process Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000011084 recovery Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
Abstract
The embodiment of the application discloses a view list layout method, a device, equipment and a storage medium. The method comprises the following steps: acquiring the size of a list effective view area in a 3D authoring engine; acquiring the size of an object to be displayed and the size of an object interval; determining whether an object to be displayed exists in the object pool; if the object to be displayed exists in the object pool, the objects to be displayed in the object pool are directly typeset in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area, so that the position of the objects to be displayed in the list effective view area is obtained. The method and the device can improve the rendering performance of the streaming list layout, and are simple and convenient to implement, convenient to popularize and wide in application range.
Description
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a view list layout method, device, equipment and storage medium.
Background
In recent years, 3D authoring engines have been widely used and can be used to develop a variety of platform applications or games.
In the prior art, the problem of stagnation of rendering is easily caused in the layout of a streaming list, so that the response time is long, and the requirement of product design cannot be met. Therefore, in order to improve the disadvantages of the prior art, it is necessary to design a view list layout method capable of improving rendering performance.
Disclosure of Invention
The embodiment of the application provides a view list layout method, a view list layout device, view list layout equipment and a storage medium, which can improve the rendering performance of a streaming list layout, and the scheme of the application is simple and convenient to implement, convenient to popularize and wide in application range.
In a first aspect, an embodiment of the present application provides a view list layout method, where the method includes:
acquiring the size of a list effective view area in a 3D authoring engine;
acquiring the size of an object to be displayed and the size of an object interval;
determining whether the object to be displayed exists in an object pool;
if the object to be displayed exists in the object pool, the object to be displayed in the object pool is directly typeset in the list effective view area according to the size of the object to be displayed, the object interval size and the size of the list effective view area, so that the position of the object to be displayed in the list effective view area is obtained.
In a second aspect, an embodiment of the present application provides a view list layout apparatus, including:
the first acquisition module is used for acquiring the size of a list effective view area in the 3D authoring engine;
the second acquisition module is used for acquiring the size of the object to be displayed and the object interval size;
the determining module is used for determining whether the object to be displayed exists in the object pool;
and the display module is used for directly typesetting the objects to be displayed in the object pool in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area if the objects to be displayed exist in the object pool, so as to obtain the positions of the objects to be displayed in the list effective view area.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the view list layout method according to any embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the program, when executed by a processor, can implement the view list layout method according to any embodiment of the present application.
The embodiment of the application provides a view list layout method, a device, equipment and a storage medium, and the method comprises the steps of obtaining the size of a list effective view area in a 3D authoring engine; acquiring the size of an object to be displayed and the size of an object interval; determining whether an object to be displayed exists in the object pool; if the object to be displayed exists in the object pool, the objects to be displayed in the object pool are directly typeset in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area, so that the position of the objects to be displayed in the list effective view area is obtained. By executing the technical scheme, the rendering performance of the streaming list layout can be improved, and the scheme is simple and convenient to implement, convenient to popularize and wide in application range.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1A is a first flowchart of a view list layout method according to an embodiment of the present application;
fig. 1B is a first interface diagram of a view list layout method according to an embodiment of the present application;
fig. 1C is a second interface diagram of a view list layout method according to an embodiment of the present application;
fig. 1D is a third interface schematic diagram of a view list layout method according to an embodiment of the present application;
fig. 2 is a second flowchart of a view list layout method according to a second embodiment of the present application;
fig. 3A is a third flow diagram of a view list layout method according to a third embodiment of the present application;
fig. 3B is a fourth interface schematic diagram of a view list layout method according to the third embodiment of the present application;
fig. 3C is a fifth interface diagram of a view list layout method according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a view list layout apparatus according to a fourth embodiment of the present application;
fig. 5 is a block diagram of an electronic device for implementing a view list layout method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
Fig. 1A is a first flowchart of a view list layout method according to an embodiment of the present application; fig. 1B to fig. 1D are schematic interface diagrams of a view list layout method according to an embodiment of the present application. The embodiment can be applied to the situation of realizing the layout of the objects to be displayed in the 3D authoring engine. The view list layout method provided in this embodiment may be executed by the view list layout apparatus provided in this embodiment, which may be implemented in software and/or hardware and integrated in an electronic device executing this method. In the embodiment of the application, a list layout component supporting streaming layout is installed in the electronic device.
Referring to fig. 1A, the method of the present embodiment includes, but is not limited to, the following steps:
and S110, acquiring the size of the list effective view area in the 3D authoring engine.
The 3D authoring engine is a real-time 3D interactive content authoring and operating platform, and creators including game development, art, architecture, automobile design and movie and television change creativity into reality by means of the 3D authoring engine. The list effective view area refers to an area range in which an object to be presented is displayed in an interface of the 3D authoring engine.
In the embodiment of the present application, when displaying an object to be displayed in the list effective view area, the size of the list effective view area needs to be obtained first. Optionally, the manner of obtaining the size of the effective view area of the list may be to call an external application interface to obtain the size, or may be to obtain the size in another manner, which is not specifically limited herein. As shown in fig. 1B, the interface is a schematic diagram of the size of the list active view area.
And S120, acquiring the size of the object to be displayed and the object interval size.
The object to be displayed refers to content that needs to be displayed in the list effective view area, and may be a picture, a text, or other types of data blocks. The object spacing size refers to the spacing size between every two objects to be displayed.
In the embodiment of the application, when the user displays the object to be shown in the list effective view area by using the list layout component, the object to be shown is input to the list layout component. At this point, the list layout component can obtain the size of the object to be presented. The object granularity is not specifically limited in the embodiment of the application, and the object granularity can be set by a user when the user uses the list layout component or can be set when the list layout component is developed. It should be noted that, when the value of the object space size is successfully set, the object space sizes between all the objects to be displayed are the set value. However, if the value of the object space size needs to be changed, the value of the object space size needs to be reset.
S130, determining whether an object to be displayed exists in the object pool;
in the embodiment of the application, an object pool is created in the list layout component for storing the objects to be displayed. When the user displays the object to be displayed in the list effective view area by using the list layout component, whether the object to be displayed exists in the object pool or not is accessed firstly. If the object to be displayed exists in the object pool, S140 is executed.
And S140, if the object to be displayed exists in the object pool, directly typesetting the object to be displayed in the list effective view area according to the size of the object to be displayed, the object interval size and the size of the list effective view area so as to obtain the position of the object to be displayed in the list effective view area.
In the embodiment of the application, it is determined whether the object to be displayed exists in the object pool through S130, and if the object to be displayed is stored in the object pool, the object to be displayed is obtained from the object pool.
In the embodiment of the application, through the above steps, the size of the list effective view area, the size of the object to be displayed, and the object interval size can be obtained. And if the object to be displayed exists in the object pool, displaying the object to be displayed in the list effective view area according to the size of the object to be displayed, the object interval size and the size of the list effective view area.
Optionally, if the object to be displayed does not exist in the object pool, the object to be displayed is loaded and instantiated, and the objects to be displayed in the object pool are laid out in the list effective view area according to the size of the object to be displayed, the object interval size and the size of the list effective view area.
In the embodiment of the application, if the object to be displayed is not stored in the object pool, the object to be displayed is loaded and instantiated. After the objects to be displayed are loaded and instantiated, the objects to be displayed are laid out in the effective view area of the list in the same manner as the layout manner of the S140. The method for loading and instantiating the object to be displayed is not particularly limited in the embodiment of the application, and the method can be used for obtaining the object to be displayed from a database, downloading the object to be displayed from a network or calling the object to be displayed uploaded by a user.
Optionally, when the list effective view area displays an object to be displayed (i.e. a typeset object), the list layout component will backup the typeset object in the object pool. Illustratively, when the user needs to display the object a to be displayed in the list effective view area, the list layout component first accesses the object pool to determine whether the object a to be displayed exists in the object pool. If the object a to be displayed exists in the object pool, the object a to be displayed in the object pool is typeset in the list effective view area; and if the object a to be displayed does not exist in the object pool, loading and instantiating the object a to be displayed, and typesetting the object a to be displayed in the list effective view area.
Optionally, the object to be displayed stored in the object pool may be time-efficient, and if the object to be displayed stored in the object pool exceeds the preset time, the object pool may release the object to be displayed, so as to save the storage space of the object pool.
According to the technical scheme provided by the embodiment, the size of the list effective view area in the 3D authoring engine is obtained; acquiring the size of an object to be displayed and the size of an object interval; determining whether an object to be displayed exists in the object pool; if the object to be displayed exists in the object pool, the objects to be displayed in the object pool are directly typeset in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area, so that the position of the objects to be displayed in the list effective view area is obtained. The method comprises the steps of composing the objects to be displayed by designing a list layout component, and firstly, accessing whether the objects to be displayed exist in an object pool or not. If the object exists, the object to be displayed is obtained from the object pool, the time for instantiation loading is saved, and the problem of rendering pause caused by long response time can be solved. The method and the device can improve the rendering performance of the streaming list layout, and are simple and convenient to implement, convenient to popularize and wide in application range.
Example two
Fig. 2 is a second flowchart of a view list layout method according to a second embodiment of the present application. The embodiment of the application is optimized on the basis of the embodiment, and specifically optimized as follows: a detailed explanation of the process of line-changing display of the object to be displayed is added.
Referring to fig. 2, the method of the present embodiment includes, but is not limited to, the following steps:
s210, acquiring the size of a list effective view area in the 3D authoring engine.
And S220, acquiring the size of the object to be displayed and the object interval size configured by the user.
In the embodiment of the application, when the list layout component is used for displaying the objects to be displayed in the list effective view area, a user can configure the size and the object interval size of the objects to be displayed according to actual requirements, so that the layout of the objects to be displayed in the list effective view area can be customized. The list layout component is used for typesetting the objects to be displayed by acquiring the size of the objects to be displayed and the object space size configured by the user and according to the size of the objects to be displayed, the object space size and the size of the list effective view area.
S230, determining whether the object to be displayed exists in the object pool, and if so, acquiring the object to be displayed from the object pool; and if not, loading and instantiating the object to be displayed.
S240, determining the typesetting size needed by the object to be displayed according to the size of the object to be displayed and the object interval size.
In the embodiment of the application, before typesetting the objects to be displayed, the typesetting size required by the objects to be displayed needs to be determined according to the size of the objects to be displayed, the object interval size and the size of the list effective view area. Specifically, firstly, according to the size of the object to be displayed and the object interval size, the position coordinates of the object to be displayed in the list effective view area are determined and recorded. And then, determining the typesetting size needed by the object to be displayed according to the position coordinate of the object to be displayed in the list effective view area.
S250, determining the current typesetting line and the typesetting size in the current typesetting line according to the size of the list effective view area and the typesetting object information in the list effective view area.
In the embodiment of the application, the current typesetting line is determined according to the size of the list effective view area and the position information of the typesetted object in the list effective view area. And determining the typesetable size in the current typesetting line according to the size of the typesetted objects, the object interval size and the size of the list effective view area. The specific process of determining the typesetable size in the current typesetting line can be as follows: and accumulating the size of the typeset object and the object interval size to obtain an accumulated numerical value. And subtracting the accumulated value from the size of the effective view area of the list, and taking the subtraction result as the typesetable size in the current typesetting line.
S260, if the typesetting size in the current typesetting line is smaller than the typesetting size needed by the object to be displayed, executing line feed operation, and typesetting the object to be displayed in a new line.
In the embodiment of the application, if the typesetting size in the current typesetting line is smaller than the typesetting size required by the object to be displayed, the object to be displayed is displayed in the next line. And (4) performing accumulation calculation again according to the method for determining the typesetting size, and so on until all the objects to be displayed are traversed. As shown in fig. 1C, the interface diagram is an interface diagram for displaying all the objects to be displayed in the list effective view area. And if the number of the objects to be displayed is larger than the number of the objects which can be displayed in the effective view area of the list, terminating the operation of displaying the objects to be displayed. That is, as shown in fig. 1D, the number of the objects to be displayed exceeds the display range of the list effective view area.
S270, determining a typesetting mode, and if the typesetting mode is a left alignment mode, executing S280; if the right alignment mode is selected, S290 is executed.
In the embodiment of the present application, before typesetting the object to be displayed in the new row, the typesetting mode needs to be determined. If the left alignment mode is selected, go to step S280; if the right alignment mode is selected, S290 is executed.
Optionally, the typesetting mode only needs to be determined when typesetting in the first row, and after the typesetting mode is determined, when performing the line feed operation subsequently, the objects to be displayed are typeset in the new row according to the typesetting mode in the first row.
And S280, taking the first pixel position of the new row as the initial typesetting position of the object to be displayed under the condition that the typesetting mode is the left alignment mode.
In the embodiment of the present application, since each line of the list effective view area is laid out for the object to be laid out in the order from left to right, the first pixel position of the new line is used as the initial layout position of the object to be displayed. All the objects to be displayed are traversed according to the mode, and the layout of the finally obtained view list is in left alignment.
S290, determining the size to be typeset in the new row under the condition that the typesetting mode is a right alignment mode; and determining the initial typesetting position of the first object to be displayed in the new row according to the difference between the total size of the new row and the size to be typeset.
And the size to be typeset is the sum of the sizes of at least two objects to be displayed to be typeset plus the size of the object interval.
In this embodiment of the present application, when the layout mode is right alignment, the specific process of determining the initial layout position of the first object to be displayed in the new row may be: firstly, accumulating the size of the object to be displayed and the object interval size in the new row to obtain an accumulated numerical value, and taking the numerical value as the size to be typeset. And then, subtracting the size to be typeset from the total size of the new line, and taking the obtained numerical value as the initial typesetting position of the first object to be displayed in the new line. Where the total size of the new row is also the size of the list active view area.
For example, assume that the total size of the new row is 10 pixels, the sizes of two objects to be displayed in the new row to be laid out are 3 pixels and 4 pixels, respectively, and the object space size is 1 pixel. Therefore, the size to be laid out in the new row is 8 pixels. The difference between the total size of the new row and the size to be laid out is 2 pixels, so 2 pixels are left in the new row first, and then the first object to be displayed is laid out.
According to the technical scheme provided by the embodiment, the size of the list effective view area in the 3D authoring engine is obtained; acquiring the size of an object to be displayed and the object interval size configured by a user; determining whether an object to be displayed exists in the object pool, and if so, acquiring the object to be displayed from the object pool; if not, loading and instantiating the object to be displayed; determining the typesetting size needed by the object to be displayed according to the size of the object to be displayed and the object interval size; determining a current typesetting line and a typesetting size in the current typesetting line according to the size of the list effective view area and the typesetting object information in the list effective view area; if the typesetting size in the current typesetting line is smaller than the typesetting size required by the object to be displayed, executing line feed operation, and typesetting the object to be displayed in a new line; determining a typesetting mode, and taking the first pixel position of the new line as the initial typesetting position of the object to be displayed under the condition that the typesetting mode is a left alignment mode; determining the size to be typeset in the new row under the condition that the typesetting mode is a right alignment mode; and determining the initial typesetting position of the first object to be displayed in the new row according to the difference between the total size of the new row and the size to be typeset. According to the method and the device, left alignment or right alignment of the layout of the view list can be achieved by determining the typesetting mode. The implementation of the scheme of the application can meet the requirement of the user on the personalized layout of the object to be displayed, and the scheme of the application is simple and convenient to implement, convenient to popularize and wide in application range.
EXAMPLE III
Fig. 3A is a third flow diagram of a view list layout method according to a third embodiment of the present application; fig. 3B-3C are schematic interface diagrams of a view list layout method according to a third embodiment of the present application. The embodiment of the application is optimized on the basis of the embodiment, and specifically optimized as follows: a detailed explanation is added to the recovery process of the object to be displayed; optionally, the display process of the object to be displayed is explained in detail in the case of resolution update.
Referring to fig. 3A, the method of the present embodiment includes, but is not limited to, the following steps:
s310, acquiring the size of the list effective view area in the 3D authoring engine.
And S320, acquiring the size of the object to be displayed and the object interval size.
S330, determining whether the object to be displayed exists in the object pool.
S340, if the object to be displayed exists in the object pool, the object to be displayed in the object pool is directly typeset in the list effective view area according to the size of the object to be displayed, the object interval size and the size of the list effective view area, so that the position of the object to be displayed in the list effective view area is obtained.
And S350, responding to the sliding operation on the list effective view area, and if any object is hidden, recycling the object into the object pool.
In the embodiment of the present application, when the user displays the object to be displayed in the list active view area using the list layout component, the list layout component creates an object pool. The object pool is used for storing objects to be displayed. The number of objects that can be displayed in the list active view area is limited. When the user slides the physical device (such as a mouse or a display screen) to browse the typeset objects in the effective view area of the list. The list layout component responds to a user's swipe operation of the list active view area. When one typeset object is outside the effective view area, the typeset object can be hidden. At this point, the list layout component does not release it, but rather recycles it to the object pool. When the object to be displayed needs to be displayed, the object to be displayed is acquired from the object pool and then displayed in the effective view area. The advantage of this arrangement is that cyclic reuse of object resources can be achieved.
Optionally, after obtaining the position of the object to be displayed in the list effective view area, the method further includes: updating the size of the list effective view area under the condition of detecting the resolution update of the list effective view area; and rearranging the objects in the list effective view area according to the updated size of the list effective view area.
In the embodiment of the application, the objects to be displayed are typeset according to the size of the objects to be displayed, the object interval size and the size of the list effective view area, so that the positions of the objects to be displayed in the list effective view area are obtained. If the list layout component detects that the resolution of the list effective view area is changed, the size of the list effective view area is updated firstly; and typesetting the objects to be displayed again according to the size of the objects to be displayed, the object interval size and the updated size of the list effective view area so as to obtain the positions of the objects to be displayed in the list effective view area. Fig. 3B is a schematic interface diagram of the object to be displayed at the first resolution. Fig. 3C is a schematic interface diagram of the object to be displayed at the second resolution.
According to the technical scheme provided by the embodiment, the size of the list effective view area in the 3D authoring engine is obtained; acquiring the size of an object to be displayed and the size of an object interval; determining whether an object to be displayed exists in the object pool; if the object to be displayed exists in the object pool, the objects to be displayed in the object pool are directly typeset in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area so as to obtain the position of the objects to be displayed in the list effective view area; and responding to the sliding operation of the list effective view area, and if any object is hidden, recycling the object into the object pool. According to the method and the device, the object pool is established in the list layout assembly, the typesetted objects are recycled, the time for displaying the objects to be displayed is saved, and the problem of pause in rendering caused by overtime of the objects to be displayed in the prior art can be solved. By executing the scheme of the application, the cyclic reuse of the object resources can be realized.
Example four
Fig. 4 is a schematic structural diagram of a view list layout apparatus according to an embodiment of the present application, and as shown in fig. 3, the apparatus 400 may include:
a first obtaining module 410, configured to obtain a size of a list active view area in the 3D authoring engine.
The second obtaining module 420 is configured to obtain a size of an object to be displayed and an object space size.
A determining module 430, configured to determine whether the object to be displayed exists in the object pool.
A displaying module 440, configured to, if it is determined that the object to be displayed exists in the object pool, lay out the object to be displayed in the object pool in the list effective view area according to the size of the object to be displayed, the object interval size, and the size of the list effective view area, so as to obtain the position of the object to be displayed in the list effective view area.
Optionally, if the object to be displayed does not exist in the object pool, the object to be displayed is loaded and instantiated, and the object to be displayed in the object pool is laid out in the list effective view area according to the size of the object to be displayed, the object interval size and the size of the list effective view area.
Further, the display module 440 may be specifically configured to: determining the typesetting size needed by the object to be displayed according to the size of the object to be displayed and the object interval size; determining a current typesetting line and the typesetting size in the current typesetting line according to the size of the list effective view area and the typesetting object information in the list effective view area; and if the typesetting size in the current typesetting line is smaller than the typesetting size required by the object to be displayed, executing line feed operation, and typesetting the object to be displayed in a new line.
Further, the view list layout apparatus may further include: an alignment module;
the alignment module is used for taking the first pixel position of the new row as the initial typesetting position of the object to be displayed under the condition that the typesetting mode is a left alignment mode; determining the size to be typeset in the new row under the condition that the typesetting mode is a right alignment mode; determining the initial typesetting position of the first object to be displayed in the new row according to the difference between the total size of the new row and the size to be typeset; and the size to be typeset is the sum of the sizes of at least two objects to be displayed to be typeset plus the size of the object interval.
Further, the view list layout apparatus may further include: a recovery module;
and the recovery module is used for responding to the sliding operation of the list effective view area, and recovering any object into the object pool if the object is hidden.
Further, the second obtaining module 420 may be specifically configured to: and acquiring the size of the object to be displayed and the object interval size configured by the user.
Further, the view list layout apparatus may further include: an update module;
the updating module is used for updating the size of the list effective view area under the condition of detecting the resolution updating of the list effective view area; and rearranging the objects in the list effective view area according to the updated size of the list effective view area.
The view list layout apparatus provided in this embodiment is applicable to the view list layout method provided in any of the above embodiments. The method and the device can improve the rendering performance of the streaming list layout, and are simple and convenient to implement, convenient to popularize and wide in application range.
EXAMPLE five
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 5 is a block diagram of an electronic device according to a view list layout method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. In the embodiment of the application, a list layout component supporting streaming layout is installed in the electronic device. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 5, the electronic apparatus includes: one or more processors 510, memory 520, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 5, one processor 510 is taken as an example.
The memory 520, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the first obtaining module 410, the second obtaining module 420, the determining module 430, and the presentation module 440 shown in fig. 4) corresponding to the view list layout method in the embodiment of the present application. The processor 510 executes various functional applications of the server and data processing by executing non-transitory software programs, instructions, and modules stored in the memory 520, that is, implements the view list layout method in the above-described method embodiments.
The memory 520 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device of the view list layout, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 520 may optionally include memory remotely located from the processor 510, which may be connected to the view list layout electronics over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the view list layout method may further include: an input device 530 and an output device 540. The processor 510, the memory 520, the input device 530, and the output device 540 may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
The input device 530 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus of the view list layout, such as an input device of a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, etc. The output device 540 may include a display device, an auxiliary lighting device (e.g., an LED), a haptic feedback device (e.g., a vibration motor), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
According to the technical scheme of the embodiment of the application, the size of the list effective view area in the 3D authoring engine is obtained; acquiring the size of an object to be displayed and the size of an object interval; determining whether an object to be displayed exists in the object pool; if the object to be displayed exists in the object pool, the objects to be displayed in the object pool are directly typeset in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area, so that the position of the objects to be displayed in the list effective view area is obtained. The method comprises the steps of composing the objects to be displayed by designing a list layout component, and firstly, accessing whether the objects to be displayed exist in an object pool or not. If the object exists, the object to be displayed is obtained from the object pool, the time for instantiation loading is saved, and the problem of rendering pause caused by long response time can be solved. The method and the device can improve the rendering performance of the streaming list layout, and are simple and convenient to implement, convenient to popularize and wide in application range.
It should be noted that, in the embodiment of the view list layout apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present invention is not limited herein.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A method for view list layout, the method comprising:
acquiring the size of a list effective view area in a 3D authoring engine;
acquiring the size of an object to be displayed and the size of an object interval;
determining whether the object to be displayed exists in an object pool;
if the object to be displayed exists in the object pool, the objects to be displayed in the object pool are directly laid in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area.
2. The view list layout method according to claim 1, wherein if the object to be displayed does not exist in the object pool, the object to be displayed is loaded and instantiated, and the objects to be displayed in the object pool are laid out in the list effective view area according to the size of the object to be displayed, the object space size, and the size of the list effective view area.
3. The method according to claim 1 or 2, wherein the laying out the objects to be displayed in the object pool in the list effective view area according to the size of the objects to be displayed, the object space size, and the size of the list effective view area comprises:
determining the typesetting size needed by the object to be displayed according to the size of the object to be displayed and the object interval size;
determining a current typesetting line and the typesetting size in the current typesetting line according to the size of the list effective view area and the typesetting object information in the list effective view area;
and if the typesetting size in the current typesetting line is smaller than the typesetting size required by the object to be displayed, executing line feed operation, and typesetting the object to be displayed in a new line.
4. The method of claim 3, wherein the laying out the objects to be displayed in a new row comprises:
taking the first pixel position of the new row as the initial typesetting position of the object to be displayed under the condition that the typesetting mode is a left alignment mode;
determining the size to be typeset in the new row under the condition that the typesetting mode is a right alignment mode; determining the initial typesetting position of the first object to be displayed in the new row according to the difference between the total size of the new row and the size to be typeset; and the size to be typeset is the sum of the sizes of at least two objects to be displayed to be typeset plus the size of the object interval.
5. The view list layout method according to claim 1, further comprising:
and responding to the sliding operation of the list effective view area, and if any object is hidden, recycling the object into the object pool.
6. The method according to claim 1, wherein the obtaining of the size of the object to be displayed and the size of the object space comprises:
and acquiring the size of the object to be displayed and the object interval size configured by the user.
7. The method of claim 1, further comprising, after obtaining the position of the object to be displayed in the effective view area of the list:
updating the size of the list active view area in case of detecting a resolution update of the list active view area;
and rearranging the objects in the list effective view area according to the updated size of the list effective view area.
8. A view list layout apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring the size of a list effective view area in the 3D authoring engine;
the second acquisition module is used for acquiring the size of the object to be displayed and the object interval size;
the determining module is used for determining whether the object to be displayed exists in the object pool;
and the display module is used for directly typesetting the objects to be displayed in the object pool in the list effective view area according to the size of the objects to be displayed, the object interval size and the size of the list effective view area if the objects to be displayed exist in the object pool, so as to obtain the positions of the objects to be displayed in the list effective view area.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the view list layout method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the view list layout method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583015.7A CN112581589A (en) | 2020-12-28 | 2020-12-28 | View list layout method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583015.7A CN112581589A (en) | 2020-12-28 | 2020-12-28 | View list layout method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112581589A true CN112581589A (en) | 2021-03-30 |
Family
ID=75140421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011583015.7A Pending CN112581589A (en) | 2020-12-28 | 2020-12-28 | View list layout method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112581589A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114564272A (en) * | 2022-03-03 | 2022-05-31 | 阿波罗智联(北京)科技有限公司 | Method for determining view grouping information, method and device for displaying page |
CN114675920A (en) * | 2022-03-25 | 2022-06-28 | 北京字跳网络技术有限公司 | Layout object control method and device, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281359A (en) * | 2014-04-29 | 2015-01-14 | 福建星网视易信息系统有限公司 | Layout method and layout device for objects with different sizes |
CN108334251A (en) * | 2017-01-19 | 2018-07-27 | 阿里巴巴集团控股有限公司 | A kind of method and device of view multiplexing |
CN109375972A (en) * | 2018-09-17 | 2019-02-22 | 广州视源电子科技股份有限公司 | Method, apparatus, computer equipment and the storage medium of multielement layout |
CN111273968A (en) * | 2020-01-17 | 2020-06-12 | 上海米哈游天命科技有限公司 | Object calling method, device, equipment and medium |
CN111367990A (en) * | 2018-12-25 | 2020-07-03 | 飞狐信息技术(天津)有限公司 | List display method and device |
CN111754407A (en) * | 2020-06-27 | 2020-10-09 | 北京百度网讯科技有限公司 | Layout method, device and equipment for image display and storage medium |
-
2020
- 2020-12-28 CN CN202011583015.7A patent/CN112581589A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281359A (en) * | 2014-04-29 | 2015-01-14 | 福建星网视易信息系统有限公司 | Layout method and layout device for objects with different sizes |
CN108334251A (en) * | 2017-01-19 | 2018-07-27 | 阿里巴巴集团控股有限公司 | A kind of method and device of view multiplexing |
CN109375972A (en) * | 2018-09-17 | 2019-02-22 | 广州视源电子科技股份有限公司 | Method, apparatus, computer equipment and the storage medium of multielement layout |
CN111367990A (en) * | 2018-12-25 | 2020-07-03 | 飞狐信息技术(天津)有限公司 | List display method and device |
CN111273968A (en) * | 2020-01-17 | 2020-06-12 | 上海米哈游天命科技有限公司 | Object calling method, device, equipment and medium |
CN111754407A (en) * | 2020-06-27 | 2020-10-09 | 北京百度网讯科技有限公司 | Layout method, device and equipment for image display and storage medium |
Non-Patent Citations (1)
Title |
---|
FENG: "Unity UGUI 原理篇(五):Auto Layout 自动布局", pages 1 - 13, Retrieved from the Internet <URL:https://gwb.tencent.com/community/detail/117690> * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114564272A (en) * | 2022-03-03 | 2022-05-31 | 阿波罗智联(北京)科技有限公司 | Method for determining view grouping information, method and device for displaying page |
CN114675920A (en) * | 2022-03-25 | 2022-06-28 | 北京字跳网络技术有限公司 | Layout object control method and device, electronic equipment and storage medium |
CN114675920B (en) * | 2022-03-25 | 2024-02-02 | 北京字跳网络技术有限公司 | Control method and device for layout objects, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11175823B2 (en) | Method and apparatus for controlling terminal device using gesture control function, and non-transitory computer-readable storage medium | |
CN109388317B (en) | Picture loading method, terminal device and storage medium | |
CN110636366A (en) | Video playing processing method and device, electronic equipment and medium | |
CN110992112B (en) | Advertisement information processing method and device | |
CN112581589A (en) | View list layout method, device, equipment and storage medium | |
CN112037332B (en) | Display verification method and device for browser, computer equipment and storage medium | |
CN110471700B (en) | Graphic processing method, apparatus, storage medium and electronic device | |
CN111580912A (en) | Display method and storage medium for multi-level structure resource group | |
CN111770384A (en) | Video switching method and device, electronic equipment and storage medium | |
CN112634401B (en) | Plane track drawing method, device, equipment and storage medium | |
EP3872704A2 (en) | Header model for instance segmentation, instance segmentation model, image segmentation method and apparatus | |
CN112416201B (en) | Application cache cleaning method and device, electronic equipment and medium | |
CN111857902A (en) | Application display method, device, equipment and readable storage medium | |
CN111984857B (en) | Information pushing method and device, electronic equipment and storage medium | |
CN111985760B (en) | Data content evaluation method and device, electronic equipment and storage medium | |
CN114416264A (en) | Message display method and device | |
CN112445983B (en) | Method, device and equipment for processing search results and computer readable storage medium | |
CN114237795A (en) | Terminal interface display method and device, electronic equipment and readable storage medium | |
CN113158098A (en) | Page generation method, device, equipment and medium | |
CN111767490B (en) | Method, apparatus, device and storage medium for displaying image | |
CN111562962B (en) | Picture rendering method and device, electronic equipment and storage medium | |
CN112419145B (en) | Image data processing method, device, equipment and storage medium | |
CN114546199B (en) | Image processing method, device, electronic equipment and storage medium | |
CN111797933B (en) | Template matching method, device, electronic equipment and storage medium | |
CN113744414B (en) | Image processing method, device, equipment and storage medium |
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 |