CN107992302B - Button configuration method and device, storage medium and intelligent terminal - Google Patents
Button configuration method and device, storage medium and intelligent terminal Download PDFInfo
- Publication number
- CN107992302B CN107992302B CN201711317278.1A CN201711317278A CN107992302B CN 107992302 B CN107992302 B CN 107992302B CN 201711317278 A CN201711317278 A CN 201711317278A CN 107992302 B CN107992302 B CN 107992302B
- Authority
- CN
- China
- Prior art keywords
- button
- attribute information
- configuration file
- button configuration
- information
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本发明实施例涉及软件开发技术领域,尤其涉及一种按钮配置方法、装置、存储介质及智能终端。The embodiments of the present invention relate to the technical field of software development, and in particular, to a button configuration method, a device, a storage medium, and an intelligent terminal.
背景技术Background technique
目前,随着智能手机、平板电脑等智能终端的普及,及计算机硬件性能的不断提高,带动了各种用户界面(UI,User Interface)技术的不断革新。尤其是在交互UI方面,各种赏心悦目的UI层出不穷,大大提高了用户的使用体验。At present, with the popularization of smart terminals such as smart phones and tablet computers, and the continuous improvement of computer hardware performance, the continuous innovation of various user interface (UI, User Interface) technologies has been driven. Especially in terms of interactive UI, a variety of pleasing UIs emerge one after another, which greatly improves the user experience.
现有技术中,用户界面中的按钮一般都是在软件开发过程已配置好,不能根据用户的需求,对用户界面中按钮的数量、大小和位置等属性信息进行个性化动态设置。如果想要改变某软件的用户界面中按钮的数量、大小和位置等信息时,需要开发人员重新开发该界面的脚本代码。In the prior art, the buttons in the user interface are generally configured during the software development process, and attribute information such as the number, size, and position of the buttons in the user interface cannot be dynamically set according to the needs of the user. If you want to change the information such as the number, size and position of buttons in the user interface of a software, the developer needs to re-develop the script code of the interface.
然而,软件开发的代码的耦合度高、冗余度大和代码健壮性差,使得二次开发成本高、风险大。However, the code of software development has high coupling degree, large redundancy and poor code robustness, which makes the secondary development cost high and risk high.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种按钮配置方法、装置、存储介质及智能终端,以实现对用户界面中的按钮进行个性化动态设置,而无需二次开发,减少开发成本,提高用户的交互体验。Embodiments of the present invention provide a button configuration method, device, storage medium, and intelligent terminal, so as to implement personalized dynamic settings for buttons in a user interface without secondary development, reduce development costs, and improve user interaction experience.
第一方面,本发明实施例提供了一种按钮配置方法,该方法包括:In a first aspect, an embodiment of the present invention provides a button configuration method, the method includes:
获取第一按钮属性信息;Get the first button attribute information;
根据所述第一按钮属性信息生成第一按钮配置文件;Generate a first button configuration file according to the first button attribute information;
调用所述第一按钮配置文件并运行,生成与所述第一按钮属性信息对应的按钮。The first button configuration file is called and executed to generate a button corresponding to the attribute information of the first button.
进一步的,所述根据所述第一按钮属性信息生成第一按钮配置文件,包括:Further, generating the first button configuration file according to the first button attribute information includes:
获取按钮配置模板;Get button configuration template;
根据所述第一按钮属性信息和所述按钮配置模板,生成第一按钮配置文件。A first button configuration file is generated according to the first button attribute information and the button configuration template.
进一步的,所述根据所述第一按钮属性信息和所述按钮配置模板,生成第一按钮配置文件,包括:Further, generating the first button configuration file according to the first button attribute information and the button configuration template includes:
将所述第一按钮属性信息添加至所述按钮配置模板,生成按钮类;adding the first button attribute information to the button configuration template to generate a button class;
基于所述按钮类生成所述第一按钮配置文件。The first button configuration file is generated based on the button class.
进一步的,所述根据所述第一按钮属性信息生成第一按钮配置文件,包括:Further, generating the first button configuration file according to the first button attribute information includes:
获取按钮配置界面信息;Get button configuration interface information;
根据所述第一按钮属性信息和所述按钮配置界面信息,生成第一按钮配置文件。A first button configuration file is generated according to the first button attribute information and the button configuration interface information.
进一步的,所述获取第一按钮属性信息,包括:Further, the obtaining the attribute information of the first button includes:
当接收到用户输入的按钮配置指令时,获取第二按钮配置文件;When receiving the button configuration instruction input by the user, obtain the second button configuration file;
解析所述第二按钮配置文件,得到与所述第二按钮配置文件对应的第二按钮属性信息;Parsing the second button configuration file to obtain second button attribute information corresponding to the second button configuration file;
基于用户对所述第二按钮属性信息的更改指令,获取第一按钮属性信息。The first button attribute information is acquired based on the user's instruction to change the second button attribute information.
进一步的,所述第一按钮属性信息包括:按钮数量信息、按钮形状信息、按钮大小信息、按钮颜色信息、按钮位置信息和按钮动画信息中的至少一个。Further, the first button attribute information includes at least one of button quantity information, button shape information, button size information, button color information, button position information and button animation information.
第二方面,本发明实施例还提供了一种按钮配置装置,该装置包括:In a second aspect, an embodiment of the present invention further provides a button configuration device, the device comprising:
第一按钮属性信息获取模块,用于获取第一按钮属性信息;a first button attribute information acquisition module, used for acquiring the first button attribute information;
第一按钮配置文件生成模块,用于根据所述第一按钮属性信息生成第一按钮配置文件;a first button configuration file generation module, configured to generate a first button configuration file according to the first button attribute information;
按钮生成模块,用于调用所述第一按钮配置文件并运行,生成与所述第一按钮属性信息对应的按钮。A button generation module, configured to call and run the first button configuration file, and generate a button corresponding to the attribute information of the first button.
进一步的,所述第一按钮配置文件生成模块,包括:Further, the first button configuration file generation module includes:
按钮配置模板获取单元,用于获取按钮配置模板;The button configuration template obtaining unit is used to obtain the button configuration template;
第一按钮配置文件生成单元,用于根据所述第一按钮属性信息和所述按钮配置模板,生成第一按钮配置文件。A first button configuration file generating unit, configured to generate a first button configuration file according to the first button attribute information and the button configuration template.
进一步的,所述第一按钮配置文件生成单元,用于:Further, the first button configuration file generating unit is used for:
将所述第一按钮属性信息添加至所述按钮配置模板,生成按钮类;adding the first button attribute information to the button configuration template to generate a button class;
基于所述按钮类生成所述第一按钮配置文件。The first button configuration file is generated based on the button class.
进一步的,所述第一按钮配置文件生成模块,用于:Further, the first button configuration file generation module is used for:
获取按钮配置界面信息;Get button configuration interface information;
根据所述第一按钮属性信息和所述按钮配置界面信息,生成第一按钮配置文件。A first button configuration file is generated according to the first button attribute information and the button configuration interface information.
进一步的,所述第一按钮属性信息获取模块,用于:Further, the first button attribute information acquisition module is used for:
当接收到用户输入的按钮配置指令时,获取第二按钮配置文件;When receiving the button configuration instruction input by the user, obtain the second button configuration file;
解析所述第二按钮配置文件,得到与所述第二按钮配置文件对应的第二按钮属性信息;Parsing the second button configuration file to obtain second button attribute information corresponding to the second button configuration file;
基于用户对所述第二按钮属性信息的更改指令,获取第一按钮属性信息。The first button attribute information is acquired based on the user's instruction to change the second button attribute information.
进一步的,所述第一按钮属性信息包括:按钮数量信息、按钮形状信息、按钮大小信息、按钮颜色信息、按钮位置信息和按钮动画信息中的至少一个。Further, the first button attribute information includes at least one of button quantity information, button shape information, button size information, button color information, button position information and button animation information.
第三方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明实施例第一方面所述的按钮配置方法。In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the button configuration method according to the first aspect of the embodiment of the present invention.
第四方面,本发明实施例提供了一种智能终端,包括存储器,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如本发明实施例第一方面所述的按钮配置方法。In a fourth aspect, an embodiment of the present invention provides an intelligent terminal, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes the computer program to realize the implementation of the present invention Example of the button configuration method described in the first aspect.
本发明实施例提供的按钮配置方案,通过获取第一按钮属性信息,根据第一按钮属性信息生成第一按钮配置文件,然后调用第一按钮配置文件并运行,生成与第一按钮属性信息对应的按钮,可以实现对用户界面中的按钮进行个性化动态设置。由于可以动态地根据获取到的按钮属性信息自动生成按钮配置文件,配置按钮,而无需对用户界面的脚本代码进行二次开发,可以有效减少开发成本,提高用户的交互体验,满足用户个性化的按钮配置需求。In the button configuration solution provided by the embodiment of the present invention, a first button configuration file is generated according to the first button attribute information by acquiring the first button attribute information, and then the first button configuration file is called and executed to generate the corresponding first button attribute information. button, which can realize personalized dynamic settings for buttons in the user interface. Because the button configuration file can be automatically generated and configured according to the obtained button attribute information, without the need for secondary development of the script code of the user interface, the development cost can be effectively reduced, the user's interactive experience can be improved, and the user's personalized requirements can be satisfied. button configuration requirements.
附图说明Description of drawings
图1是本发明实施例一提供的一种按钮配置方法的流程示意图;1 is a schematic flowchart of a method for configuring buttons according to Embodiment 1 of the present invention;
图2是本发明实施例二提供的一种按钮配置方法的流程示意图;2 is a schematic flowchart of a method for configuring buttons according to Embodiment 2 of the present invention;
图3是本发明实施例三提供的一种按钮配置方法的流程示意图;3 is a schematic flowchart of a method for configuring buttons according to Embodiment 3 of the present invention;
图4是本发明实施例四提供的一种按钮配置方法的流程示意图;4 is a schematic flowchart of a method for configuring buttons according to Embodiment 4 of the present invention;
图5是本发明实施例四提供的基于按钮配置方法配置的按钮显示效果示意图;5 is a schematic diagram of a button display effect configured based on a button configuration method provided in Embodiment 4 of the present invention;
图6是本发明实施例五提供的一种按钮配置装置的结构示意图;6 is a schematic structural diagram of a button configuration device according to Embodiment 5 of the present invention;
图7是本发明实施例七提供的一种智能终端的结构示意图。FIG. 7 is a schematic structural diagram of an intelligent terminal according to Embodiment 7 of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present invention.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in greater detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart depicts the steps as a sequential process, many of the steps may be performed in parallel, concurrently, or concurrently. Furthermore, the order of the steps can be rearranged. The process may be terminated when its operation is complete, but may also have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, subroutines, and the like.
实施例一Example 1
图1为本发明实施例提供的按钮配置方法的流程示意图,该方法可适用于对按钮进行动态配置的情况,可以由按钮配置装置执行,其中该装置可由软件和/或硬件实现,一般可集成在智能终端中。如图1所示,该方法包括:FIG. 1 is a schematic flowchart of a button configuration method provided by an embodiment of the present invention. The method is applicable to the situation of dynamically configuring buttons, and can be executed by a button configuration device, wherein the device can be implemented by software and/or hardware, and generally can be integrated in the smart terminal. As shown in Figure 1, the method includes:
S110、获取第一按钮属性信息。S110. Acquire attribute information of the first button.
在本发明实施例中,第一按钮属性信息可以用于表征按钮的大小、颜色、形状及位置等相关信息。示例性的,第一按钮属性信息可以包括:按钮数量信息、按钮形状信息、按钮大小信息、按钮颜色信息、按钮位置信息和按钮动画信息中的至少一个。可以根据第一按钮属性信息在按钮配置界面配置相应的按钮。示例性的,在大多数的应用程序的使用界面中需要配置按钮,供用户点击使用,通过对按钮的一系列操作,满足用户需求。可以理解的是,在各个应用程序的各个界面中需要设置按钮的界面,均可以将此作为按钮配置界面。例如,在淘宝应用的主界面中,包含有微淘、消息、购物车及我的淘宝等一系列的按钮,那么淘宝应用的主界面就可以称为按钮配置界面。其中,按钮数量信息可以理解为按钮配置界面中配置按钮的数量多少,如需要配置三个按钮;按钮形状信息可以理解为按钮配置界面中需要配置的各个按钮的形状,圆形、矩形或三角形等等;按钮大小信息可以理解为按钮配置界面中需要配置的各个按钮的大小,如圆形按钮的半径或直径,矩形按钮的长宽,三角形按钮的各个边长和各个角度等等;按钮颜色信息可以理解为按钮配置界面中需要配置的各个按钮的颜色,其中,可以包括按钮的外框的颜色信息和/或按钮填充颜色;按钮位置信息可以理解为按钮配置界面中需要配置的各个按钮的位置,即需要配置的各个按钮在配置界面中所处的具体位置;按钮动画信息可以理解为按钮配置界面中需要配置的各个按钮被用户点击时,呈现的动画效果。In this embodiment of the present invention, the first button attribute information may be used to represent relevant information such as the size, color, shape, and position of the button. Exemplarily, the first button attribute information may include at least one of button quantity information, button shape information, button size information, button color information, button position information, and button animation information. The corresponding button can be configured on the button configuration interface according to the attribute information of the first button. Exemplarily, a button needs to be configured in the usage interface of most application programs for the user to click and use, and a series of operations on the button can satisfy the user's requirement. It can be understood that, in each interface of each application program, an interface that needs to set buttons can be used as a button configuration interface. For example, in the main interface of Taobao application, there are a series of buttons such as Weitao, Message, Shopping Cart and My Taobao, then the main interface of Taobao application can be called button configuration interface. Among them, the button quantity information can be understood as the number of configuration buttons in the button configuration interface, for example, three buttons need to be configured; the button shape information can be understood as the shape of each button that needs to be configured in the button configuration interface, such as circle, rectangle or triangle, etc. etc.; the button size information can be understood as the size of each button that needs to be configured in the button configuration interface, such as the radius or diameter of the circular button, the length and width of the rectangular button, the length and angle of each side of the triangular button, etc.; button color information It can be understood as the color of each button that needs to be configured in the button configuration interface, which can include the color information of the outer frame of the button and/or the button fill color; the button position information can be understood as the position of each button that needs to be configured in the button configuration interface , that is, the specific position of each button to be configured in the configuration interface; the button animation information can be understood as the animation effect presented when each button to be configured in the button configuration interface is clicked by the user.
其中,本发明实施例可以采用用户通过人机交互界面输入一些与需要在配置界面配置的按钮相关的属性信息,即第一按钮属性信息,这样设置的好处在于,可以根据用户的需求动态设置按钮的属性信息,从而在按钮配置界面配置出不同风格的按钮,满足不用用户的不同需求。示例性的,当用户对当前界面中配置的按钮不是很满意时,用户可以输入自己想要配置出的第一按钮属性信息,以满足用户需求。例如,用户的智能终端中当前界面中包含两个按钮,而用户想要在该界面呈现出四个按钮来,同时为四个按钮配置不同的颜色、大小、形状、位置及动画等相关信息时,可以在人机交互界面手动输入与之相关的第一按钮属性信息。Among them, in this embodiment of the present invention, the user can input some attribute information related to the button that needs to be configured on the configuration interface, that is, the first button attribute information, through the human-computer interaction interface. The advantage of this setting is that the button can be dynamically set according to the user's needs attribute information, so as to configure buttons of different styles in the button configuration interface to meet the different needs of different users. Exemplarily, when the user is not very satisfied with the buttons configured in the current interface, the user can input the attribute information of the first button that he wants to configure to meet the user's needs. For example, when the current interface of the user's smart terminal contains two buttons, and the user wants to present four buttons on the interface, and configure different colors, sizes, shapes, positions, animations and other related information for the four buttons at the same time , the attribute information of the first button related thereto can be manually input in the human-computer interaction interface.
当然,在本实施例中,第一按钮属性信息还可以通过从服务器下载的按钮动态配置文件中获取。示例性的,当需要在按钮配置界面配置按钮时,从服务器中下载按钮动态配置文件,并从按钮动态配置文件中解析出与之对应的按钮属性信息作为第一按钮属性信息。也可以对从按钮动态配置文件中解析出的按钮属性信息进行适应性更改,将更改后的按钮属性信息作为第一按钮属性信息。Of course, in this embodiment, the attribute information of the first button may also be obtained from a button dynamic configuration file downloaded from the server. Exemplarily, when a button needs to be configured on the button configuration interface, the button dynamic configuration file is downloaded from the server, and the corresponding button attribute information is parsed from the button dynamic configuration file as the first button attribute information. The button attribute information parsed from the button dynamic configuration file can also be adaptively changed, and the changed button attribute information is used as the first button attribute information.
需要说明的是,本发明实施例对第一按钮属性信息包含的具体内容及第一按钮属性信息的获取方式不做具体限定。It should be noted that the embodiment of the present invention does not specifically limit the specific content included in the first button attribute information and the acquisition method of the first button attribute information.
S120、根据第一按钮属性信息生成第一按钮配置文件。S120. Generate a first button configuration file according to the first button attribute information.
在本发明实施例中,根据第一按钮属性信息生成与该第一按钮属性信息关联的第一按钮配置文件。其中,第一按钮配置文件可以理解为包含有第一按钮属性信息的按钮配置代码文件。In this embodiment of the present invention, a first button configuration file associated with the first button attribute information is generated according to the first button attribute information. Wherein, the first button configuration file can be understood as a button configuration code file containing attribute information of the first button.
可选的,根据第一按钮属性信息生成第一按钮配置文件,可以包括:获取按钮配置模板;根据第一按钮属性信息和按钮配置模板,生成第一按钮配置文件。其中,根据第一按钮属性信息和按钮配置模板,生成第一按钮配置文件,可以包括:将第一按钮属性信息添加至按钮配置模板,生成按钮类;基于按钮类生成第一按钮配置文件。这样设置的好处在于,可以根据按钮属性信息和按钮配置模板,简单、快速地自动生成按钮配置文件,从而满足不同用户对按钮配置的不同需求。Optionally, generating the first button configuration file according to the first button attribute information may include: acquiring a button configuration template; and generating the first button configuration file according to the first button attribute information and the button configuration template. Wherein, generating the first button configuration file according to the first button attribute information and the button configuration template may include: adding the first button attribute information to the button configuration template to generate a button class; and generating the first button configuration file based on the button class. The advantage of this setting is that the button configuration file can be automatically generated simply and quickly according to the button attribute information and the button configuration template, so as to meet the different needs of different users for button configuration.
可选的,根据第一按钮属性信息生成第一按钮配置文件,可以包括:获取按钮配置界面信息,根据第一按钮属性信息和按钮配置界面信息,生成第一按钮配置信息。例如,按钮配置界面信息可以包括按钮配置界面的大小、按钮配置界面的颜色和按钮配置界面中的图片等相关信息。可以根据按钮配置界面信息适配第一按钮属性信息,生成第一按钮配置文件。这样设置的好处在于,可以根据按钮配置界面信息适配按钮属性信息,从而使得配置出的按钮与按钮配置界面更加匹配。Optionally, generating the first button configuration file according to the first button attribute information may include: acquiring button configuration interface information, and generating the first button configuration information according to the first button attribute information and the button configuration interface information. For example, the button configuration interface information may include relevant information such as the size of the button configuration interface, the color of the button configuration interface, and pictures in the button configuration interface. The first button configuration file may be generated by adapting the first button attribute information according to the button configuration interface information. The advantage of this setting is that the button attribute information can be adapted according to the button configuration interface information, so that the configured button and the button configuration interface are more matched.
S130、调用第一按钮配置文件并运行,生成与第一按钮属性信息对应的按钮。S130 , calling and running the first button configuration file to generate a button corresponding to the attribute information of the first button.
调用S120中生成的第一按钮配置文件,并运行所述第一按钮配置文件,从而生成与第一按钮属性信息对应的按钮。可以理解的是,将按钮配置代码文件添加到按钮配置界面中的代码文件中,或者说按钮配置界面中的代码文件调用第一按钮配置文件,并运行,从而在按钮配置界面生成与第一按钮属性信息对应的按钮。The first button configuration file generated in S120 is called, and the first button configuration file is run, thereby generating a button corresponding to the attribute information of the first button. It can be understood that the button configuration code file is added to the code file in the button configuration interface, or the code file in the button configuration interface calls the first button configuration file and runs it, so that the button configuration interface generates and the first button. The button corresponding to the attribute information.
本发明实施例提供的按钮配置方法,通过获取第一按钮属性信息,根据第一按钮属性信息生成第一按钮配置文件,然后调用第一按钮配置文件并运行,生成与第一按钮属性信息对应的按钮,可以实现对用户界面中的按钮进行个性化动态设置。由于可以动态地根据获取到的按钮属性信息自动生成按钮配置文件,配置按钮,而无需对用户界面的脚本代码进行二次开发,可以有效减少开发成本,提高用户的交互体验,满足用户个性化的按钮配置需求。The button configuration method provided by the embodiment of the present invention obtains first button attribute information, generates a first button configuration file according to the first button attribute information, and then calls and runs the first button configuration file to generate a corresponding first button attribute information. button, which can realize personalized dynamic settings for buttons in the user interface. Because the button configuration file can be automatically generated and configured according to the obtained button attribute information, without the need for secondary development of the script code of the user interface, the development cost can be effectively reduced, the user's interactive experience can be improved, and the user's personalized requirements can be satisfied. button configuration requirements.
实施例二Embodiment 2
图2是本发明实施例二提供的一种按钮配置方法的流程示意图。本实施例以上述实施例为基础进行优化,在本实施例中,将步骤根据所述第一按钮属性信息生成第一按钮配置文件,优化为:获取按钮配置模板;根据所述第一按钮属性信息和所述按钮配置模板,生成第一按钮配置文件;并进一步将步骤根据所述第一按钮属性信息和所述按钮配置模板,生成第一按钮配置文件,优化为:将所述第一按钮属性信息添加至所述按钮配置模板,生成按钮类;基于所述按钮类生成所述第一按钮配置文件。相应的,本实施例的方法具体包括:FIG. 2 is a schematic flowchart of a button configuration method according to Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiment. In this embodiment, the steps of generating a first button configuration file according to the first button attribute information are optimized as follows: obtaining a button configuration template; according to the first button attribute information information and the button configuration template to generate a first button configuration file; and further steps are based on the first button attribute information and the button configuration template to generate a first button configuration file, optimized as: the first button The attribute information is added to the button configuration template to generate a button class; the first button configuration file is generated based on the button class. Correspondingly, the method of this embodiment specifically includes:
S210、获取第一按钮属性信息。S210. Acquire attribute information of the first button.
S220、获取按钮配置模板。S220. Obtain a button configuration template.
按钮配置模板可以理解为预先生成的按钮配置代码文件模板。其中,可以通过模板技术生成按钮配置模板,并将生成的按钮配置模板预先保存在智能终端或服务器中。当需要配置按钮时,从智能终端中调用按钮配置模板,或者从服务器中下载按钮配置模板。模板技术可以包括StringTemplate,Smarty,FastTemplate,ShellPage及Savant等,采用模板技术可以实现应用程序业务逻辑和表现逻辑的分离,提高代码程序的并行工作效率。The button configuration template can be understood as a pre-generated button configuration code file template. Wherein, a button configuration template may be generated through a template technology, and the generated button configuration template may be pre-saved in the intelligent terminal or server. When the button needs to be configured, call the button configuration template from the smart terminal, or download the button configuration template from the server. Template technology can include StringTemplate, Smarty, FastTemplate, ShellPage and Savant, etc. The use of template technology can realize the separation of application business logic and presentation logic, and improve the parallel work efficiency of code programs.
S230、将第一按钮属性信息添加至按钮配置模板,生成按钮类。S230. Add the attribute information of the first button to the button configuration template to generate a button class.
将第一按钮属性信息添加至按钮配置模板,生成按钮类。其中,按钮类可以包含有多个按钮代码段或按钮代码块。在各个按钮代码段或按钮代码块中包含有第一按钮属性信息中的一种或多种。例如,第一按钮属性信息可以包括:按钮数量信息、按钮形状信息、按钮大小信息、按钮颜色信息、按钮位置信息和按钮动画信息。按钮类包含有三个按钮代码段或按钮代码块,以按钮代码块为例,第一按钮代码块可以仅包含有第一按钮属性信息中的按钮数量信息,第二按钮代码块可以包含按钮形状信息、按钮大小信息及按钮位置信息的综合信息,第三按钮代码块可以包含按钮颜色信息和按钮动画信息的综合信息。Add the first button attribute information to the button configuration template to generate a button class. Among them, the button class can contain multiple button code segments or button code blocks. Each button code segment or button code block contains one or more kinds of first button attribute information. For example, the first button attribute information may include: button quantity information, button shape information, button size information, button color information, button position information, and button animation information. The button class contains three button code segments or button code blocks. Taking the button code block as an example, the first button code block can only contain the button quantity information in the first button attribute information, and the second button code block can contain the button shape information. , the comprehensive information of button size information and button position information, and the third button code block may contain comprehensive information of button color information and button animation information.
S240、基于按钮类生成第一按钮配置文件。S240. Generate a first button configuration file based on the button class.
在本发明实施例中,基于S230生成的按钮类生成第一按钮配置文件。可以理解的是,对按钮类中的各个按钮代码段或按钮代码块进行综合分析,生成第一按钮配置文件。其中,第一按钮配置文件中包含了第一按钮属性信息中的各个属性内容。In the embodiment of the present invention, the first button configuration file is generated based on the button class generated in S230. It can be understood that the first button configuration file is generated by comprehensively analyzing each button code segment or button code block in the button class. Wherein, the first button configuration file includes each attribute content in the first button attribute information.
S250、调用第一按钮配置文件并运行,生成与第一按钮属性信息对应的按钮。S250, calling and running the first button configuration file to generate a button corresponding to the attribute information of the first button.
本发明实施例提供的按钮配置方法,通过将第一属性信息添加到按钮配置模板中,生成按钮类,并基于按钮类生成第一按钮配置文件,从而配置出用户需要的按钮,省去了开发人员对用户界面的脚本代码进行二次开发的繁琐过程,实现了按钮配置文件生成的自动化,满足了用户对按钮的个性化动态设置。In the button configuration method provided by the embodiment of the present invention, a button class is generated by adding the first attribute information to the button configuration template, and a first button configuration file is generated based on the button class, so as to configure the button required by the user and save development. The tedious process of secondary development of the script code of the user interface by personnel realizes the automation of button configuration file generation and satisfies the user's personalized dynamic settings for buttons.
实施例三Embodiment 3
图3是本发明实施例三提供的一种按钮配置方法的流程示意图。本实施例以上述实施例为基础进行优化,在本实施例中,将步骤根据所述第一按钮属性信息生成第一按钮配置文件,优化为:获取按钮配置界面信息;根据所述第一按钮属性信息和所述按钮配置界面信息,生成第一按钮配置文件。相应的,本实施例的方法具体包括:FIG. 3 is a schematic flowchart of a button configuration method according to Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiment. In this embodiment, the step of generating a first button configuration file according to the attribute information of the first button is optimized as follows: obtaining button configuration interface information; according to the first button The attribute information and the button configuration interface information are used to generate a first button configuration file. Correspondingly, the method of this embodiment specifically includes:
S310、获取第一按钮属性信息。S310. Acquire attribute information of the first button.
S320、获取按钮配置界面信息。S320. Obtain button configuration interface information.
在本发明实施例中,按钮配置界面可以为一个,也可以为多个。当按钮配置界面为多个时,多个按钮配置界面可以是相互独立的,也可以具有等级关联性。示例性的,在一个桔子理财原生界面中可以包含多个等级的按钮配置界面,如首先包括一个入口购买理财界面和一个资产界面。入口购买理财界面和资产界面可以看做是两个并列的按钮配置界面。在这两个按钮配置界面中又分别包含多个不同的子界面。如入口购买理财界面中又分别包括VIP定存产品详情界面、定存产品详情界面、月月升产品详情界面、周周升产品详情界面及新手周周升产品详情界面。资产界面中又分别包括定存产品资产详情界面、月月升产资产品详情界面和周周升产资产品详情界面。上述各个子界面也可以看做按钮配置界面。其中,按钮配置界面信息可以包括按钮配置界面的大小、按钮配置界面的颜色和按钮配置界面中的图片等相关信息。In this embodiment of the present invention, there may be one button configuration interface, or there may be multiple ones. When there are multiple button configuration interfaces, the multiple button configuration interfaces may be independent of each other, or may have hierarchical associations. Exemplarily, multiple levels of button configuration interfaces may be included in an orange wealth management native interface, for example, a portal purchase wealth management interface and an asset interface may be included first. The portal purchase and wealth management interface and the asset interface can be regarded as two side-by-side button configuration interfaces. The two button configuration interfaces also contain a number of different sub-interfaces. For example, the portal purchase wealth management interface also includes the VIP time deposit product details interface, the time deposit product details interface, the Yueyuesheng product details interface, the Zhou Zhousheng product details interface and the novice Zhou Zhousheng product details interface. The asset interface also includes the asset details interface of fixed deposit products, the product details interface of Yueyuesheng assets and the product details interface of Zhouzhousheng assets. The above sub-interfaces can also be regarded as button configuration interfaces. The button configuration interface information may include relevant information such as the size of the button configuration interface, the color of the button configuration interface, and pictures in the button configuration interface.
S330、根据第一按钮属性信息和按钮配置界面信息,生成第一按钮配置文件。S330. Generate a first button configuration file according to the first button attribute information and the button configuration interface information.
可选的,根据按钮配置界面信息适配第一按钮属性信息,并根据适配结果生成第一按钮配置文件。示例性的,获取到的第一按钮属性信息中包含两个深红色圆形按钮,直径均为2cm。而按钮配置界面信息中包含的按钮配置界面为一个长为6cm,宽为4cm的长方形界面,界面颜色为浅红色。而如果仅根据第一按钮属性生成对应的第一按钮配置文件,最后生成的按钮在按钮配置界面显示效果会比较差。因此,为了使按钮在按钮配置界面有良好的显示效果,可以根据按钮界面信息适配第一按钮属性信息。例如,根据按钮配置界面的长和宽适应性调整第一按钮属性信息中的大小属性信息,根据按钮配置界面中的颜色适应性调整第一按钮属性信息中的颜色属性信息,如将直径为2cm的圆形按钮调整为直径为1.5cm的圆形按钮,颜色调整为黄色。也可以根据按钮配置界面的长和宽设置一预设比例,将第一按钮属性信息中的大小属性乘以该预设比例值,以适应性调整按钮大小属性。用样的,根据按钮配置界面的颜色信息和第一按钮属性信息中的颜色属性信息,设置一调整色度,根据该调整色度适应性修改按钮颜色属性。Optionally, the first button attribute information is adapted according to the button configuration interface information, and the first button configuration file is generated according to the adaptation result. Exemplarily, the acquired first button attribute information includes two dark red circular buttons, both of which have a diameter of 2 cm. The button configuration interface included in the button configuration interface information is a rectangular interface with a length of 6 cm and a width of 4 cm, and the color of the interface is light red. However, if the corresponding first button configuration file is only generated according to the attributes of the first button, the display effect of the finally generated button on the button configuration interface will be poor. Therefore, in order to make the button have a good display effect on the button configuration interface, the attribute information of the first button can be adapted according to the button interface information. For example, the size attribute information in the first button attribute information is adaptively adjusted according to the length and width of the button configuration interface, and the color attribute information in the first button attribute information is adaptively adjusted according to the color in the button configuration interface, for example, the diameter is 2cm The circular button is adjusted to a circular button with a diameter of 1.5cm, and the color is adjusted to yellow. A preset ratio may also be set according to the length and width of the button configuration interface, and the size attribute in the first button attribute information is multiplied by the preset ratio value to adaptively adjust the button size attribute. In this way, an adjustment chromaticity is set according to the color information of the button configuration interface and the color attribute information in the first button attribute information, and the button color attribute is adaptively modified according to the adjusted chromaticity.
S340、调用第一按钮配置文件并运行,生成与第一按钮属性信息对应的按钮。S340, calling and running the first button configuration file to generate a button corresponding to the attribute information of the first button.
本发明实施例提供的按钮配置方法,通过根据按钮配置界面信息适配第一按钮属性信息,并生成对应的第一按钮配置文件,从而配置出用户需要的按钮,不仅可以实现对按钮的个性化动态设置,而且还可以有效地增加配置出的按钮与按钮配置界面的匹配度,使配置的按钮在按钮配置界面有良好的显示效果,从而提高用户的使用体验。In the button configuration method provided by the embodiment of the present invention, by adapting the attribute information of the first button according to the button configuration interface information, and generating the corresponding first button configuration file, so as to configure the button required by the user, not only the personalization of the button can be realized Dynamic setting, and can also effectively increase the matching degree between the configured button and the button configuration interface, so that the configured button has a good display effect in the button configuration interface, thereby improving the user experience.
实施例四Embodiment 4
图4是本发明实施例四提供的一种按钮配置方法的流程示意图。本实施例以上述实施例为基础进行优化,在本实施例中,将步骤获取第一按钮属性信息,优化为:当接收到用户输入的按钮配置指令时,获取第二按钮配置文件;解析所述第二按钮配置文件,得到与所述第二按钮配置文件对应的第二按钮属性信息;基于用户对所述第二按钮属性信息的更改指令,获取第一按钮属性信息。相应的,本实施例的方法具体包括:FIG. 4 is a schematic flowchart of a button configuration method according to Embodiment 4 of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiment. In this embodiment, the step of obtaining the attribute information of the first button is optimized as follows: when receiving the button configuration instruction input by the user, obtain the second button configuration file; The second button configuration file is used to obtain second button attribute information corresponding to the second button configuration file; and the first button attribute information is obtained based on a user's instruction to change the second button attribute information. Correspondingly, the method of this embodiment specifically includes:
S410、当接收到用户输入的按钮配置指令时,获取第二按钮配置文件。S410. When receiving a button configuration instruction input by the user, acquire a second button configuration file.
在本发明实施例中,按钮配置指令可以为预设设定的指令,包括但不限于机械控制指令(例如接收到用户操作预设的机械按钮发出指令)、预设音频指令、预设视频图像指令和/或预设触摸指令等。需要说明的是,上述各种预先设定的指令可以单独使用,也可结合使用。In this embodiment of the present invention, the button configuration instruction may be a preset instruction, including but not limited to a mechanical control instruction (for example, an instruction issued by a user operating a preset mechanical button), a preset audio instruction, and a preset video image. commands and/or preset touch commands, etc. It should be noted that the above various preset commands may be used alone or in combination.
其中,第二按钮配置文件可以为从服务器中下载的按钮动态配置文件,按钮动态配置文件中包含了对应的按钮属性信息。第二按钮配置文件也可以为当前界面中的按钮对应的按钮配置文件,在该第二按钮配置文件中包含了与当前界面已配置好的按钮对应的按钮配属性信息。本实施例对第二按钮配置文件的来源不做具体限定。The second button configuration file may be a button dynamic configuration file downloaded from the server, and the button dynamic configuration file includes corresponding button attribute information. The second button configuration file may also be a button configuration file corresponding to a button in the current interface, and the second button configuration file includes button configuration attribute information corresponding to the configured buttons in the current interface. This embodiment does not specifically limit the source of the second button configuration file.
S420、解析第二按钮配置文件,得到与第二按钮配置文件对应的第二按钮属性信息。S420: Parse the second button configuration file to obtain second button attribute information corresponding to the second button configuration file.
在本发明实施例中,对第二按钮配置文件进行解析,得到第二按钮配置文件中包含的第二按钮属性信息。示例性的,第二按钮配置文件可以为从服务器中下载的按钮动态配置文件时,则从该按钮动态配置文件中,解析出按钮动态属性信息,并将该按钮动态属性信息作为第二按钮属性信息。第二按钮配置文件可以为当前界面中的按钮对应的按钮配置文件时,从该按钮配置文件中,解析出与当前界面中的按钮对应的按钮属性信息,作为第二按钮属性信息。其中,第二按钮属性信息也可以包括:按钮数量信息、按钮形状信息、按钮大小信息、按钮颜色信息、按钮位置信息和按钮动画信息中的至少一个。In the embodiment of the present invention, the second button configuration file is parsed to obtain the second button attribute information contained in the second button configuration file. Exemplarily, when the second button configuration file can be a button dynamic configuration file downloaded from the server, the button dynamic attribute information is parsed from the button dynamic configuration file, and the button dynamic attribute information is used as the second button attribute. information. When the second button configuration file may be a button configuration file corresponding to a button in the current interface, the button attribute information corresponding to the button in the current interface is parsed from the button configuration file as the second button attribute information. The second button attribute information may also include: at least one of button quantity information, button shape information, button size information, button color information, button position information, and button animation information.
S430、基于用户对第二按钮属性信息的更改指令,获取第一按钮属性信息。S430. Obtain the attribute information of the first button based on the user's instruction to change the attribute information of the second button.
可选的,第二按钮配置文件可以为从服务器中下载的按钮动态配置文件时,用户对当前界面(也可以理解为按钮配置界面)中的按钮的属性信息不满意,同时对从按钮动态配置文件中解析的按钮属性信息也存在部分不满意时,对解析出的第二按钮属性信息进行适应性修改,将修改后的第二按钮属性信息作为所述第一按钮属性信息。示例性的,当前界面中包含两个矩形按钮,两个矩形按钮的颜色均为黑色,而从服务器中下载的按钮动态配置文件(即第二按钮配置文件)中解析出的按钮属性信息为包含三个按钮,分别为两个红色圆形按钮和一个黄色的三角形按钮。用户对从按钮动态配置文件中解析出的按钮属性信息中包含的按钮数量及形状满意,但是对其颜色不满意时,则需要对解析出的按钮属性中的颜色属性信息进行修改。如将两个红色圆形按钮修改为一个黑色圆形按钮和一个蓝色圆形按钮,将黄色三角形按钮修改为绿色三角形按钮,而对其大小属性信息、形状属性信息、位置属性信息及动画属性信息不做修改。Optionally, when the second button configuration file can be a button dynamic configuration file downloaded from the server, the user is not satisfied with the attribute information of the button in the current interface (which can also be understood as the button configuration interface), and is not satisfied with the dynamic configuration from the button. When the parsed button attribute information in the file is also partially unsatisfactory, adaptively modify the parsed second button attribute information, and use the modified second button attribute information as the first button attribute information. Exemplarily, the current interface contains two rectangular buttons, and the color of the two rectangular buttons is black, and the button attribute information parsed from the button dynamic configuration file (that is, the second button configuration file) downloaded from the server contains Three buttons, two red circle buttons and one yellow triangle button. If the user is satisfied with the number and shape of buttons contained in the button attribute information parsed from the button dynamic configuration file, but is not satisfied with the color of the button, he needs to modify the color attribute information in the parsed button attribute. For example, if two red circular buttons are changed to a black circular button and a blue circular button, the yellow triangle button is changed to a green triangle button, and the size attribute information, shape attribute information, position attribute information and animation attribute information are changed. Information is not modified.
可选的,第二按钮配置文件可以为当前界面中的按钮对应的按钮配置文件时,用户对当前界面中的按钮的属性信息不满意时,直接对当前界面的按钮属性信息进行修改,将修改后的当前界面中的按钮属性信息作为第一按钮属性信息。示例性的,当前界面中包含一个圆形按钮,该圆形按钮的颜色均为灰色,直径为5mm,当前界面的左下方,且没有配置有动画属性信息。用户对当前界面中按钮的各个属性信息均不满意时,则可以直接对当前界面的按钮属性信息进行修改。例如将当前界面的按钮属性信息对应修改为两个正方形按钮,分别位于当前界面的左下角和右下角,边长均为8mm,颜色一个为红色,一个为蓝色,并为其设置弹跳的动画属性信息。Optionally, the second button configuration file may be the button configuration file corresponding to the button in the current interface, when the user is not satisfied with the attribute information of the button in the current interface, directly modify the button attribute information of the current interface, and modify the button attribute information of the current interface. The later button attribute information in the current interface is used as the first button attribute information. Exemplarily, the current interface includes a circular button, the color of the circular button is all gray, the diameter is 5 mm, the button is located at the lower left of the current interface, and no animation attribute information is configured. When the user is not satisfied with each attribute information of the button in the current interface, he can directly modify the button attribute information of the current interface. For example, the button attribute information of the current interface is correspondingly modified into two square buttons, which are located in the lower left corner and the lower right corner of the current interface respectively, the side lengths are both 8mm, the color is red and the color is blue, and a bouncing animation is set for them. property information.
S440、获取按钮配置界面信息。S440. Obtain button configuration interface information.
S450、根据第一按钮属性信息和按钮配置界面信息,生成第一按钮配置文件。S450. Generate a first button configuration file according to the first button attribute information and the button configuration interface information.
S460、调用第一按钮配置文件并运行,生成与第一按钮属性信息对应的按钮。S460, calling and running the first button configuration file to generate a button corresponding to the attribute information of the first button.
示例性的,图5为本发明实施例提供的基于按钮配置方法配置的按钮显示效果示意图。如图5所示,左图为按钮配置界面510中原有的按钮显示效果示意图,右图为基于本发明实施例提供的按钮配置方法,生成的按钮在按钮配置界面510上显示的效果示意图。Exemplarily, FIG. 5 is a schematic diagram of a button display effect configured based on a button configuration method provided by an embodiment of the present invention. As shown in FIG. 5 , the left picture is a schematic diagram of the original button display effect in the
本发明实施例提供的按钮配置方法,通过从获取的第二按钮配置文件中解析第二按钮属性信息,并基于对第二按钮属性信息的修改生成第一按钮属性信息,可以使设置的第一按钮属性信息更加符合用户需求,实现对按钮的个性化动态设置,而无需对用户界面的脚本代码进行二次开发,可以有效减少开发成本,提高用户的交互体验。In the button configuration method provided by the embodiment of the present invention, by parsing the second button attribute information from the acquired second button configuration file, and generating the first button attribute information based on the modification of the second button attribute information, the set first button attribute information can be The button attribute information is more in line with the user's needs, realizes the personalized dynamic setting of the button, without the need for secondary development of the script code of the user interface, which can effectively reduce the development cost and improve the user's interactive experience.
实施例五Embodiment 5
图6是本发明实施例五提供的一种按钮配置装置的结构示意图。如图6所示,所述装置包括:第一按钮属性信息获取模块610、第一按钮配置文件生成模块620以及按钮生成模块630,其中:FIG. 6 is a schematic structural diagram of a button configuration device according to Embodiment 5 of the present invention. As shown in FIG. 6 , the device includes: a first button attribute
第一按钮属性信息获取模块610,用于获取第一按钮属性信息;a first button attribute
第一按钮配置文件生成模块620,用于根据所述第一按钮属性信息生成第一按钮配置文件;a first button configuration
按钮生成模块630,用于调用所述第一按钮配置文件并运行,生成与所述第一按钮属性信息对应的按钮。The
本发明实施例提供的按钮配置装置,通过获取第一按钮属性信息,根据第一按钮属性信息生成第一按钮配置文件,然后调用第一按钮配置文件并运行,生成与第一按钮属性信息对应的按钮,可以实现对用户界面中的按钮进行个性化动态设置。由于可以根据获取到的按钮属性信息自动生成动态的按钮配置文件,配置按钮,而无需对用户界面的脚本代码进行二次开发,可以有效减少开发成本,提高用户的交互体验,满足用户个性化的按钮配置需求。The button configuration device provided by the embodiment of the present invention obtains first button attribute information, generates a first button configuration file according to the first button attribute information, and then invokes and runs the first button configuration file to generate a button corresponding to the first button attribute information. button, which can realize personalized dynamic settings for buttons in the user interface. Because the dynamic button configuration file can be automatically generated according to the obtained button attribute information, and the button can be configured without the need for secondary development of the script code of the user interface, which can effectively reduce the development cost, improve the user's interactive experience, and meet the user's personalized requirements. button configuration requirements.
可选的,所述第一按钮配置文件生成模块,包括:Optionally, the first button configuration file generation module includes:
按钮配置模板获取单元,用于获取按钮配置模板;The button configuration template obtaining unit is used to obtain the button configuration template;
第一按钮配置文件生成单元,用于根据所述第一按钮属性信息和所述按钮配置模板,生成第一按钮配置文件。A first button configuration file generating unit, configured to generate a first button configuration file according to the first button attribute information and the button configuration template.
可选的,所述第一按钮配置文件生成单元,用于:Optionally, the first button configuration file generating unit is used for:
将所述第一按钮属性信息添加至所述按钮配置模板,生成按钮类;adding the first button attribute information to the button configuration template to generate a button class;
基于所述按钮类生成所述第一按钮配置文件。The first button configuration file is generated based on the button class.
可选的,所述第一按钮配置文件生成模块,用于:Optionally, the first button configuration file generation module is used for:
获取按钮配置界面信息;Get button configuration interface information;
根据所述第一按钮属性信息和所述按钮配置界面信息,生成第一按钮配置文件。A first button configuration file is generated according to the first button attribute information and the button configuration interface information.
可选的,所述第一按钮属性信息获取模块,用于:Optionally, the first button attribute information acquisition module is used for:
当接收到用户输入的按钮配置指令时,获取第二按钮配置文件;When receiving the button configuration instruction input by the user, obtain the second button configuration file;
解析所述第二按钮配置文件,得到与所述第二按钮配置文件对应的第二按钮属性信息;Parsing the second button configuration file to obtain second button attribute information corresponding to the second button configuration file;
基于用户对所述第二按钮属性信息的更改指令,获取第一按钮属性信息。The first button attribute information is acquired based on the user's instruction to change the second button attribute information.
可选的,所述第一按钮属性信息包括:按钮数量信息、按钮形状信息、按钮大小信息、按钮颜色信息、按钮位置信息和按钮动画信息中的至少一个。Optionally, the first button attribute information includes: at least one of button quantity information, button shape information, button size information, button color information, button position information and button animation information.
实施例六Embodiment 6
本发明实施例六提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于按钮配置方法,该方法包括:Embodiment 6 of the present invention provides a storage medium containing computer-executable instructions, where the computer-executable instructions are used for a button configuration method when executed by a computer processor, and the method includes:
获取第一按钮属性信息;Get the first button attribute information;
根据所述第一按钮属性信息生成第一按钮配置文件;Generate a first button configuration file according to the first button attribute information;
调用所述第一按钮配置文件并运行,生成与所述第一按钮属性信息对应的按钮。The first button configuration file is called and executed to generate a button corresponding to the attribute information of the first button.
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDRRAM、SRAM、EDORAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape devices; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc.; non-volatile Volatile memory, such as flash memory, magnetic media (eg hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a second, different computer system connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (eg, in different computer systems connected by a network). The storage medium may store program instructions (eg, embodied as a computer program) executable by one or more processors.
当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的按钮配置操作,还可以执行本发明任意实施例所提供的按钮配置方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by the embodiments of the present invention is not limited to the above-mentioned button configuration operation, and can also execute any of the button configuration methods provided in any embodiment of the present invention. related operations.
实施例七Embodiment 7
图7为本发明实施例七提供一种智能终端的结构示意图,如图7所示,该智能终端可以包括:壳体(图中未示出)、存储器701、中央处理器(central processing unit,CPU)702(又称处理器,以下简称CPU)、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU702和所述存储器701设置在所述电路板上;所述电源电路,用于为所述智能终端的各个电路或器件供电;所述存储器701,用于存储可执行程序代码;所述CPU702通过读取所述存储器701中存储的可执行程序代码来运行与所述可执行程序代码对应的计算机程序,以实现以下步骤:FIG. 7 is a schematic structural diagram of an intelligent terminal according to Embodiment 7 of the present invention. As shown in FIG. 7 , the intelligent terminal may include: a casing (not shown in the figure), a
获取第一按钮属性信息;Get the first button attribute information;
根据所述第一按钮属性信息生成第一按钮配置文件;Generate a first button configuration file according to the first button attribute information;
调用所述第一按钮配置文件并运行,生成与所述第一按钮属性信息对应的按钮。The first button configuration file is called and executed to generate a button corresponding to the attribute information of the first button.
所述智能终端还包括:外设接口703、RF(Radio Frequency,射频)电路705、音频电路706、扬声器711、电源管理芯片708、输入/输出(I/O)子系统709、其他输入/控制设备710、触摸屏712、其他输入/控制设备710以及外部端口704,这些部件通过一个或多个通信总线或信号线707来通信。The smart terminal further includes: a
应该理解的是,图示智能终端700仅仅是智能终端的一个范例,并且智能终端700可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated
下面就本实施例提供的用于按钮配置的智能终端进行详细的描述,该智能终端以手机为例。The following will describe in detail the smart terminal for button configuration provided in this embodiment, where a mobile phone is used as an example for the smart terminal.
存储器701,所述存储器701可以被CPU702、外设接口703等访问,所述存储器701可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口703,所述外设接口703可以将设备的输入和输出外设连接到CPU702和存储器701。A
I/O子系统709,所述I/O子系统709可以将设备上的输入输出外设,例如触摸屏712和其他输入/控制设备710,连接到外设接口703。I/O子系统709可以包括显示控制器7091和用于控制其他输入/控制设备710的一个或多个输入控制器7092。其中,一个或多个输入控制器7092从其他输入/控制设备710接收电信号或者向其他输入/控制设备710发送电信号,其他输入/控制设备710可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器7092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/
触摸屏712,所述触摸屏712是用户智能终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。The
I/O子系统709中的显示控制器7091从触摸屏712接收电信号或者向触摸屏712发送电信号。触摸屏712检测触摸屏上的接触,显示控制器7091将检测到的接触转换为与显示在触摸屏712上的用户界面对象的交互,即实现人机交互,显示在触摸屏712上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路705,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路705接收并发送RF信号,RF信号也称为电磁信号,RF电路705将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路705可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The
音频电路706,主要用于从外设接口703接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器711。The
扬声器711,用于将手机通过RF电路705从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 711 is used to restore the voice signal received by the mobile phone from the wireless network through the
电源管理芯片708,用于为CPU702、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The
上述实施例中提供的按钮配置装置、存储介质及智能终端可执行本发明实施例所提供的对应的按钮配置方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本发明任意实施例所提供的按钮配置方法。The button configuration device, storage medium and intelligent terminal provided in the above embodiments can execute the corresponding button configuration method provided by the embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in the above embodiments, reference may be made to the button configuration method provided by any embodiment of the present invention.
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present invention and applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope is determined by the scope of the appended claims.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711317278.1A CN107992302B (en) | 2017-12-12 | 2017-12-12 | Button configuration method and device, storage medium and intelligent terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711317278.1A CN107992302B (en) | 2017-12-12 | 2017-12-12 | Button configuration method and device, storage medium and intelligent terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107992302A CN107992302A (en) | 2018-05-04 |
| CN107992302B true CN107992302B (en) | 2020-09-22 |
Family
ID=62035918
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711317278.1A Active CN107992302B (en) | 2017-12-12 | 2017-12-12 | Button configuration method and device, storage medium and intelligent terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107992302B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111142767B (en) | 2019-12-16 | 2021-06-01 | 华为技术有限公司 | A custom button method, device and storage medium for a folding device |
| CN111427567B (en) * | 2020-03-20 | 2023-08-18 | 杭州涂鸦信息技术有限公司 | Intelligent product rapid generation method, system and equipment thereof |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101192254B (en) * | 2006-12-13 | 2010-06-09 | 腾讯科技(深圳)有限公司 | Push button configuration system and push button configuration method |
| CN101295249B (en) * | 2008-06-26 | 2010-12-15 | 腾讯科技(深圳)有限公司 | Method and system for dynamic configuration management of software interface style |
| CN102981855A (en) * | 2012-11-23 | 2013-03-20 | 蓝盾信息安全技术股份有限公司 | Template-based interface autogeneration method and system |
| CN103440326A (en) * | 2013-09-02 | 2013-12-11 | 百度在线网络技术(北京)有限公司 | Method and apparatus for providing representation information |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2002326A4 (en) * | 2006-02-10 | 2009-08-26 | Freedom Scientific Inc | Graphic user interface control object stylization |
-
2017
- 2017-12-12 CN CN201711317278.1A patent/CN107992302B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101192254B (en) * | 2006-12-13 | 2010-06-09 | 腾讯科技(深圳)有限公司 | Push button configuration system and push button configuration method |
| CN101295249B (en) * | 2008-06-26 | 2010-12-15 | 腾讯科技(深圳)有限公司 | Method and system for dynamic configuration management of software interface style |
| CN102981855A (en) * | 2012-11-23 | 2013-03-20 | 蓝盾信息安全技术股份有限公司 | Template-based interface autogeneration method and system |
| CN103440326A (en) * | 2013-09-02 | 2013-12-11 | 百度在线网络技术(北京)有限公司 | Method and apparatus for providing representation information |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107992302A (en) | 2018-05-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10831314B2 (en) | Method and electronic device for preventing touch button from being false triggered | |
| CN113613064B (en) | Video processing method, device, storage medium and terminal | |
| CN109495871B (en) | Bluetooth connection control method, electronic device and computer readable storage medium | |
| CN107835322A (en) | Interface display method, device, storage medium and terminal equipment | |
| US20150301730A1 (en) | Object Suspension Realizing Method and Device | |
| CN106782431A (en) | A kind of screen backlight brightness adjusting method, device and mobile terminal | |
| CN109003194B (en) | Comment sharing method, terminal and storage medium | |
| US20180316745A1 (en) | Terminal apparatus and server and method of controlling the same | |
| CN108829320A (en) | Interaction method, device, storage medium, mobile terminal and interaction system | |
| CN108933968B (en) | A message format conversion method, device, storage medium and Android terminal | |
| CN106776385A (en) | A kind of transmission method, device and terminal of log log information | |
| CN107678823A (en) | Mobile terminal application control method, device and storage medium, and mobile terminal | |
| CN106817753B (en) | Method and device for saving electricity by switching background gray scales and mobile terminal | |
| CN113590072A (en) | Split screen display method and device | |
| CN106710535A (en) | A screen backlight adjustment method, device and mobile terminal | |
| CN112274910A (en) | Virtual key configuration method, virtual key method and related device | |
| US20150109210A1 (en) | Control method, and input device of touch screen terminal | |
| CN107992302B (en) | Button configuration method and device, storage medium and intelligent terminal | |
| CN113515279B (en) | Dial generation method, device, electronic device, smart watch and storage medium | |
| CN106506646A (en) | Playing device control method, device, mobile terminal and playing system | |
| CN106936994A (en) | A kind of control method of broadcast recipients, device and mobile terminal | |
| CN104254020B (en) | The player method of media data, device and terminal | |
| CN106484260A (en) | A kind of applied program processing method of mobile terminal, device and mobile terminal | |
| CN115905742A (en) | A data display method, device, equipment and storage medium | |
| CN107526597A (en) | User interface edit methods, device, terminal and computer-readable recording medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20210618 Address after: 2501, China energy storage building, 3099 Keyuan South Road, high tech community, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000 Patentee after: Shenzhen orange Digital Technology Co.,Ltd. Address before: 23 / F, China energy storage building, 3099 Keyuan South Road, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000 Patentee before: SHENZHEN QIANHAI JUZI INFORMATION TECHNOLOGY Co.,Ltd. |