[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113946331A - View layout method, device, equipment and medium - Google Patents

View layout method, device, equipment and medium Download PDF

Info

Publication number
CN113946331A
CN113946331A CN202010692970.8A CN202010692970A CN113946331A CN 113946331 A CN113946331 A CN 113946331A CN 202010692970 A CN202010692970 A CN 202010692970A CN 113946331 A CN113946331 A CN 113946331A
Authority
CN
China
Prior art keywords
layout
sub
views
container
view
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010692970.8A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010692970.8A priority Critical patent/CN113946331A/en
Publication of CN113946331A publication Critical patent/CN113946331A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the disclosure discloses a view layout method, a device, equipment and a medium. One embodiment of the view layout method includes: calling a preset layout function in response to the at least two sub-views added to the layout container being obtained; and executing the operation indicated by the layout function on at least two sub-views, wherein the operation comprises the following steps: obtaining layout rule parameters, and laying out at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; and presenting at least two sub-views after the layout is finished. The embodiment can simplify the view layout process and improve the development efficiency of developers.

Description

View layout method, device, equipment and medium
Technical Field
The embodiment of the disclosure relates to the technical field of software, in particular to a view layout method, device, equipment and medium.
Background
Currently, iOS (iPhone Operating System) provides two layout schemes: manually calculating the frame layout in layout reviews based on the absolute coordinates; constraint descriptions are provided, based on constraints, laid out by autolayout. Both layout schemes have advantages and disadvantages, and since the respective mechanisms are not orthogonal and may cause some unexpected troubles when used at the same time, in practice, manual layout schemes based on absolute coordinates are generally selected in combination with performance requirements, but such schemes are difficult to intuitively and efficiently express when involving pages with complex layout.
Disclosure of Invention
The present disclosure provides a view layout method, apparatus, device, and medium.
In a first aspect, an embodiment of the present disclosure provides a view layout method, including: calling a preset layout function in response to the at least two sub-views added to the layout container being obtained; performing the operation indicated by the layout function on at least two sub-views, including: obtaining layout rule parameters, and laying out at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; and presenting at least two sub-views after the layout is finished.
In some embodiments, laying out the at least two sub-views based on the layout rule parameters comprises: and laying out the at least two sub-views according to the layout rule parameters and the sub-view adding instructions in the layout function, wherein the number of the sub-view adding instructions is the same as that of the at least two sub-views, and the order of the sub-view adding instructions is used for indicating the adding order of the at least two sub-views.
In some embodiments, the layout rule parameters further include parameters indicated by at least one of: alignment, whether to change rows, row spacing, and layout container size.
In some embodiments, the layout container size is determined according to the content size of all the child views added thereto.
In some embodiments, the layout container is a landscape layout container.
In a second aspect, an embodiment of the present disclosure provides a view layout apparatus, including: the calling module is configured to respond to the at least two sub-views added to the layout container, and call a preset layout function; an execution module configured to execute the operation indicated by the layout function on the at least two sub-views, including: obtaining layout rule parameters, and laying out the at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; a rendering module configured to render the at least two sub-views after the layout is completed.
In some embodiments, the execution module is further configured to lay out the at least two sub-views according to the layout rule parameter and a sub-view adding instruction in the layout function, where the number of the sub-view adding instruction is the same as the number of the at least two sub-views, and an order of the sub-view adding instruction is used to indicate an adding order of the at least two sub-views.
In some embodiments, the layout rule parameters further include parameters indicated by at least one of: alignment, whether to change rows, row spacing, and layout container size.
In some embodiments, the layout container size is determined according to the content size of all the child views added thereto.
In some embodiments, the layout container is a landscape layout container.
In a third aspect, an embodiment of the present disclosure provides a view layout electronic device, including: one or more processors; a storage device, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement the method according to any one of the embodiments of the view layout method described above.
In a fourth aspect, embodiments of the present disclosure provide a view layout computer readable medium, on which a computer program is stored, which when executed by a processor, implements a method as in any one of the above-described view layout methods.
The view layout method, device, equipment and medium provided by the embodiment of the disclosure call a preset layout function by responding to at least two obtained sub-views added to a layout container; performing the operation indicated by the layout function on at least two sub-views, including: obtaining layout rule parameters, and laying out at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; and at least two sub-views after layout is finished are presented, so that the view layout process is simplified, and the development efficiency of developers is improved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram for one embodiment of a view layout method according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a view layout method according to the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a view layout method according to the present disclosure;
FIG. 5 is a schematic structural diagram of one embodiment of a view layout apparatus according to the present disclosure;
FIG. 6 is a schematic block diagram of a computer system suitable for use with an electronic device implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the disclosure and are not limiting of the disclosure. It should be further noted that, for the convenience of description, only the portions relevant to the present disclosure are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture 100 to which embodiments of the view layout method of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various client applications, such as a search class application, a view layout class application, etc., may be installed on the terminal devices 101, 102, 103.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide a view layout service) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, for example, calling a preset layout function in response to acquiring at least two child views added to the layout container; and executing the operation indicated by the layout function on at least two sub-views, wherein the operation comprises the following steps: obtaining layout rule parameters, and laying out at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; and presenting at least two sub-views after the layout is finished.
It should be noted that the view layout method provided by the embodiment of the present application is generally executed by the server 105, and accordingly, the view layout apparatus is generally disposed in the server 105.
It should be further noted that the terminal devices 101, 102, and 103 may have view layout applications installed therein, in this case, the view layout method may also be executed by the terminal devices 101, 102, and 103, and accordingly, the view display device may also be disposed in the terminal devices 101, 102, and 103. At this point, the exemplary system architecture 100 may also not include the server 105 and the network 104.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, to provide a view layout service), or may be implemented as a single software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a view layout method according to the present disclosure is shown. The view layout method comprises the following steps:
step 201, in response to acquiring at least two sub-views added to the layout container, a preset layout function is called.
In this embodiment, after detecting at least two sub-views, for example, 3, 5, etc., added to the layout container, the execution main body may send the attribute information of the at least two sub-views to the preset layout function through the interface of the receiving parameter of the preset layout function.
Here, the attribute information of the at least two sub-views may include: a number of at least two sub-views, an identification of each of the at least two sub-views, and the like.
The sub-view may be a single text, number, or picture, and may also contain at least two items of text, number, picture, or dynamic graph.
Here, the layout container is a parent view, and each child view is laid out in the view layout container range, that is, in the parent view range. The parent view and the child view are a set of concepts for characterizing dependency or constraint relationships between views, and the parent view is a container view for accommodating other views, where the accommodated other views are child views.
In addition, the layout container is a container class control, and may be a horizontal layout container (Row) or a vertical layout container (Column), which is not limited in this application. Row and Column are both supported by Flex. Flex, a FlexibleBox, is used primarily for flexible layout. The sub-views of Row may be arranged so as not to overlap in the horizontal direction, and the sub-views of Column may be arranged so as not to overlap in the vertical direction. The execution body may control the alignment manner of its child controls by setting attribute information of Row or Column, and the attribute information may include: mainaxiaslignment, rightPadding, etc.
In some alternatives, the layout container is a landscape layout container.
In this implementation, through setting up the overall arrangement container for horizontal overall arrangement container for add in the arrangement container the sub-view can be in the non-overlapping range of horizontal direction, promoted the horizontal layout effect of sub-view.
In step 202, the operation indicated by the layout function is performed on at least two sub-views.
In this embodiment, the executing the operation indicated by the layout function performed by the executing main body on the at least two sub-views specifically includes: and acquiring layout rule parameters, and laying out the at least two sub-views based on the layout rule parameters.
Here, the layout rule parameter may be a total layout parameter input or set by the developer, which is a parameter indicating a total requirement for layout of each sub-view in the view layout container interface.
Wherein the layout rule parameters include: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views, namely the distance parameter of at least two sub-views in the layout container from the boundary of the layout container and the distance parameter between the sub-views. The margin parameters may include left margin, right margin, and top and bottom margins.
Here, the pitch parameter may characterize a uniformly arranged regularity parameter of which the child views are equally spaced among the parent views. Specifically, if the layout container is a horizontal layout container, the layout container represents that the sub-views are horizontally and uniformly arranged in the layout container at equal intervals; if the layout container is a longitudinal layout container, the layout container represents that all the sub-views are longitudinally and uniformly arranged in the layout container at equal intervals.
It should be noted that the margin parameter and the distance parameter between the sub-views are relative parameters, and are not absolute coordinates of the sub-views in the screen.
Further, the execution body automatically lays out the at least two sub-views in the layout container according to the margin parameter of the at least two sub-views in the layout container and the spacing parameter between the at least two sub-views.
In some optional ways, the layout rule parameters further include parameters indicated by at least one of: alignment, whether to change rows, row spacing, and layout container size.
In this implementation, for the horizontal layout container, the alignment manner of the sub-views in the layout container along the main axis, i.e. the horizontal axis direction, in the layout container may be: the start child view is as close as possible to the beginning of the parent view's principal axis, the end child view is as close as possible to the end of the parent view's principal axis, and the center, the child view is as close as possible to the middle of the parent view's principal axis.
The alignment of the sub-views in the layout container along the minor axis, i.e. the direction perpendicular to the major axis, may be: the start child views are all laid out at the top of the parent view, the end child views are all laid out at the bottom of the parent view, the center child views are all laid out at the middle of the parent view, the stretch child views fill the parent view, and the like.
The line feed autoWrap indicates whether another line is needed when the child view is full of one line, and a line spacing linepacking is needed when another line is needed, wherein the line spacing is used for indicating a spacing relation between the two lines.
Here, the size of the layout container mainly includes the width and height of the layout container. The size of the layout container is usually determined in two ways, one is to determine the size of the layout container according to the content sizes of all the sub-views in the layout container, and the other is to set the size of the layout container to a preset value, in which case, the alignment mode of the sub-views in the layout container needs to be set. The two modes are both constraints on the size of the layout container, only one is relative constraint and at most, the size is large, one is absolute constraint and the size is fixed.
The implementation is achieved by obtaining parameters indicated by at least one of: the alignment mode, whether to change rows, the row spacing and the size of the layout container further lay out the sub-views, so that the diversity of the layout of the sub-views is improved, and the layout effect and the layout efficiency are further improved.
In some alternatives, the layout container size is determined according to the content size of all the child views added thereto.
In this implementation, the size of the layout container is determined according to the content sizes of all the sub-views in the layout container, i.e. the content of all the sub-views is just completely covered, as small as possible.
According to the implementation mode, the size of the layout container is determined according to the contents of all the sub-views in the layout container, and the influence on the display effect of each sub-view due to the fixed size of the container can be effectively avoided.
And step 203, presenting at least two sub-views after the layout is finished.
In this embodiment, the execution main body presents the at least two sub-views in the screen of the terminal device after completing the layout of the at least two sub-views.
With continued reference to fig. 3, fig. 3 is a schematic diagram of one application scenario of the view layout method according to the present embodiment. In the application scenario of fig. 3, the terminal device 301 calls a preset layout function in response to acquiring that the three Button sub-views Button303, 304, 305 added to the layout container 302 (e.g., the horizontal layout container row) have the same size; the operations indicated by the layout function are performed on the 3 Button sub-view buttons 303, 304, 305, including: acquiring layout rule parameters, and laying out the 3 Button sub-view buttons 303, 304 and 305 based on the layout rule parameters, wherein the layout rule parameters comprise: the margin parameter of the sub-views in the layout container (e.g., left margin of 2.f, top margin of 20.f, sub-view spacing of 8.f) and the spacing parameter between sub-views; the 3 Button sub-view buttons 303, 304, 305 after the layout is completed are presented.
In the method provided by the above embodiment of the present disclosure, a preset layout function is called in response to the at least two obtained sub-views added to the layout container; performing the operation indicated by the layout function on at least two sub-views, including: obtaining layout rule parameters, and laying out at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; and at least two sub-views after layout is finished are presented, so that the view layout process is simplified, and the development efficiency of developers is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a view layout method is shown. The flow 400 of the view layout method includes the following steps:
step 401, in response to acquiring the at least two sub-views added to the layout container, a preset layout function is called.
In this embodiment, step 401 is substantially the same as step 201 in the corresponding embodiment of fig. 2, and is not described here again.
Step 402, obtaining layout rule parameters.
In this embodiment, the execution subject obtains layout and rule parameters, where the layout rule parameters include: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views, namely the distance parameter of at least two sub-views in the layout container from the boundary of the layout container and the distance parameter between the sub-views. The margin parameters may include left margin, right margin, and top and bottom margins.
Step 403, according to the layout rule parameters and the sub-view adding instructions in the layout function, at least two sub-views are laid out.
In this embodiment, the execution subject may lay out at least two sub-views according to the layout rule parameter and the sub-view adding instruction in the layout function. The number of the sub-view adding instructions is the same as the number of the at least two sub-views added in the layout container, and the order of the sub-view adding instructions is used for indicating the adding order of the at least two sub-views in the layout container.
Here, if it is necessary to adjust the order of at least two sub-views added in the layout container, it can be implemented by adjusting only the order of the addition instructions of the respective sub-views.
As an example, the layout rule parameters are that the left margin is 20.f, the top margin is 20.f, the sub-view spacing is 8.f, the at least two sub-views to be added to the layout container are 3 Button sub-views Button1, Button2 and Button3, and the sub-view adding instructions and sequence are as follows: adding Button1, adding Button2 and adding Button3, then the execution subject can arrange 3 Button sub-views Button1, Button2 and Button3 in the layout container according to the sequence of Button1, Button2 and Button 3; if the user wants to adjust the arrangement order of the 3 Button sub-views Button1, Button2 and Button3, for example, to Button2, Button1 and Button3, the sub-view adding instructions can be adjusted to add Button2, add Button1 and add Button3, and the execution subject arranges the 3 Button sub-views Button1, Button2 and Button3 in the layout container uniformly in turn in the order of Button2, Button1 and Button 3.
And step 404, presenting at least two sub-views after layout is completed.
In this embodiment, step 401 is substantially the same as step 203 in the corresponding embodiment of fig. 2, and is not described herein again.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the view layout method in this embodiment highlights the steps of laying out at least two sub-views and presenting at least two sub-views after layout by adding instructions according to the layout rule parameters and the sub-views in the layout function. Therefore, the layout sequence of the sub-views is adjusted only by adjusting the sequence of the sub-view adding instructions, the development process is further simplified, and the development efficiency of developers is improved.
With further reference to fig. 5, as an implementation of the method illustrated in the above figures, the present disclosure provides an embodiment of a view layout apparatus, which corresponds to the method embodiment illustrated in fig. 2, and which may include the same or corresponding features as the method embodiment illustrated in fig. 2, and produce the same or corresponding effects as the method embodiment illustrated in fig. 2, in addition to the features described below. The device can be applied to various electronic equipment.
As shown in fig. 5, the view layout apparatus 500 of the present embodiment includes: a calling module 501 configured to call a preset layout function in response to acquiring the at least two sub-views added to the layout container; an execution module 502 configured to execute operations indicated by the layout function on the at least two sub-views, including: obtaining layout rule parameters, and laying out the at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; a rendering module 503 configured to render the at least two sub-views after the layout is completed.
In this embodiment, the calling module 501 of the view layout apparatus 500 may send the information of the at least two sub-views to the preset layout function through the interface of the receiving parameter of the preset layout function after detecting the at least two sub-views added to the layout container.
In this embodiment, the executing module 502 executes the operation indicated by the layout function on at least two sub-views, which specifically includes: and acquiring layout rule parameters, and laying out the at least two sub-views based on the layout rule parameters. The rendering module 503 renders the at least two sub-views in the screen of the terminal device after completing the layout of the at least two sub-views.
In some optional implementations of this embodiment, the execution module is further configured to lay out the at least two sub-views according to the layout rule parameter and a sub-view adding instruction in the layout function, where the number of the sub-view adding instruction is the same as the number of the at least two sub-views, and an order of the sub-view adding instruction is used to indicate an adding order of the at least two sub-views.
In some optional implementations of this embodiment, the layout rule parameters further include parameters indicated by at least one of: alignment, whether to change rows, row spacing, and layout container size.
In some alternative implementations of the present embodiment, the layout container size is determined according to the content size of all the child views added thereto.
In some alternative implementations of this embodiment, the layout container is a landscape layout container.
According to the device provided by the above embodiment of the present disclosure, through the calling module, in response to the at least two sub-views added to the layout container being obtained, a preset layout function is called; an execution module for executing the operation indicated by the layout function on at least two sub-views, including: obtaining layout rule parameters, and laying out the at least two sub-views based on the layout rule parameters, wherein the layout rule parameters comprise: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views; and the presentation module presents at least two sub-views after the layout is finished, simplifies the view layout process and improves the development efficiency of developers.
Fig. 6 is a block diagram of an electronic device according to a view layout method according to an embodiment of the present application.
600 is a block diagram of an electronic device in accordance with a view layout method of an embodiment of the 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. 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. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. 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. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the view layout method provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the view layout method provided herein.
The memory 602, 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 invoking module 501, the executing module 502, and the presenting module 503 shown in fig. 5) corresponding to the view display method in the embodiments of the present application. The processor 601 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 602, that is, implements the view layout method in the above-described method embodiments.
The memory 602 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 by use of the electronic device of the view display, and the like. Further, the memory 602 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 602 optionally includes memory located remotely from the processor 601, and these remote memories may be connected to the view 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 layout method may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information, and key signal inputs related to user settings and function control of the electronic apparatus that generates the view layout, such as 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 devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. 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), and the Internet.
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.
According to the technical scheme of the embodiment of the application, the view layout process is effectively simplified, and the development efficiency of developers is improved.
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, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
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 (12)

