CN117289918A - Interface style editing method, device, medium and equipment - Google Patents

Interface style editing method, device, medium and equipment Download PDF

Info

Publication number
CN117289918A
CN117289918A CN202311220137.3A CN202311220137A CN117289918A CN 117289918 A CN117289918 A CN 117289918A CN 202311220137 A CN202311220137 A CN 202311220137A CN 117289918 A CN117289918 A CN 117289918A
Authority
CN
China
Prior art keywords
style
target
language
display
page control
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
CN202311220137.3A
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202311220137.3A priority Critical patent/CN117289918A/en
Publication of CN117289918A publication Critical patent/CN117289918A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Abstract

The embodiment of the application provides an interface style editing method, an interface style editing device, a storage medium and electronic equipment, wherein the method comprises the steps of importing an interface resource file to be edited into a style editor, and displaying a display page corresponding to the interface resource file through the style editor; responding to language switching operation of a target page control of a display page, and switching the target page control into a target language version corresponding to the language switching operation; responding to style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation; and responding to an export event of the target interface resource file, binding a target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing the target language style into a style sheet, and storing the style sheet into the interface resource file to obtain the target interface resource file. The embodiment of the application can achieve the display effect of the real-time preview page control after editing.

Description

Interface style editing method, device, medium and equipment
Technical Field
The present disclosure relates to the field of electronic communications technologies, and in particular, to an interface style editing method, device, medium, and apparatus.
Background
Most existing software systems support multiple language types, and the software systems can display software pages corresponding to the language types according to the system language types currently selected by users. For example, in the iOS project, a corresponding folder is created for each language type, and a strings file storing text information is placed in the folder; for another example, in the Android project, the internationalized text information file may be placed in a resource folder named res, in which a value folder may be created for each language type, and the xml file of the text information is stored in the folder.
Internationalization adaptation of the current software system requires developers to copy internationalization language information files from projects, then the files are submitted to translators for translation, and after the files are translated, the translated file character strings are copied into the current software projects one by the developers of other software platforms. When the text element is displayed in the display page, display abnormality may occur due to the resolution of the current client, for example, if it is originally expected that a certain english word is completely displayed in one line, but in fact, the situation that the line is displayed is occurred, which affects the user experience. Therefore, a developer needs to check the display effect of the same text element under different language types in time, when the display abnormality is found, the developer needs to modify the html source code of the page designed by the front end designer, and after modification, the developer rerun checks whether the modified display effect is correct.
Disclosure of Invention
The embodiment of the application provides an interface style editing method, device, medium and equipment, which are used for importing an interface resource file to be edited into a preset style editor to perform style editing operation, wherein the style editor provides a language switching function and a style editing function for a target page control of a display page, so that an operator can convert the appointed page control into a target language version in the style editor and edit the display style of the target page control in a targeted manner, the display effect of the page control after editing is previewed in real time, and the actual effect of the page control in the operation of an application system is previewed in advance.
In one aspect, an embodiment of the present application provides an interface style editing method, including:
importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control;
responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page;
Responding to style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation;
and responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing a preset style sheet, and storing the style sheet into the interface resource file to obtain a target interface resource file for updating the display style of the target page control.
In the interface style editing method according to the embodiment of the present application, before the switching the target page control to the target language version corresponding to the language switching operation, the method further includes:
and acquiring a target version language file corresponding to the language switching operation from the interface resource file, and acquiring a target language style for executing the language switching operation under the target language version according to the target version language file.
In the interface style editing method of the embodiment of the present application, the switching the target page control to the target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page includes:
Acquiring a target version language corresponding to the language switching operation, a first identifier of a target page control and a second identifier of a target display page;
searching whether a control style corresponding to the target version language, the first identifier and the second identifier exists or not from the interface resource file, and if so, switching the original language style of the target page control into the target language style under the target version language and updating and displaying the target language style in the display page.
In the interface style editing method according to the embodiment of the present application, after the language switching operation in response to the target page control of the display page, the method further includes:
providing a style modification interface, wherein the style modification interface comprises display styles corresponding to different types and input boxes for editing attribute values of the display styles, and the display styles comprise one or more of size styles, color styles and position styles.
In the interface style editing method according to the embodiment of the present application, before the responding to the style editing operation for the target page control, the method further includes:
responding to long-press operation or double-click operation aiming at the target page control, so as to switch the target page control into an editable state, and performing style editing operation on the target page control entering the editable state, wherein the style editing operation comprises stretching and adjusting the size of the target page control or moving and adjusting the display position of the target page control.
In the method for editing an interface style according to the embodiment of the present application, the responding to the language switching operation of the target page control of the display page includes:
responding to the language switching operation of any target page control of the display page, switching the original language style of the target page control into a target language style under a target version language according to the language switching operation, and updating and displaying in the display page; or (b)
Responding to language switching operation of all page controls of the display page, switching original language styles of all page controls of the display page into target language styles in target version language according to the language switching operation, and updating and displaying in the display page.
In the method for editing an interface style according to the embodiment of the present application, after the display page corresponding to the interface resource file is displayed by the style editor, the method further includes:
and adding or deleting the display style under the appointed language style for the target page control in response to the style adding and deleting operation for the target page control.
Correspondingly, another aspect of the embodiments of the present application further provides an interface style editing apparatus, where the interface style editing apparatus includes:
The file importing module is used for importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control;
the first response module is used for responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page;
the second response module is used for responding to the style editing operation aiming at the target page control and updating the target page control in the display page according to a target display style corresponding to the style editing operation;
and the file updating module is used for responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing the target language style into a preset style sheet, and storing the style sheet into the interface resource file to obtain the target interface resource file for updating the display style of the target page control.
Accordingly, another aspect of the embodiments of the present application also provides a computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the interface style editing method as described above.
Accordingly, another aspect of the embodiments of the present application further provides an electronic device, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions to perform the interface style editing method as described above.
The embodiment of the application provides an interface style editing method, device, medium and equipment, wherein the method comprises the steps of importing an interface resource file to be edited into a preset style editor, displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control; responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page; responding to style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation; and responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing a preset style sheet, and storing the style sheet into the interface resource file to obtain a target interface resource file for updating the display style of the target page control. According to the method and the device for editing the interface resource file, the interface resource file to be edited is imported into the preset style editor to conduct style editing operation, the style editor provides a language switching function and a style editing function for the target page control of the display page, an operator can convert the appointed page control into the target language version in the style editor and then edit the display style of the target page control in a targeted manner, the display effect of the page control after editing is previewed in real time, and the actual effect of the page control in the operation of an application system is previewed in advance.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an interface style editing method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an interface style editing apparatus according to an embodiment of the present application.
Fig. 3 is another schematic structural diagram of an interface style editing apparatus according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by a person skilled in the art without any inventive effort, are intended to be within the scope of the present application based on the embodiments herein.
It will be appreciated that most existing software systems support multiple language types, and that the software system will present a software page of the corresponding language type based on the system language type currently selected by the user. For example, in the iOS project, a corresponding folder is created for each language type, and a strings file storing text information is placed in the folder; for another example, in the Android project, the internationalized text information file may be placed in a resource folder named res, in which a value folder may be created for each language type, and the xml file of the text information is stored in the folder.
Internationalization adaptation of the current software system requires developers to copy internationalization language information files from projects, then the files are submitted to translators for translation, and after the files are translated, the translated file character strings are copied into the current software projects one by the developers of other software platforms. When the text element is displayed in the display page, display abnormality may occur due to the resolution of the current client, for example, if it is originally expected that a certain english word is completely displayed in one line, but in fact, the situation that the line is displayed is occurred, which affects the user experience. Therefore, a developer needs to check the display effect of the same text element under different language types in time, when the display abnormality is found, the developer needs to modify the html source code of the page designed by the front end designer, and after modification, the developer rerun checks whether the modified display effect is correct.
In order to solve the above technical problems, an embodiment of the present application provides an interface style editing method. By using the interface style editing method provided by the embodiment of the application, the interface resource file to be edited is imported into the preset style editor to perform style editing operation, and the style editor provides the language switching function and the style editing function for the target page control of the display page, so that an operator can convert the appointed page control into the target language version in the style editor and then edit the display style of the appointed page control in a targeted manner, the display effect of the page control after editing is previewed in real time, and the actual effect of the page control in the operation of an application system is previewed in advance.
Referring to fig. 1, fig. 1 is a flowchart illustrating an interface style editing method according to an embodiment of the present application. In the interface style editing method, execution subjects of each step in the interface style editing method may be the same or different, and the execution subjects may be electronic devices or servers. The electronic device may be a personal computer or the like. The method may comprise the steps of:
step 101, importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control.
It should be noted that, the interface resource file refers to a resource file in system software that forms any frame of display interface, where the display interface may be a game running interface or a system running interface, and is not limited herein.
It can be understood that by importing the interface resource file to be edited into the preset style editor, the interface style editing method provided by the scheme can display the display page corresponding to the interface resource file by using the preset style editor, and preview the actual display effect of the interface resource file in the system software in advance.
Step 102, responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page.
In this embodiment, the style editor may be preset with an operation control for performing a language switching operation by a user, may be a plurality of individual controls corresponding to different language versions, or may be in a list form including a plurality of options of different language versions for the user to select, which is not limited herein. The user can select a target language version to be switched in the style editor aiming at a single or a plurality of target page controls through a preset operation control, switch the target page controls into the target language version corresponding to the language switching operation, and update and display the target page controls in the display page.
As an implementation manner, after receiving an operation command sent by a user in a style editor, a terminal device, in order to perform a language switching operation, can perform the language switching only by acquiring a language style created in advance from an interface resource file, so that it is required to determine whether a target page control selected by the user has a corresponding language style in a target language version from the interface resource file, and only if the target page control has the corresponding language style, the terminal device can perform the corresponding language switching operation.
Specifically, a target version language corresponding to language switching operation, a first identifier of a target page control and a second identifier of a target display page are obtained; searching whether a control style corresponding to the target version language, the first identifier and the second identifier exists or not from the interface resource file, and if so, switching the original language style of the target page control to the target language style under the target version language and then updating and displaying the original language style in the display page.
It should be explained that the first identifier and the second identifier may be represented by a keyId (interface name or control name).
In some embodiments, the language switching operation may be an execution operation for one or more page controls, or may be an execution operation for all page controls in the display page at the same time. An operation control can be preset in the style editor and used for simultaneously switching the original language styles of all page controls of the display page into target language styles in target version language and then updating and displaying the original language styles in the display page. The user can see the global translation effect of the display page, and the target page control with abnormal display can be found conveniently and quickly.
And step 103, responding to the style editing operation aiming at the target page control, and updating the target page control in the display page according to the target display style corresponding to the style editing operation.
In this embodiment, in order to enable a user to edit a display style of the target page control after the target page control is selected and converted into a target language version, a style modification interface for performing a style editing operation by the user may be preset in the style editor, where the style modification interface includes an entry box corresponding to different types of display styles and attribute values for editing the display styles, and the display styles include one or more of a size style, a color style, a position style, and other styles. After responding to language switching operation of a target page control of the display page, automatically popping up a style modification interface for a user to edit attribute values of the display style in an input frame. Or the style modification interface is displayed in the appointed area of the style editor in advance, and after the target page control is selected, an input frame in the style modification interface is automatically mapped to the current target page control.
As another implementation manner, the user may perform a long-press operation or a double-click operation on the target page control to switch the target page control to an editable state, and a style editing operation can be performed on the target page control entering the editable state, where the style editing operation includes stretching and adjusting the size of the target page control or moving and adjusting the display position of the target page control by means of a mouse or a shortcut instruction.
Step 104, responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing the target language style into a preset style sheet, and storing the style sheet into the interface resource file to obtain a target interface resource file for updating the display style of the target page control.
In this embodiment, the target display style of the target page control edited by the style editing operation may be bound with the target language style corresponding to each target display style and then stored into a preset style sheet, and the updated target page control display style may be correctly displayed in the running process by using the style sheet.
In some embodiments, the method further comprises the steps of:
and adding or deleting the display style under the appointed language style for the target page control in response to the style adding and deleting operation for the target page control.
In this embodiment, the user may perform style adding and deleting operations on any target page control, so as to add or delete a display style under a specified language style for the target page control.
In an exemplary embodiment, when a target page control has only a display style in a chinese language version in a corresponding interface resource file, if a user wants to add a display style in an english language version to the target page control, the display style in the english language version can be newly added and stored in a style editor, and then exported to a translator for translation, so that a corresponding display style is created for a certain original language version in advance, thereby avoiding the target page control from having the same display effect in any language version.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
In particular, the present application is not limited by the order of execution of the steps described, and certain steps may be performed in other orders or concurrently without conflict.
As can be seen from the foregoing, in the interface style editing method provided by the embodiment of the present application, an interface resource file to be edited is imported into a preset style editor, and a display page corresponding to the interface resource file is displayed by the style editor, where the display page includes at least one page control; responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page; responding to style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation; and responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing a preset style sheet, and storing the style sheet into the interface resource file to obtain a target interface resource file for updating the display style of the target page control. According to the method and the device for editing the interface resource file, the interface resource file to be edited is imported into the preset style editor to conduct style editing operation, the style editor provides a language switching function and a style editing function for the target page control of the display page, an operator can convert the appointed page control into the target language version in the style editor and then edit the display style of the target page control in a targeted manner, the display effect of the page control after editing is previewed in real time, and the actual effect of the page control in the operation of an application system is previewed in advance.
The embodiment of the application also provides an interface style editing device which can be integrated in the electronic equipment or the server.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an interface style editing apparatus according to an embodiment of the present application. The interface style editing apparatus 30 may include:
the file importing module 31 is configured to import an interface resource file to be edited into a preset style editor, and display a display page corresponding to the interface resource file through the style editor, where the display page includes at least one page control;
a first response module 32, configured to respond to a language switching operation on a target page control of the display page, switch the target page control to a target language version corresponding to the language switching operation, and update and display the target page control in the display page;
the second response module 33 is configured to respond to a style editing operation for the target page control, and update the target page control in the display page according to a target display style corresponding to the style editing operation;
the file updating module 34 is configured to respond to an export event of a target interface resource file, bind the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, store the target language style in a preset style sheet, and store the style sheet in the interface resource file to obtain a target interface resource file for updating the display style of the target page control.
In some embodiments, the device further includes a file obtaining module, configured to obtain a target version language file corresponding to the language switching operation from the interface resource file, and obtain, according to the target version language file, a target language style for executing the language switching operation under the target language version.
In some embodiments, the first response module 32 is configured to obtain a target version language corresponding to the language switching operation, a first identifier of a target page control, and a second identifier of a target display page; searching whether a control style corresponding to the target version language, the first identifier and the second identifier exists or not from the interface resource file, and if so, switching the original language style of the target page control into the target language style under the target version language and updating and displaying the target language style in the display page.
In some embodiments, the apparatus further comprises a providing module for providing a style modification interface comprising an entry box for editing attribute values of a display style corresponding to different types of display styles, the display styles comprising one or more of a size style, a color style, and a position style.
In some embodiments, the device further includes a third response module, configured to respond to a long press operation or a double click operation for the target page control, so as to switch the target page control to an editable state, and enable a style editing operation on the target page control entering the editable state, where the style editing operation includes stretching and adjusting a size of the target page control or moving and adjusting a display position of the target page control.
In some embodiments, the first response module 32 is configured to respond to a language switching operation for any target page control of the display page, and update display in the display page after switching an original language style of the target page control to a target language style in a target version language according to the language switching operation; or responding to language switching operation of all page controls of the display page, and updating and displaying in the display page after switching original language styles of all page controls of the display page into target language styles in target version language according to the language switching operation.
In some embodiments, the apparatus further includes a third response module, configured to add or delete a display style under a specified language style to the target page control in response to a style add/delete operation for the target page control.
In specific implementation, each module may be implemented as a separate entity, or may be combined arbitrarily and implemented as the same entity or several entities.
As can be seen from the above, the interface style editing apparatus 30 provided in the embodiments of the present application is configured to import, through the file import module 31, an interface resource file to be edited into a preset style editor, and display, through the style editor, a display page corresponding to the interface resource file, where the display page includes at least one page control; the first response module 32 is configured to respond to a language switching operation on a target page control of the display page, switch the target page control to a target language version corresponding to the language switching operation, and update and display the target page control in the display page; the second response module 33 is configured to respond to a style editing operation for the target page control, and update the target page control in the display page according to a target display style corresponding to the style editing operation; the file updating module 34 is configured to respond to an export event of a target interface resource file, bind the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, store the target language style in a preset style sheet, and store the style sheet in the interface resource file to obtain a target interface resource file for updating the display style of the target page control.
Referring to fig. 3, fig. 3 is another schematic structural diagram of an interface style editing apparatus according to an embodiment of the present application, where the interface style editing apparatus 30 includes a memory 120, one or more processors 180, and one or more application programs, and the one or more application programs are stored in the memory 120 and configured to be executed by the processors 180; the processor 180 may include a file import 31, a first response module 32, a second response module 33, and a file update module 34. For example, the structures and connection relationships of the above respective components may be as follows:
memory 120 may be used to store applications and data. The memory 120 stores application programs including executable code. Applications may constitute various functional modules. The processor 180 executes various functional applications and data processing by running application programs stored in the memory 120. In addition, memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 120 may also include a memory controller to provide access to the memory 120 by the processor 180.
The processor 180 is a control center of the device, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the device and processes data by running or executing application programs stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the device. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, user interfaces, application programs, and the like.
In particular, in this embodiment, the processor 180 loads executable codes corresponding to the processes of one or more application programs into the memory 120 according to the following instructions, and the processor 180 executes the application programs stored in the memory 120, so as to implement various functions:
a file importing instruction, which is used for importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control;
the first response instruction is used for responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page;
The second response instruction is used for responding to the style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation;
and the file updating instruction is used for responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing the target language style into a preset style sheet, and storing the style sheet into the interface resource file to obtain the target interface resource file for updating the display style of the target page control.
In some embodiments, the program further includes a file obtaining instruction, configured to obtain a target version language file corresponding to the language switching operation from the interface resource file, and obtain, according to the target version language file, a target language style for executing the language switching operation under the target language version.
In some embodiments, the first response instruction is configured to obtain a target version language corresponding to the language switching operation, a first identifier of a target page control, and a second identifier of a target display page; searching whether a control style corresponding to the target version language, the first identifier and the second identifier exists or not from the interface resource file, and if so, switching the original language style of the target page control into the target language style under the target version language and updating and displaying the target language style in the display page.
In some embodiments, the program further comprises providing instructions for providing a style modification interface comprising an entry box for editing attribute values of a display style corresponding to different types of display styles, the display styles comprising one or more of a size style, a color style, and a position style.
In some embodiments, the program further includes a third response instruction, configured to switch the target page control to an editable state in response to a long press operation or a double click operation on the target page control, where a style editing operation is enabled on the target page control entering the editable state, where the style editing operation includes stretching and adjusting a size of the target page control or moving and adjusting a display position of the target page control.
In some embodiments, the first response instruction is configured to respond to a language switching operation for any target page control of the display page, and update display in the display page after switching an original language style of the target page control to a target language style in a target version language according to the language switching operation; or responding to language switching operation of all page controls of the display page, and updating and displaying in the display page after switching original language styles of all page controls of the display page into target language styles in target version language according to the language switching operation.
In some embodiments, the program further includes third response instructions for adding or deleting a display style under a specified language style to the target page control in response to a style add-delete operation for the target page control.
The embodiment of the application also provides electronic equipment. The electronic device may be an electronic device or a server.
Referring to fig. 4, fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application, which may be used to implement the interface style editing method provided in the above embodiment. Taking an electronic device as an example, the electronic device 1200 may be a smart phone or a tablet computer.
As shown in fig. 4, the electronic device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media (only one is shown), an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more processing cores (only one is shown), and a power supply 190. Those skilled in the art will appreciate that the configuration of the electronic device 1200 shown in fig. 4 does not constitute a limitation of the electronic device 1200, and may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components. Wherein:
The RF circuit 110 is configured to receive and transmit electromagnetic waves, and to perform mutual conversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices. RF circuitry 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The RF circuitry 110 may communicate with various networks such as the internet, intranets, wireless networks, or other devices via wireless networks.
The memory 120 may be used to store software programs and modules, such as program instructions/modules corresponding to the interface style editing method in the above embodiment, and the processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120, so that the vibration reminding mode can be automatically selected to perform interface style editing according to the current scene where the electronic device is located, which can ensure that the scenes such as a conference are not disturbed, and ensure that the user can perceive an incoming call, thereby improving the intelligence of the electronic device. Memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 120 may further include memory remotely located relative to the processor 180, which may be connected to the electronic device 1200 via 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 input unit 130 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may comprise a touch sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch-sensitive surface 131 or thereabout by using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 180, and can receive commands from the processor 180 and execute them. In addition, the touch-sensitive surface 131 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. In addition to the touch-sensitive surface 131, the input unit 130 may also comprise other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 140 may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of the electronic device 1200, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and alternatively, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may overlay the display panel 141, and upon detection of a touch operation thereon or thereabout by the touch-sensitive surface 131, the touch-sensitive surface is transferred to the processor 180 to determine the type of touch event, and the processor 180 then provides a corresponding visual output on the display panel 141 based on the type of touch event. Although in fig. 4 the touch-sensitive surface 131 and the display panel 141 are implemented as two separate components for input and output functions, in some embodiments the touch-sensitive surface 131 may be integrated with the display panel 141 to implement the input and output functions.
The electronic device 1200 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or the backlight when the electronic device 1200 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the electronic device 1200 are not described in detail herein.
Audio circuitry 160, speaker 161, microphone 162 may provide an audio interface between a user and electronic device 1200. The audio circuit 160 may transmit the received electrical signal converted from audio data to the speaker 161, and the electrical signal is converted into a sound signal by the speaker 161 to be output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, receives the electrical signal from the audio circuit 160, converts the electrical signal into audio data, outputs the audio data to the processor 180 for processing, transmits the audio data to, for example, another terminal via the RF circuit 110, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an ear bud jack to provide communication of the peripheral headphones with the electronic device 1200.
The electronic device 1200 may facilitate user email, web browsing, streaming media access, etc. via the transmission module 170 (e.g., wi-Fi module), which provides wireless broadband internet access to the user. Although fig. 4 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the electronic device 1200, and can be omitted entirely as required within the scope not changing the essence of the invention.
The processor 180 is a control center of the electronic device 1200, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the electronic device 1200 and processes data by running or executing software programs and/or modules stored in the memory 120, and invoking data stored in the memory 120, thereby performing overall monitoring of the handset. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor that primarily processes operating systems, user interfaces, applications, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The electronic device 1200 also includes a power supply 190 that provides power to the various components, and in some embodiments, may be logically connected to the processor 180 via a power management system to perform functions such as managing discharge, and managing power consumption via the power management system. The power supply 190 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the electronic device 1200 may also include a camera (e.g., front camera, rear camera), a bluetooth module, etc., which are not described in detail herein. In particular, in the present embodiment, the display unit 140 of the electronic device 1200 is a touch screen display, the electronic device 1200 further includes a memory 120, and one or more programs, wherein the one or more programs are stored in the memory 120 and configured to be executed by the one or more processors 180, the one or more programs include instructions for:
a file importing instruction, which is used for importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control;
The first response instruction is used for responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page;
the second response instruction is used for responding to the style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation;
and the file updating instruction is used for responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing the target language style into a preset style sheet, and storing the style sheet into the interface resource file to obtain the target interface resource file for updating the display style of the target page control.
In some embodiments, the program further includes a file obtaining instruction, configured to obtain a target version language file corresponding to the language switching operation from the interface resource file, and obtain, according to the target version language file, a target language style for executing the language switching operation under the target language version.
In some embodiments, the first response instruction is configured to obtain a target version language corresponding to the language switching operation, a first identifier of a target page control, and a second identifier of a target display page; searching whether a control style corresponding to the target version language, the first identifier and the second identifier exists or not from the interface resource file, and if so, switching the original language style of the target page control into the target language style under the target version language and updating and displaying the target language style in the display page.
In some embodiments, the program further comprises providing instructions for providing a style modification interface comprising an entry box for editing attribute values of a display style corresponding to different types of display styles, the display styles comprising one or more of a size style, a color style, and a position style.
In some embodiments, the program further includes a third response instruction, configured to switch the target page control to an editable state in response to a long press operation or a double click operation on the target page control, where a style editing operation is enabled on the target page control entering the editable state, where the style editing operation includes stretching and adjusting a size of the target page control or moving and adjusting a display position of the target page control.
In some embodiments, the first response instruction is configured to respond to a language switching operation for any target page control of the display page, and update display in the display page after switching an original language style of the target page control to a target language style in a target version language according to the language switching operation; or responding to language switching operation of all page controls of the display page, and updating and displaying in the display page after switching original language styles of all page controls of the display page into target language styles in target version language according to the language switching operation.
In some embodiments, the program further includes third response instructions for adding or deleting a display style under a specified language style to the target page control in response to a style add-delete operation for the target page control.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program runs on a computer, the computer executes the interface style editing method described in any one of the embodiments above:
Importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control;
responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page;
responding to style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation;
and responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing a preset style sheet, and storing the style sheet into the interface resource file to obtain a target interface resource file for updating the display style of the target page control.
It should be noted that, for the interface style editing method described in the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the interface style editing method described in the embodiments of the present application may be implemented by controlling related hardware by using a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the execution may include the flow of implementing the embodiment of the interface style editing method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), or the like.
For the interface style editing device in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist separately and physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The method, the device, the computer readable storage medium and the electronic equipment for editing the interface style provided by the embodiment of the application are described in detail above. The principles and embodiments of the present application are described herein with specific examples, the above examples being provided only to assist in understanding the methods of the present application and their core ideas; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. An interface style editing method, comprising:
importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control;
responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page;
responding to style editing operation for the target page control, and updating the target page control in the display page according to a target display style corresponding to the style editing operation;
and responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing a preset style sheet, and storing the style sheet into the interface resource file to obtain a target interface resource file for updating the display style of the target page control.
2. The interface style editing method according to claim 1, wherein before said switching said target page control to a target language version corresponding to said language switching operation, said method further comprises:
and acquiring a target version language file corresponding to the language switching operation from the interface resource file, and acquiring a target language style for executing the language switching operation under the target language version according to the target version language file.
3. The interface style editing method according to claim 2, wherein said switching the target page control to the target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page, includes:
acquiring a target version language corresponding to the language switching operation, a first identifier of a target page control and a second identifier of a target display page;
searching whether a control style corresponding to the target version language, the first identifier and the second identifier exists or not from the interface resource file, and if so, switching the original language style of the target page control into the target language style under the target version language and updating and displaying the target language style in the display page.
4. The interface style editing method according to claim 1, wherein after said responding to a language switching operation to a target page control of said display page, said method further comprises:
providing a style modification interface, wherein the style modification interface comprises display styles corresponding to different types and input boxes for editing attribute values of the display styles, and the display styles comprise one or more of size styles, color styles and position styles.
5. The interface style editing method of claim 1, wherein prior to said responding to the style editing operation for the target page control, the method further comprises:
responding to long-press operation or double-click operation aiming at the target page control, so as to switch the target page control into an editable state, and performing style editing operation on the target page control entering the editable state, wherein the style editing operation comprises stretching and adjusting the size of the target page control or moving and adjusting the display position of the target page control.
6. The interface style editing method according to claim 1, wherein said responding to a language switching operation of a target page control of the display page includes:
Responding to the language switching operation of any target page control of the display page, switching the original language style of the target page control into a target language style under a target version language according to the language switching operation, and updating and displaying in the display page; or (b)
Responding to language switching operation of all page controls of the display page, switching original language styles of all page controls of the display page into target language styles in target version language according to the language switching operation, and updating and displaying in the display page.
7. The interface style editing method according to claim 1, wherein after said displaying, by said style editor, of a display page corresponding to said interface resource file, said method further comprises:
and adding or deleting the display style under the appointed language style for the target page control in response to the style adding and deleting operation for the target page control.
8. An interface style editing apparatus, characterized in that the interface style editing apparatus comprises:
the file importing module is used for importing an interface resource file to be edited into a preset style editor, and displaying a display page corresponding to the interface resource file through the style editor, wherein the display page comprises at least one page control;
The first response module is used for responding to language switching operation of a target page control of the display page, switching the target page control into a target language version corresponding to the language switching operation, and updating and displaying the target page control in the display page;
the second response module is used for responding to the style editing operation aiming at the target page control and updating the target page control in the display page according to a target display style corresponding to the style editing operation;
and the file updating module is used for responding to an export event of a target interface resource file, binding the target display style of the target page control edited by the style editing operation with a target language style corresponding to the target display style, storing the target language style into a preset style sheet, and storing the style sheet into the interface resource file to obtain the target interface resource file for updating the display style of the target page control.
9. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the interface style editing method of any of claims 1 to 7.
10. A terminal device comprising a processor and a memory, the memory storing a plurality of instructions, the processor loading the instructions to perform the interface style editing method of any of claims 1 to 7.
CN202311220137.3A 2023-09-20 2023-09-20 Interface style editing method, device, medium and equipment Pending CN117289918A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311220137.3A CN117289918A (en) 2023-09-20 2023-09-20 Interface style editing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311220137.3A CN117289918A (en) 2023-09-20 2023-09-20 Interface style editing method, device, medium and equipment

