Interface simulation method, device and integrated development environment system
Through the simulator module in the integrated development environment IDE system displays and adjusts interface elements in the interface simulation area, and automatically determines coordinate information, solving the problems of high communication costs and low efficiency in interface development, and achieving efficient interface development.
Patent Information
- Application Number
- CN202210067417.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-20
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-01-20
AI Technical Summary
During the interface development process, the communication cost between designers and code developers is high, and the generated interface effect does not meet the designer's expectations, resulting in repeated modification of the coordinates of interface elements, which is inefficient.
Provide an integrated development environment IDE system, including a code editor module and a simulator module, through which the simulator module displays interface elements in the interface simulation area, allowing designers to drag and adjust element positions to automatically determine coordinate information and layer relationships. , and return it to the code editor module to generate the layout code.
It improves interface development efficiency, reduces the communication cost between designers and code developers, reduces the need for code developers to manually enter coordinate information, and ensures that the interface ultimately meets the designer's expectations.
Smart Images

Figure CN114594949B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of interface development technology, and in particular to an interface simulation method, device and integrated development environment system. Background Art
[0002] In the process from interface design to development, designers and code developers are usually required to cooperate. Specifically, the designer can first output the design draft, and can use the interface design tool to draw the interface elements and design the layout. The generated design draft can be provided to the code developer in the form of a file, and the code developer can export the interface element materials in the specific design draft and import them into the engineering package corresponding to the current interface development in the IDE (Integrated Development Environment). After that, the code developer can measure the position of the specific interface elements in the design draft, determine the position information such as the coordinates of the interface elements in the interface, and then enter this coordinate information in the IDE tool to generate the interface code.
[0003] However, in the process of interface development through the above method, the following problems often occur: the code developer generates the interface code according to his understanding of the design draft, but the interface effect finally generated may not fully meet the designer's expectations. Therefore, in the process of the designer's acceptance of the interface development results, the code developer may need to repeatedly modify the coordinates of the specific interface elements to achieve the desired effect of the designer, so that the efficiency is very low. For example, regarding a certain interface element in the design draft, the code developer sets its coordinates to (x1, y1), but when the designer is accepting, he may think that the position of the element in the interface is too far to the right, so he asks the code developer to move it 40 pixels to the left. After the code developer adjusts the coordinates of the interface element by modifying the code, when previewing the effect on the computer simulator, the designer finds that the effect after moving 40 pixels to the left still does not meet the expectations, so the code developer may need to continue to move 10 pixels to the left, and so on. The above code modification and preview process may need to be repeated many times to make the generated interface meet the designer's expectations. Summary of the invention
[0004] The present application provides an interface simulation method, device and integrated development environment system, which can improve interface development efficiency and reduce the communication cost between designers and code developers.
[0005] This application provides the following solutions:
[0006] An integrated development environment IDE system,
[0007] The system includes a code editor module and a simulator module;
[0008] The code editor module is configured to: in response to a simulation request for a target interface in a developing state, provide element identifiers of a plurality of interface elements associated with the target interface and corresponding material images to the simulator module;
[0009] The simulator module is configured to: create an interface simulation area, and display the material images of the multiple interface elements in the interface simulation area, and in response to the position dragging and / or layer up and down moving operations performed on the material images of the multiple interface elements within the interface simulation area, determine the coordinate information and / or layer relationship information of the multiple interface elements in the editing area, and return them to the code editor module;
[0010] The code editor module is further configured to generate a position layout code of the target interface according to the element identification of the interface element, and the corresponding coordinate information and / or layer relationship information.
[0011] An interface simulation method performs the following processing through a simulator program associated with an integrated development environment IDE system:
[0012] Receiving element identifiers of a plurality of interface elements associated with a target interface and corresponding material images provided by a code editor module of the IDE system;
[0013] Creating an interface simulation area, and displaying the material images of the plurality of interface elements in the interface area;
[0014] In response to a position dragging and / or layer up-and-down moving operation performed on the material images of the multiple interface elements within the interface simulation area, determining coordinate information and / or layer relationship information of the multiple interface elements in the editing area;
[0015] Return the element identifiers of the multiple interface elements and the corresponding coordinate information and / or layer relationship information to the code editor module of the IDE system, so that the code editor module of the IDE system can generate the position layout code of the target interface according to the element identifiers and the corresponding coordinate information and / or layer relationship information.
[0016] An interface simulation device, comprising:
[0017] An interface element information receiving unit, used to receive element identifiers of multiple interface elements associated with a target interface provided by a code editor module of an IDE system, and corresponding material images;
[0018] A material image display unit, used to create an interface simulation area and display the material images of the multiple interface elements in the interface area;
[0019] an information determining unit, configured to determine coordinate information and / or layer relationship information of the plurality of interface elements in the editing area in response to a position dragging and / or layer up and down moving operation performed on the material images of the plurality of interface elements within the interface simulation area;
[0020] An information providing unit is used to return the element identifiers of the multiple interface elements, and the corresponding coordinate information and / or layer relationship information to the code editor module of the IDE system, so that the code editor module of the IDE system generates the position layout code of the target interface according to the element identifiers, and the corresponding coordinate information and / or layer relationship information.
[0021] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the methods described above.
[0022] An electronic device, comprising:
[0023] one or more processors; and
[0024] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of any of the methods described above.
[0025] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0026] Through the embodiment of the present application, a simulator module can be provided for the IDE system. Through the simulator module, an interface simulation area can be created according to the element identifiers of multiple interface elements associated with the target interface provided by the code editor module, and the corresponding material images, and the material images of the multiple interface elements can be displayed in the interface simulation area. Afterwards, the designer can perform operations such as position dragging and / or layer up and down movement on the material images of the multiple interface elements within the scope of the interface simulation area, and in this process, the simulator module can determine the coordinate information and / or layer relationship information of the multiple interface elements in the editing area, and return it to the code editor module. In this way, the code editor module can directly generate the position layout code of the target interface based on the received coordinate information and / or layer relationship information, and the code developer no longer needs to manually input the coordinate information and / or layer relationship information of the specific interface element. Therefore, the interface development efficiency can be improved and the communication cost between designers and code developers can be reduced.
[0027] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 is a schematic diagram of a system provided in an embodiment of the present application;
[0030] Figure 2 is a schematic diagram of another system provided in an embodiment of the present application;
[0031] Figure 3 is a flow chart of the method provided in the embodiment of the present application;
[0032] Figure 4 is a schematic diagram of a device provided in an embodiment of the present application;
[0033] Figure 5 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0035] In the embodiment of the present application, in order to reduce the communication cost between designers and code developers during the interface development process, the existing IDE system is improved. In order to facilitate understanding of the specific implementation scheme provided by the embodiment of the present application, the existing IDE system and its composition structure are first briefly introduced below.
[0036] The IDE system is an application used to provide a program development environment, generally including tools such as code editors, compilers, debuggers, and graphical user interfaces. In other words, the IDE system is an integrated development software service suite that integrates code writing functions, analysis functions, compilation functions, debugging functions, and the like. Specifically, when a target interface needs to be developed, the designer first designs the specific interface elements. For example, a target interface needs to include a picture of a "chicken" image, a picture of a "chicken coop", and so on. These pictures can correspond to different interface elements and are designed separately by the designer in advance. Of course, some existing pictures can also be used as specific interface elements, and so on. After completing the design or selection of specific interface elements, a specific interface design tool can be used to generate a design draft. Among them, in the design draft, different interface elements can be located in different layers, and different interface elements can also have their own position coordinate information. However, since the specific interface design tool is usually a third-party tool relative to the IDE system, the IDE system cannot directly read the layers, position coordinates of interface elements, and other information from such a design draft file. Based on this situation, code developers need to export multiple layers from the design draft, each layer corresponds to an interface element, save the material images corresponding to these interface elements as local material packages, and add IDs and other identifiers to each interface element. Next, in the prior art, code developers need to measure the position coordinates of each interface element in the interface according to the specific design draft file, and identify the upper and lower layer relationships of different interface elements by observation, and then implement these position coordinates, upper and lower layer relationships, etc. by writing code.
[0037] In addition, some IDE systems also provide an interface simulation function, that is, after the code developer completes editing the interface code in the IDE system, the specific display situation can be displayed through the interface simulator. The code developer or designer can determine whether it meets the design expectations based on the situation displayed in the simulator. If not, the code developer can return to the code editor to modify the code.
[0038] In the embodiment of the present application, the specific interface simulator module can be improved (if the interface simulator module does not exist in the IDE system, a new interface simulator module can be added). Through this interface simulator module, not only can the interface elements based on the interface being developed be displayed, but also the function of dragging the interface elements to change the position, or modifying the layer where the interface elements are located, and other editing operations can be provided. In addition, the changed position coordinates, layer relationships and other information can be returned to the code editor, so that the code editor can generate specific position layout codes based on the received information.
[0039] That is to say, in the embodiment of the present application, it is not necessary for the code developer to measure the position of the interface element in the design draft and manually input the coordinates in the code. Even the designer only needs to provide the material image of the specific interface element, and does not need to specify the respective positions, upper and lower layer relationships, etc. in the design draft. Instead, multiple interface elements can be provided to the code developer, and the code developer can import the multiple interface elements into the IDE system. After naming multiple interface elements in the IDE system and saving them as material packages, the specific interface element identifier and material package can be provided to the simulator module after receiving a specific interface simulation request, so that the simulator module can display each interface element in the simulated interface. At this time, the designer can directly drag the interface element to the desired position in the interface simulator according to his own expectations, or modify the layer relationship of the specific interface element (for example, set a certain interface element to "place in the upper layer / lower layer", etc.). After that, the interface simulator can automatically determine the coordinates and / or layer relationship of the specific interface element in the interface and provide it to the code editor. In this way, the code editor directly generates the position layout code of the target interface according to the coordinate information and / or layer relationship provided by the simulator, so that the position layout of each element in the target interface finally displayed by the code can be completely in line with expectations. Code developers only need to complete the interaction code in the target interface (for example, the jump relationship after a specific button is triggered, etc.), without having to repeatedly confirm the position of specific interface elements in the interface with the designer. Therefore, it is beneficial to improve the efficiency of interface development.
[0040] Specifically from the perspective of system architecture, the embodiment of the present application can add an interface simulation module to a specific IDE system, or improve the original interface simulation module. Among them, since the IDE system can usually run in a terminal device on the PC side (it can be an application installed in the terminal device, or it can be a page accessed through a browser program in the terminal device, etc.), therefore, in one way, the specific interface simulation module can also run in the terminal device on the PC side. That is, before or after using the IDE system for code editing, the specific code developer can directly simulate the interface area of the target interface in the terminal device where the IDE system is located, and display the specific interface elements therein, and after completing the confirmation of the position modification of the interface elements through operations such as dragging, the coordinates and / or layer relationships of the specific interface elements can be directly provided to the code editing module.
[0041] Alternatively, since the target interface of the specific development may usually be an interface that needs to be displayed in a mobile terminal (mobile phone, etc.), in another more preferred mode, the specific interface simulation module can be run in a mobile terminal device. That is to say, in this mode, the code editing module, analysis module, compilation module, etc. of the IDE system can still be run in the terminal device of the PC end, while the interface simulation module can be independently run in the mobile terminal device. In specific implementation, the mobile terminal device can be connected to the specific PC end device by wired or wireless means, and then the code editing module of the IDE system can send the interface element ID, material image, etc. of the specific interface to the mobile terminal device where the interface simulation module is located through this connection, thereby completing the simulation of the target interface on the mobile terminal device, as well as the dragging of the specific interface elements, adjusting the upper and lower relationships of the layers, etc. Afterwards, the interface simulation module can return the coordinate information, layer relationship information, etc. of the interface elements to the code editing module of the PC end for generating specific position layout codes.
[0042] In addition, through the interface simulation module in the embodiment of the present application, the same target interface can be adapted between mobile terminals of different models, and multiple sets of position layout schemes matching a variety of different models can be quickly and accurately generated, and corresponding codes can be generated respectively.
[0043] The specific implementation scheme provided in the embodiments of the present application is described in detail below.
[0044] Embodiment 1
[0045] First, this embodiment provides an integrated development environment IDE system, see Figure 1 , the system may include: a code editor module 101 and a simulator module 102;
[0046] The code editor module 101 is configured to: in response to a simulation request for a target interface in a developing state, provide element identifiers of a plurality of interface elements associated with the target interface and corresponding material images to the simulator module;
[0047] The simulator module 102 is configured to: create an interface simulation area, and display the material images of the multiple interface elements in the interface area, and in response to the position dragging and / or layer up and down moving operations performed on the material images of the multiple interface elements within the interface simulation area, determine the coordinate information and / or layer relationship information of the multiple interface elements in the editing area, and return them to the code editor module;
[0048] The code editor module 101 is further configured to generate a position layout code of the target interface according to the element identification of the interface element, and the corresponding coordinate information and / or layer relationship information.
[0049] Among them, the target interface that is specifically under development may refer to the interface of the corresponding engineering package created for the interface in the IDE system after the code developer receives the design draft provided by the designer for a certain interface. The specific engineering package may include the IDs and other identifiers of the multiple interface elements included in the interface, material images (provided by the designer in the design draft), etc. In the prior art, when the specific code developer writes the position layout code for the interface, he can reference the specific interface element ID in the code and specify its position coordinates, the layer where it is located, etc. In the embodiment of the present application, an operation option for initiating a simulation request for a target interface that is under development may be provided in the code editing module. Through this operation option, a simulation display of the specific target interface that is currently under development may be initiated (of course, the simulation request may also be initiated in other ways, which will be described in detail later).
[0050] After receiving the simulation request for the target interface, the code editor module 101 can obtain the interface elements associated with the target interface, their respective ID identifications, and their respective corresponding material images from the engineering package associated with the target interface, and then provide the identifications of the interface elements and the corresponding material images to the simulator module. After the simulator module 102 receives the identifications of the specific interface elements and the corresponding material images, it can create an interface simulation area and display the material images of the multiple interface elements in the interface area. Among them, the specific interface simulation area can be determined based on information such as the expected size of the target interface, and the specific material image can be displayed in the area, and subsequent dragging operations, etc., are also performed within this range. Correspondingly, a coordinate system can also be established based on the area, for example, a coordinate system with the upper left corner of the area as the origin, etc. In the process of dragging a specific material image, the position coordinates of the material image in the coordinate system can be determined.
[0051] Among them, when implementing it specifically, Figure 2As shown in , the specific code editor module can be run in the first terminal device, or accessed through the first terminal device. Among them, the first terminal device can usually be a PC device, that is, the specific IDE system can be run in the PC device in the form of an independent application. Of course, the application can also include a server part at the same time, and so on. Alternatively, the specific code editor module can also be run on the server side and accessed through a browser program in the PC device, and so on. The simulator module can be run in the second terminal device, wherein the second terminal device can specifically be a mobile terminal device such as a mobile phone. This is because the target interface can specifically be an interface that needs to be displayed in a mobile terminal device. Therefore, by simulating the interface in a mobile terminal device, a more realistic simulation effect can be obtained, thereby improving the accuracy of the subsequently generated position layout code.
[0052] In the above Figure 2 In the illustrated architecture, since the simulator module is run in the second terminal device, the simulator module can exist in the form of a separate application, or a small program or a light application in a certain application. When simulation is required, the second terminal device can be connected to the first terminal device by wired (e.g., data cable) or wireless (e.g., WiFi, Bluetooth, etc., and can also be verified by account password, etc.). In this way, the specific code editor module can trigger the simulation request for the target interface in the development state after detecting that the second terminal device is connected to the first terminal device and the simulator module is in the running state. That is to say, in this way, the specific simulation request can be triggered by the event that the specific second terminal device is connected to the first terminal device, and then the interface simulation process can be automatically entered without the need to perform operations such as clicking on specific operation options. Among them, if the simulator application is opened in the second terminal device when it is not connected to the first terminal device, prompts such as "Please connect..." can be displayed.
[0053] In addition, in the above Figure 2Under the architecture shown, the specific simulator module can be specifically configured as follows: according to the screen parameter information of the mobile terminal device, an interface simulation area adapted to the screen parameter information is created, so that the code editor module generates a position layout code adapted to the model of the current mobile terminal device. That is to say, as mentioned above, since the simulator module is run through a mobile terminal device, the interface simulation can be performed directly in the mobile terminal device, rather than drawing a smaller area on the PC side to simulate the interface display area in the mobile terminal, so a more accurate simulation effect can be obtained. In this case, if the interface simulation is performed in a specific mobile terminal device, the specific simulated interface can be defaulted to be adapted to the model of the mobile terminal device. Therefore, an interface simulation area adapted to the screen parameter information can be created directly according to the screen parameter information of the mobile terminal device (for example, size, resolution, aspect ratio, etc.). Among them, because it is adapted to the specific mobile terminal device, for a single-screen interface, the specific interface simulation area can fill the screen of the mobile terminal device. If it is a multi-screen interface, it can fill the screen in the horizontal or vertical direction, and the other direction can exceed the screen range, and more content can be displayed by sliding, etc. After creating the above interface simulation area, the received material images of multiple interface elements can be displayed in the interface simulation area.
[0054] Specifically, when displaying the material images of multiple interface elements in the interface simulation area, there may be two situations. One situation is that the specific code developer has not yet written the position layout code for the target interface, so the specific interface element has not yet been associated with specific position coordinate information. At this time, the material images of multiple interface elements can be displayed in the interface simulation area by tiling or stacking. The designer can drag the specific material image at will to place it in the desired position according to actual expectations, or specify the layer by "place in upper / lower layer" and other methods. It is precisely because it can be processed in this way that, in the solution provided in the embodiment of the present application, when the designer provides the design draft in the early stage, he does not even need to specify the position and layer of the specific interface elements in the interface design tool, and directly provides the material images of multiple interface elements associated with the interface to the code developer.
[0055] Another situation is that the specific code developer may have written a version of the position layout code in the way of the prior art, and needs to check the specific effect in the simulator module. At this time, the specific code editor module can also provide the initial coordinate information and / or layer relationship information corresponding to each element identifier in this initial position layout code to the simulator module. In this way, the simulator module can display the material images of the multiple interface elements in the interface simulation area according to the initial coordinate information and / or layer relationship information. That is to say, in this case, the specific interface element already has the initial position coordinates in the interface simulation area. At this time, when the specific designer accepts the code through the simulator module, if it is found that the position, layer, etc. of the specific interface element do not meet the expectations, it can be adjusted directly on this basis, for example, dragging a certain interface element to the left by a certain distance, etc. Afterwards, the simulator module can generate specific position coordinates, layer relationship information, etc. according to the dragging or changing of the layer corresponding to the specific interface element, and return it to the code editor module, and the code editor module automatically updates the position layout code without the need for the code developer to manually modify the code.
[0056] In addition, for the mobile interface, since there may be multiple models of mobile terminal devices, and the screen parameters corresponding to different models may also be different, when developing the interface, it is usually necessary to adapt the same target interface to multiple models, that is, to develop multiple versions of position layout codes so that a relatively ideal display effect can be obtained in multiple models. In the prior art, the designer may only provide a design draft for one model, and then the code developer needs to determine the position coordinates of specific interface elements for multiple different models, and write multiple versions of code respectively. Therefore, the efficiency is very low, and the container may have poor adaptation effects.
[0057] In the embodiment of the present application, the interface simulation can be performed in a specific mobile terminal device. Therefore, in one way, a plurality of different models of mobile terminal devices can be used to connect to the first terminal device respectively, and then, the dragging of interface elements and other operations can be performed in each mobile terminal device respectively, so that the code editor module can automatically generate position layout codes adapted to each model. Alternatively, in another way, the simulation of a plurality of different models can also be realized in the same mobile terminal device, so as to realize the interface adaptation development of a plurality of different models through the same mobile terminal device. At this time, the simulator module specifically running in the second terminal device can be specifically configured to: provide a plurality of optional mobile terminal device model information, and create an interface simulation area adapted to the screen parameter information according to the screen parameter information corresponding to the selected target model, so that the code editor module generates a position layout code adapted to the target model. That is to say, in this way, it is not necessary to create the interface simulation area according to the screen parameter information of the mobile terminal device itself by default, but it is possible to provide a plurality of optional models, and the designer can select the model according to specific needs. After selecting a certain model, you can simulate the interface simulation area corresponding to the screen parameter information of the model. Of course, since the model is different from the current mobile terminal device, the screen parameter information is also different. Therefore, when displaying the interface simulation area, the area usually does not occupy the entire screen of the current mobile terminal device, but leaves blank or black in length or width. Designers need to drag the material image of the interface element within the specific interface simulation area and cannot exceed the range of the area.
[0058] Of course, as mentioned above, in addition to the aforementioned Figure 2 In addition to the architecture shown, the specific code editor module and the simulator module can also run in the same terminal device, or be accessed through the same terminal device. That is to say, the target interface can also be simulated directly in the PC terminal device. In addition, in this way, adaptation simulation of multiple different models can also be achieved. For example, the specific code editor module can be specifically configured to provide a variety of optional mobile terminal device model information after triggering a specific simulation request, and then the selected target model information, the element identifiers of multiple interface elements associated with the target interface, and the corresponding material images can be provided to the simulator module. In this way, the simulator module can specifically create an interface simulation area adapted to the screen parameter information corresponding to the target model information according to the screen parameter information, so that the code editor module generates a position layout code adapted to the target model. For this case, specifically when initiating a simulation request, the target interface can also be associated with a certain version of the position layout code, or it can be not associated with the position layout code, which will not be described in detail here.
[0059] In summary, through the embodiment of the present application, a simulator module can be provided for the IDE system. Through the simulator module, an interface simulation area can be created according to the element identifiers of multiple interface elements associated with the target interface provided by the code editor module, and the corresponding material images, and the material images of the multiple interface elements can be displayed in the interface simulation area. Afterwards, the designer can perform operations such as position dragging and / or layer up and down movement on the material images of the multiple interface elements within the scope of the interface simulation area, and in this process, the simulator module can determine the coordinate information and / or layer relationship information of the multiple interface elements in the editing area, and return it to the code editor module. In this way, the code editor module can directly generate the position layout code of the target interface based on the received coordinate information and / or layer relationship information, and the code developer no longer needs to manually input the coordinate information and / or layer relationship information of the specific interface element. Therefore, the interface development efficiency can be improved and the communication cost between designers and code developers can be reduced.
[0060] Embodiment 2
[0061] The second embodiment corresponds to the first embodiment and provides an interface simulation method. Figure 3 , the following processing can be performed through a simulator program associated with an integrated development environment IDE system (specifically, it can be a part of the IDE system, or it can also exist independently of the IDE system):
[0062] S301: receiving element identifiers of a plurality of interface elements associated with a target interface and corresponding material images provided by a code editor module of the IDE system;
[0063] S302: Creating an interface simulation area, and displaying the material images of the plurality of interface elements in the interface area;
[0064] S303: In response to the position dragging and / or layer up-and-down moving operations performed on the material images of the multiple interface elements within the interface simulation area, determining the coordinate information and / or layer relationship information of the multiple interface elements in the editing area;
[0065] S304: Return the element identifiers of the multiple interface elements and the corresponding coordinate information and / or layer relationship information to the code editor module of the IDE system, so that the code editor module of the IDE system generates the position layout code of the target interface according to the element identifiers and the corresponding coordinate information and / or layer relationship information.
[0066] For the parts not described in detail in the second embodiment, please refer to the description of the first embodiment and other parts of this specification, which will not be repeated here.
[0067] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0068] Corresponding to the second embodiment, the present application embodiment also provides an interface simulation device, see Figure 4 , the device may include:
[0069] The interface element information receiving unit 401 is used to receive element identifiers of multiple interface elements associated with the target interface provided by the code editor module of the IDE system, and corresponding material images;
[0070] A material image display unit 402, used to create an interface simulation area and display the material images of the multiple interface elements in the interface area;
[0071] An information determining unit 403 is used to determine the coordinate information and / or layer relationship information of the multiple interface elements in the editing area in response to the position dragging and / or layer up and down moving operations performed on the material images of the multiple interface elements within the interface simulation area;
[0072] The information providing unit 404 is used to return the element identifiers of the multiple interface elements, and the corresponding coordinate information and / or layer relationship information to the code editor module of the IDE system, so that the code editor module of the IDE system can generate the position layout code of the target interface according to the element identifiers, and the corresponding coordinate information and / or layer relationship information.
[0073] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.
[0074] And an electronic device, comprising:
[0075] one or more processors; and
[0076] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of the aforementioned method embodiments.
[0077] in, Figure 5 The architecture of an electronic device is exemplarily shown. For example, device 500 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, an aircraft, etc.
[0078] Reference Figure 5 , device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0079] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the method provided by the technical solution of the present disclosure. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0080] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0081] Power supply component 506 provides power to various components of device 500. Power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 500.
[0082] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0083] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0084] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0085] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, and the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0086] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, or a mobile communication network such as 2G, 3G, 4G / LTE, 5G, etc. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0087] In an exemplary embodiment, the device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0088] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the above instructions can be executed by a processor 520 of the device 500 to complete the method provided by the technical solution of the present disclosure. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0089] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0090] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0091] The interface simulation method, device and integrated development environment system provided by the present application are introduced in detail above. The principle and implementation mode of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. An integrated development environment IDE system, characterized in that: The system includes a code editor module and a simulator module; The code editor module is configured to: in response to a simulation request for a target interface in a development state, provide element identifiers of a plurality of interface elements associated with the target interface and corresponding material images to the simulator module; the code editor module is run on a first terminal device or accessed through the first terminal device, the first terminal device including a PC device; The simulator module is configured to: create an interface simulation area, and display the material images of the multiple interface elements in the interface simulation area, and in response to the designer performing the position dragging and / or layer up and down moving operations on the material images of the multiple interface elements within the scope of the interface simulation area as expected, determine the coordinate information and / or layer relationship information of the multiple interface elements in the interface simulation area, and return them to the code editor module; the simulator module runs in a second terminal device, and the second terminal device includes a mobile terminal device; The code editor module is also configured to: after detecting that the second terminal device is connected to the first terminal device and the simulator module is in operation, trigger the simulation request for the target interface in development, and generate the position layout code of the target interface according to the element identification of the interface element returned by the simulator module, and the corresponding coordinate information and / or layer relationship information, so that the layout of each element in the target interface displayed according to the code meets the designer's expectations.
2. The system according to claim 1, characterized in that The simulator module is specifically configured to: create an interface simulation area adapted to the screen parameter information of the mobile terminal device according to the screen parameter information of the mobile terminal device, so that the code editor module generates a position layout code adapted to the model of the current mobile terminal device.
3. The system according to claim 1, characterized in that The simulator module is specifically configured to provide a variety of optional mobile terminal device model information, and create an interface simulation area adapted to the screen parameter information corresponding to the selected target model, so that the code editor module can generate position layout code adapted to the target model.
4. The system according to claim 1, characterized in that The second terminal device establishes a connection with the first terminal device via a wired or wireless method.
5. The system according to claim 1, characterized in that The code editor module and the simulator module are run in the same terminal device, or are accessed through the same terminal device.
6. The system according to claim 5, characterized in that The code editor module is specifically configured to: provide a plurality of optional mobile terminal device model information, and provide the selected target model information, element identifiers of a plurality of interface elements associated with the target interface, and corresponding material images to the simulator module; The simulator module is specifically configured to: create an interface simulation area adapted to the screen parameter information according to the screen parameter information corresponding to the target model information, so that the code editor module generates a position layout code adapted to the target model.
7. The system according to any one of claims 1 to 6, characterized in that: The code editor module is specifically configured to: when responding to the simulation request, if the target interface has been associated with an initial position layout code, provide the initial coordinate information and / or layer relationship information corresponding to each element identifier in the initial position layout code to the simulator module; The simulator module is specifically configured to: display the material images of the plurality of interface elements in the interface simulation area according to the initial coordinate information and / or the layer relationship information; After receiving the element identifier of the interface element and the corresponding coordinate information and / or layer relationship information returned by the simulator module, the code editor module updates the position layout code of the target interface.
8. An interface simulation method, characterized in that: The following processing is performed by a simulator program associated with an integrated development environment IDE system, wherein the simulator program runs in a second terminal device, and the second terminal device includes a mobile terminal device: Receiving element identifiers of multiple interface elements associated with a target interface and corresponding material images provided by a code editor module of the IDE system; the code editor module is run on a first terminal device or accessed through the first terminal device, and the first terminal device includes a PC device; Creating an interface simulation area, and displaying the material images of the plurality of interface elements in the interface simulation area; In response to the designer's expected position dragging and / or layer up-and-down moving operations on the material images of the multiple interface elements within the interface simulation area, determining the coordinate information and / or layer relationship information of the multiple interface elements in the interface simulation area; The element identifiers of the multiple interface elements and the corresponding coordinate information and / or layer relationship information are returned to the code editor module of the IDE system, so that after detecting that the second terminal device is connected to the first terminal device and the simulator program is in a running state, the code editor module of the IDE system triggers a simulation request for the target interface in a development state, and generates a position layout code for the target interface based on the element identifiers and the corresponding coordinate information and / or layer relationship information, so that the layout of each element in the target interface displayed according to the code meets the designer's expectations.
9. An interface simulation device, characterized in that: The apparatus is arranged in a second terminal device, the second terminal device comprises a mobile terminal device, and the apparatus comprises: An interface element information receiving unit, used to receive element identifiers of multiple interface elements associated with a target interface provided by a code editor module of an IDE system, and corresponding material images; the code editor module is run on a first terminal device or accessed through the first terminal device, and the first terminal device includes a PC device; A material image display unit, used to create an interface simulation area and display the material images of the multiple interface elements in the interface simulation area; An information determination unit, configured to determine coordinate information and / or layer relationship information of the plurality of interface elements in the interface simulation area in response to a position dragging and / or layer up and down moving operation performed by a designer on the material images of the plurality of interface elements within the interface simulation area as expected; An information providing unit is used to return the element identifications of the multiple interface elements, and the corresponding coordinate information and / or layer relationship information to the code editor module of the IDE system, so that after detecting that the second terminal device is connected to the first terminal device and the interface simulation device is in a running state, the code editor module of the IDE system triggers a simulation request for a target interface in a development state, and generates a position layout code for the target interface based on the element identifications and the corresponding coordinate information and / or layer relationship information, so that the layout of each element in the target interface displayed according to the code meets the designer's expectations.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in claim 8 are implemented.
11. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method of claim 8.
Citation Information
Patent Citations
Mobile terminal application program test method and mobile terminal application program test system
CN104978263A
Front-end application visual development tool and use method
CN110597506A
Method and apparatus for constructing visual view
WO2022228209A1