1. A view layout method, comprising:
calling a preset layout function in response to the at least two sub-views added to the layout container being obtained;
performing the operation indicated by the layout function on the at least two sub-views, including: obtaining layout rule parameters, and laying out the at least two sub-views based on the layout rule parameters, wherein the layout rule parameters include: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views;
and presenting the at least two sub-views after the layout is finished.
2. The method of claim 1, wherein said laying out the at least two sub-views based on the layout rule parameters comprises:
and according to the layout rule parameter and a sub-view adding instruction in the layout function, laying out the at least two sub-views, wherein the number of the sub-view adding instruction is the same as that of the at least two sub-views, and the order of the sub-view adding instruction is used for indicating the adding order of the at least two sub-views.
3. The method of claim 1, wherein the layout rule parameters further include parameters indicated by at least one of: alignment, whether to change rows, row spacing, and layout container size.
4. The method of claim 3, wherein the layout container size is determined according to the content size of all sub-views added thereto.
5. The method of claim 1, wherein the layout container is a landscape layout container.
6. A view layout apparatus comprising:
the calling module is configured to respond to the at least two sub-views added to the layout container, and call a preset layout function;
an execution module configured to execute the operation indicated by the layout function on the at least two sub-views, including: obtaining layout rule parameters, and laying out the at least two sub-views based on the layout rule parameters, wherein the layout rule parameters include: the edge distance parameter of the sub-views in the layout container and the distance parameter between the sub-views;
a rendering module configured to render the at least two sub-views after the layout is completed.
7. The apparatus according to claim 6, wherein the execution module is further configured to lay out the at least two sub-views according to the layout rule parameter and a sub-view adding instruction in the layout function, wherein the number of the sub-view adding instruction is the same as the number of the at least two sub-views, and the order of the sub-view adding instruction is used to indicate the adding order of the at least two sub-views.
8. The apparatus of claim 6, wherein the layout rule parameters further include parameters indicated by at least one of: alignment, whether to change rows, row spacing, and layout container size.
9. The apparatus of claim 8, wherein the layout container size is determined according to the content size of all sub-views added thereto.
10. The apparatus of claim 6, wherein the layout container is a landscape layout container.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN202010692970.8A 2020-07-17 2020-07-17 View layout method, device, equipment and medium Pending CN113946331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010692970.8A CN113946331A (en) 2020-07-17 2020-07-17 View layout method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010692970.8A CN113946331A (en) 2020-07-17 2020-07-17 View layout method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113946331A true CN113946331A (en) 2022-01-18