Publications (1)

Publication Number Publication Date
CN117289918A true CN117289918A (en) 2023-12-26

Family

ID=89240170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311220137.3A Pending CN117289918A (en) 2023-09-20 2023-09-20 Interface style editing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN117289918A (en)

Similar Documents

Publication Publication Date Title
CN109388453B (en) Application page display method and device, storage medium and electronic equipment
US10917455B2 (en) File transfer display control method and apparatus, and corresponding terminal
US10705780B2 (en) Method, device, and storage medium for displaying application page
JP6689990B2 (en) Graphic code display method, device and storage medium
CN106970790B (en) Application program creating method, related equipment and system
CN110795666B (en) Webpage generation method, device, terminal and storage medium
CN106775637B (en) Page display method and device for application program
CN108287918B (en) Music playing method and device based on application page, storage medium and electronic equipment
EP2940572A1 (en) Method and electronic device for managing display objects
WO2017099440A1 (en) Web page operation method and electronic device for supporting the same
CN106708496B (en) Processing method and device for label page in graphical interface
CN107247691B (en) Text information display method and device, mobile terminal and storage medium
RU2597468C2 (en) Method and device for browsing web pages at weak illumination by browser for mobile terminal
JP2011238220A (en) Method, device, and computer program product for providing context recognition-type help content
CN111274777B (en) Thinking guide display method and electronic equipment
CN107391017B (en) Word processing method, device, mobile terminal and storage medium
US20190213241A1 (en) Web page display method and apparatus, mobile terminal, and storage medium
US20150153921A1 (en) Apparatuses and methods for inputting a uniform resource locator
EP2869604B1 (en) Method, apparatus and device for processing a mobile terminal resource
CN107957841B (en) Rolling screen capture method and device
CN104093085A (en) Information displaying method and device
CN111191176B (en) Website content updating method, device, terminal and storage medium
CN112749074B (en) Test case recommending method and device
CN104063424B (en) Web page picture shows method and demonstration device
WO2015096660A1 (en) Methods and devices for displaying a webpage

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