Family

ID=79327125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010692970.8A Pending CN113946331A (en) 2020-07-17 2020-07-17 View layout method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113946331A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114527977A (en) * 2022-02-11 2022-05-24 百果园技术(新加坡)有限公司 View layout method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415703A (en) * 2018-02-08 2018-08-17 武汉斗鱼网络科技有限公司 A kind of quick interface arrangement method, device, electronic equipment and storage medium
CN111385629A (en) * 2018-12-29 2020-07-07 深圳Tcl新技术有限公司 Interface layout method, smart television and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415703A (en) * 2018-02-08 2018-08-17 武汉斗鱼网络科技有限公司 A kind of quick interface arrangement method, device, electronic equipment and storage medium
CN111385629A (en) * 2018-12-29 2020-07-07 深圳Tcl新技术有限公司 Interface layout method, smart television and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114527977A (en) * 2022-02-11 2022-05-24 百果园技术(新加坡)有限公司 View layout method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110795195B (en) Webpage rendering method and device, electronic equipment and storage medium
US10643023B2 (en) Programmatic native rendering of structured content
CN110704136A (en) Rendering method of small program assembly, client, electronic device and storage medium
WO2020119800A1 (en) List display method, apparatus and device, and storage medium
US10185819B2 (en) Extension configuration and interaction
CN111913998B (en) Data processing method, device, equipment and storage medium
CN107451272B (en) Information display method, medium, device and computing equipment
CN111610972B (en) Page generation method, device, equipment and storage medium
CN111045653A (en) System generation method and device, computer readable medium and electronic equipment
CN105074652B (en) For remotely providing the method and computer system of application function to printer
CN112395027B (en) Widget interface generation method and device, storage medium and electronic equipment
CN111399811A (en) Method, device and equipment for developing visual page and storage medium
KR20160022362A (en) Synchronization points for state information
CN112346612A (en) Page display method and device
CN111796851A (en) Client base library updating method and device, electronic equipment and storage medium
CN113946331A (en) View layout method, device, equipment and medium
CN114255084A (en) Advertisement page display method, device and system
CN114661274A (en) Method and device for generating intelligent contract
CN112445983B (en) Method, device and equipment for processing search results and computer readable storage medium
CN111177558A (en) Channel service construction method and device
KR20190109996A (en) Method for operating software for application development
CN111651229A (en) Font changing method, device and equipment
CN111737372A (en) Map data generation method and device
CN115686293A (en) Page configuration method and device
CN113779371B (en) Method, device, equipment and storage medium for evaluating object

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