TW201828020A - Method, device and smart apparatus for setting interface element attribute value capable of solving problems of consuming more terminal resources caused by a method of changing terminal interface element in the prior art - Google Patents

Method, device and smart apparatus for setting interface element attribute value capable of solving problems of consuming more terminal resources caused by a method of changing terminal interface element in the prior art Download PDF

Info

Publication number
TW201828020A
TW201828020A TW106102486A TW106102486A TW201828020A TW 201828020 A TW201828020 A TW 201828020A TW 106102486 A TW106102486 A TW 106102486A TW 106102486 A TW106102486 A TW 106102486A TW 201828020 A TW201828020 A TW 201828020A
Authority
TW
Taiwan
Prior art keywords
attribute value
attribute
interface element
setting message
application
Prior art date
Application number
TW106102486A
Other languages
Chinese (zh)
Inventor
盧緒書
阮空
李瑞杰
田俊林
Original Assignee
阿里巴巴集團服務有限公司
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 阿里巴巴集團服務有限公司 filed Critical 阿里巴巴集團服務有限公司
Priority to TW106102486A priority Critical patent/TW201828020A/en
Publication of TW201828020A publication Critical patent/TW201828020A/en

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The present invention discloses a method, a device and an smart apparatus for setting interface element attribute values, which are used to solve the problem that the interface element of the terminal is changed according to the prior art, which leads to more resources consumption of the terminal. The method includes: obtaining an attribute value setting message; the attribute value setting message includes an attribute value; and sending an attribute value setting message, so that the receiving party of the attribute value setting message assigns a value according to the attribute applied to the interface by the attribute value.

Description

介面元素屬性值的設置方法、裝置及智慧型設備  Method, device and intelligent device for setting interface element attribute value  

本發明係關於計算機技術領域,尤其係關於一種界面元素屬性值的設置方法、裝置及智慧設備。 The invention relates to the field of computer technology, in particular to a method, a device and a smart device for setting an attribute value of an interface element.

現有技術中,界面元素顯示效果的改變,一般是依靠下載的資源包(或稱為主題包)來實現的。使用者終端需要先將滿足需求的資源包下載到本地,若應用需要調整界面元素的顯示效果,會加載對應的資源包以實現整體終端界面顯示的改變。 In the prior art, the change of the display effect of the interface element is generally implemented by relying on a downloaded resource package (or a theme package). The user terminal needs to download the resource package that meets the requirement to the local device first. If the application needs to adjust the display effect of the interface element, the corresponding resource package is loaded to implement the change of the overall terminal interface display.

上述方法存在的缺陷在於:如果要改變界面元素的顯示效果,需要下載資源包,該資源包一般是為終端整體界面而設計,會包括支持終端整體界面改變所需要的全部資源,因此,下載和加載該資源包會耗費終端較多的資源。 The disadvantage of the above method is that if the display effect of the interface element is to be changed, the resource package needs to be downloaded. The resource package is generally designed for the overall interface of the terminal, and includes all the resources needed to support the overall interface change of the terminal. Therefore, the download and Loading the resource bundle will consume more resources on the terminal.

本發明實施例提供一種界面元素屬性值的設置方法,用以解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題。 The embodiment of the present invention provides a method for setting an attribute value of an interface element, which is used to solve the problem that the interface element of the terminal is changed according to the prior art, which may result in more resources consumed by the terminal.

本發明實施例還提供一種界面元素屬性值的設置裝置,用以解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題。 The embodiment of the present invention further provides a device for setting an interface element attribute value, which is used to solve the problem that the interface element of the terminal is changed according to the prior art, which may result in more resources consumed by the terminal.

本發明實施例還提供一種智慧設備,用以解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題。 The embodiment of the present invention further provides a smart device for solving the problem that the interface element of the terminal is changed according to the prior art, which causes the terminal to consume more resources.

本發明實施例採用下述技術方案:一種界面元素屬性值的設置方法,包括:獲得屬性值設置消息;所述屬性值設置消息中,包含屬性值;發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。 The embodiment of the present invention adopts the following technical solution: a method for setting an attribute value of an interface element, comprising: obtaining an attribute value setting message; the attribute value setting message includes an attribute value; and sending an attribute value setting message to enable the attribute The recipient application of the value setting message assigns an attribute of the interface element according to the attribute value.

一種界面元素屬性值的設置方法,包括:應用接收屬性值設置消息;所述屬性值設置消息中,包含屬性值;根據所述屬性值,為所述應用的界面元素的屬性賦值。 A method for setting an interface element attribute value includes: an application receiving attribute value setting message; the attribute value setting message includes an attribute value; and assigning a value to the attribute of the application interface element according to the attribute value.

一種界面元素屬性值的設置裝置,包括:消息獲得單元,用於獲得屬性值設置消息;所述屬性值設置消息中,包含屬性值;消息發送單元,用於發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。 A device for setting an attribute value of an interface element, comprising: a message obtaining unit, configured to obtain an attribute value setting message; the attribute value setting message includes an attribute value; and a message sending unit, configured to send an attribute value setting message, so as to The receiver application of the attribute value setting message assigns an attribute of the interface element according to the attribute value.

一種界面元素屬性值的設置裝置,包括:消息接收單元,用於接收屬性值設置消息;所述屬性 值設置消息中,包含屬性值;賦值單元,用於根據所述屬性值,為應用的界面元素的屬性賦值。 An apparatus for setting an attribute value of an interface element, comprising: a message receiving unit, configured to receive an attribute value setting message; the attribute value setting message includes an attribute value; and an assigning unit, configured to be an interface of the application according to the attribute value The attribute assignment of the element.

一種智慧設備,包括:記憶體,用於儲存計算機程式指令;處理器,耦合到所述記憶體,用於讀取所述記憶體儲存的計算機程式指令,並作為回應,執行如下操作:獲得屬性值設置消息;所述屬性值設置消息中,包含屬性值;發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。 A smart device comprising: a memory for storing computer program instructions; a processor coupled to the memory for reading computer program instructions stored in the memory, and in response, performing the following operations: obtaining attributes a value setting message; the attribute value setting message includes an attribute value; and the attribute value setting message is sent to enable the recipient application of the attribute value setting message to assign an attribute of the interface element according to the attribute value.

一種智慧設備,包括:記憶體,用於儲存計算機程式指令;處理器,耦合到所述記憶體,用於讀取所述記憶體儲存的計算機程式指令,並作為回應,執行如下操作:接收屬性值設置消息;所述屬性值設置消息中,包含屬性值;根據所述屬性值,為所述應用的界面元素的屬性賦值。 A smart device comprising: a memory for storing computer program instructions; a processor coupled to the memory for reading computer program instructions stored in the memory, and in response, performing the following operations: receiving attributes a value setting message; the attribute value setting message includes an attribute value; and according to the attribute value, assigning a value to an attribute of the interface element of the application.

本發明實施例採用的上述至少一個技術方案能夠達到以下有益效果:由於可以通過向應用發送屬性值設置消息的方式,使得應用根據屬性值設置消息中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而可以避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 The above at least one technical solution adopted by the embodiment of the present invention can achieve the following beneficial effects: since the attribute value setting message can be sent to the application, the application sets the attribute of the interface element according to the attribute value in the attribute value setting message, without downloading and The resource package is loaded, so that it is possible to avoid changing the interface elements of the terminal, which may result in a problem that the terminal consumes more resources.

41‧‧‧消息接收單元 41‧‧‧Message receiving unit

42‧‧‧賦值單元 42‧‧‧Assignment unit

51‧‧‧消息獲得單元 51‧‧‧Message Acquisition Unit

52‧‧‧消息發送單元 52‧‧‧Message sending unit

此處所說明的附圖用來提供對本發明的進一步理解,構成本發明的一部分,本發明的示意性實施例及其說明用於解釋本發明,並不構成對本發明的不當限定。在附圖中:圖1a為本發明實施例提供的一種界面元素屬性值的設置方法的具體實現流程圖;圖1b為不同界面元素設置界面元素標識的示意圖;圖2為本發明實施例提供的一種界面元素屬性值的設置方法的具體實現流程圖;圖3為本發明實施例提供的一種對應用的界面元素的顏色值進行設置的方法;圖4為本發明實施例提供的一種界面元素屬性值的設置裝置的具體結構示意圖;圖5為本發明實施例提供的一種界面元素屬性值的設置裝置的具體結構示意圖。 The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the accompanying drawings: FIG. 1a is a flowchart of a specific implementation of a method for setting an attribute value of an interface element according to an embodiment of the present invention; FIG. 1b is a schematic diagram of setting an interface element identifier for different interface elements; A specific implementation flowchart of a method for setting an interface element attribute value; FIG. 3 is a method for setting a color value of an interface element of an application according to an embodiment of the present invention; FIG. 4 is an interface element attribute provided by an embodiment of the present invention; FIG. 5 is a schematic diagram of a specific structure of an apparatus for setting an attribute value of an interface element according to an embodiment of the present invention.

為使本發明的目的、技術方案和優點更加清楚,下面將結合本發明具體實施例及相應的附圖對本發明技術方案進行清楚、完整地描述。顯然,所描述的實施例僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域之通常知識者在沒有做出創造性勞動前提 下所獲得的所有其他實施例,都屬□本發明保護的範圍。 The technical solutions of the present invention will be clearly and completely described in conjunction with the specific embodiments of the present invention and the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.

以下結合附圖,詳細說明本發明各實施例提供的技術方案。 The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

實施例1  Example 1  

為解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題,本發明實施例提供一種界面元素屬性值的設置方法。該方法的執行主體可以是使用者終端安裝的各種應用,例如,使用者終端的作業系統自帶的應用(基礎應用),或者是除基礎應用外的其他應用(第三方應用)。所述的執行主體並不構成對本發明的限定,為了便於描述,本發明實施例均以執行主體是第三方應用為例進行說明。 In order to solve the problem that the interface elements of the terminal are changed according to the prior art, the method of setting the attribute value of the interface element is provided. The execution body of the method may be various applications installed by the user terminal, for example, an application (basic application) provided by the operating system of the user terminal, or other applications (third party applications) other than the basic application. The embodiments of the present invention are not limited to the description of the present invention. For the convenience of description, the embodiments of the present invention are described by taking an execution subject as a third-party application as an example.

可以理解,該方法的執行主體為第三方應用只是一種示例性的說明,並不應理解為對該方法的限定。 It can be understood that the execution subject of the method is only an exemplary description of the third-party application, and should not be construed as limiting the method.

如圖1a所示,為本發明實施例提供的該界面元素屬性值的設置方法的具體實現流程圖,主要包括下述步驟:步驟11,第三方應用接收屬性值設置消息;其中,該屬性值設置消息中,一般可以包含屬性值。本發明實施例中,對該消息中包含的屬性值的數量不進行限定。 As shown in FIG. 1a, a specific implementation flowchart of a method for setting an attribute value of the interface element according to an embodiment of the present invention mainly includes the following steps: Step 11: A third-party application receives an attribute value setting message, where the attribute value is In the setup message, you can generally include attribute values. In the embodiment of the present invention, the number of attribute values included in the message is not limited.

該消息中包含的屬性值,可以是顏色值、亮度值和透明度值中的至少一種。 The attribute value included in the message may be at least one of a color value, a brightness value, and a transparency value.

該消息中包含的屬性值,可以用於為界面元素的屬性 進行賦值。所述屬性,一般為與顯示效果相關的屬性,比如可以是顏色、亮度以及透明度中的至少一種。為界面元素的屬性進行賦值,比如可以但不限於是指對作為界面元素背景圖片的圖片的屬性進行賦值。該圖片的大小和形狀,可以是根據界面元素的預期顯示效果來設置的。該圖片可以是位圖,也可以是矢量圖。該圖片可以具備,也可以不具備紋理特徵或形狀特徵,本發明實施例對此不作限定。所述界面元素,比如可以但不限於包括按鈕、標題、工具欄、選擇框、開關、滑塊、進度條或輸入框等可以借助圖片作為背景從而達到預定顯示效果的界面元素中的至少一種。 The attribute value contained in the message can be used to assign values to the attributes of the interface element. The attribute is generally an attribute related to a display effect, such as at least one of color, brightness, and transparency. Assigning an attribute of an interface element, such as, but not limited to, assigning an attribute of a picture as a background image of the interface element. The size and shape of the image can be set according to the expected display effect of the interface element. The image can be a bitmap or a vector. The image may or may not have a texture feature or a shape feature, which is not limited in the embodiment of the present invention. The interface element may be, for example, but not limited to, at least one of a button element including a button, a title, a toolbar, a selection box, a switch, a slider, a progress bar, or an input box, which can be used as a background by the picture to achieve a predetermined display effect.

該屬性值設置消息,可以是作業系統發送的,也可以是其他應用發送給該第三方應用的。該屬性值設置消息可以是採用廣播的方式發送的,也可以是定向發送給第三方應用的。該屬性值設置消息中,可以包含第三方應用的標識,從而使得第三方應用可以根據該標識,確定自身可以對該屬性值設置消息進行回應。 The attribute value setting message may be sent by the operating system or sent by other applications to the third-party application. The attribute value setting message may be sent by broadcast or directed to a third party application. The attribute value setting message may include an identifier of the third-party application, so that the third-party application can determine, according to the identifier, that it can respond to the attribute value setting message.

本發明實施例中,屬性值設置消息可以由預先設置的介面提供方產生。該介面提供方,可以提供界面元素屬性調整介面(該介面的名稱可以為COLOR_CHANGE)。該介面提供方所提供的該介面一旦被調用,則該介面提供方會產生包含所述屬性值的屬性值設置消息;然後,該介面提供方可以調用消息發送第一介面(該介面的名稱可以為updateConfigruation),向作業系統發送屬性值設置消 息。而作業系統,則可以調用消息發送第二介面(該介面的名稱可以為onConfigruationChange/onCreate),向所述第三方應用發送屬性值設置消息。 In the embodiment of the present invention, the attribute value setting message may be generated by a preset interface provider. The interface provider can provide an interface element property adjustment interface (the name of the interface can be COLOR_CHANGE). Once the interface provided by the interface provider is invoked, the interface provider generates an attribute value setting message including the attribute value; then, the interface provider can invoke the message to send the first interface (the name of the interface can be For updateConfigruation), send a property value setting message to the operating system. And the operating system can call the message sending second interface (the name of the interface can be onConfigruationChange/onCreate), and send the attribute value setting message to the third party application.

或者,本發明實施例中,屬性值設置消息也可以由作業系統產生。比如,作業系統可以在指定的觸發條件的觸發下,產生屬性值設置消息。所述指定的觸發條件,比如可以為:接收到壁紙設置指令,或接收到主題設置指令,或接收到伺服器發送的屬性值調整通知。其中需要說明的是,主題設置指令,可以是指使用者對使用者終端提供的主題設置選項進行選取而觸發的。 Alternatively, in the embodiment of the present invention, the attribute value setting message may also be generated by the operating system. For example, the operating system can generate an attribute value setting message triggered by a specified trigger condition. The specified triggering condition may be, for example, receiving a wallpaper setting instruction, or receiving a theme setting instruction, or receiving an attribute value adjustment notification sent by the server. It should be noted that the theme setting instruction may be triggered by the user selecting a theme setting option provided by the user terminal.

所述主題設置選項,可以是針對不同顏色主題設置的可操作選項。使用者對所述選項進行操作,比如執行點擊指令或者手勢指令,可以觸發所述主題設置指令。 The theme setting options may be operable options set for different color themes. The user can operate the option, such as executing a click command or a gesture command, to trigger the theme setting instruction.

本發明實施例中,作業系統可以根據預設的屬性值或者獲取到的屬性值,產生包含該屬性值的屬性值設置消息。以屬性值為透明度值為例,作業系統可以獲取預先設置的透明度值,並根據獲取到的透明度值,產生包含該透明度值的屬性值設置消息;以屬性值為顏色值為例,作業系統可以根據下述資訊中的至少一種,確定目標顏色值,,並根據確定的目標顏色值,產生包含目標顏色值的屬性值設置消息: 指定圖片;指定事件;使用者選取的顏色值。 In the embodiment of the present invention, the operating system may generate an attribute value setting message including the attribute value according to the preset attribute value or the acquired attribute value. Taking the attribute value as the transparency value, the operating system can obtain the preset transparency value, and according to the obtained transparency value, generate an attribute value setting message including the transparency value; taking the attribute value as a color value, the operating system can The target color value is determined according to at least one of the following information, and an attribute value setting message including the target color value is generated according to the determined target color value: a specified picture; a specified event; a color value selected by the user.

所述的圖片,一般是指可用於界面元素的背景圖片的圖片。該圖片的大小和形狀,可以是根據界面元素的預期 顯示效果來設置的。該圖片可以是位圖,也可以是矢量圖。該圖片可以具備,也可以不具備紋理特徵或形狀特徵,本發明實施例對此不作限定。 The picture generally refers to a picture that can be used for the background picture of the interface element. The size and shape of the image can be set based on the expected display of the interface element. The image can be a bitmap or a vector. The image may or may not have a texture feature or a shape feature, which is not limited in the embodiment of the present invention.

以下分別介紹作業系統如何根據上述至少一種資訊,確定目標顏色值: The following describes how the operating system determines the target color value based on at least one of the above information:

1、根據指定圖片,確定目標顏色值。 1. Determine the target color value according to the specified picture.

其中,所述指定圖片,比如可以是使用者終端本地保存的任意圖片。如,可以是使用者終端當前使用的壁紙,或者,可以是使用者指定的某個圖片。 The specified picture may be any picture saved locally by the user terminal. For example, it may be a wallpaper currently used by the user terminal, or may be a certain picture specified by the user.

所述壁紙,可以是桌面壁紙,也可以是鎖屏壁紙,等等。 The wallpaper may be a desktop wallpaper, a lock screen wallpaper, or the like.

針對所述使用者指定的某個圖片而言,該圖片比如可以是使用者終端回應於接收到的圖片選取指令而確定的某個圖片。該圖片選取指令,比如可以是針對圖片的點擊指令或者手勢指令。 For a certain picture specified by the user, the picture may be, for example, a certain picture determined by the user terminal in response to the received picture selection instruction. The picture selection instruction may be, for example, a click command or a gesture instruction for the picture.

所述指定圖片可以為位圖。當所述指定圖片為位圖時,所述指定圖片的各個像素具備顏色值,像素具備的顏色值也可稱像素顏色值。各像素顏色值,均可以但不限於由一個或多個紅綠藍(Red Green Blue,RGB)數組表示,或者由根據RGB數組確定出的一個或多個參數值表示,等等。 The specified picture may be a bitmap. When the specified picture is a bitmap, each pixel of the specified picture has a color value, and the color value of the pixel may also be referred to as a pixel color value. Each pixel color value may be, but is not limited to, represented by one or more Red Green Blue (RGB) arrays, or represented by one or more parameter values determined from the RGB array, and the like.

所述目標顏色值,可以是根據所述指定圖片的像素顏色值確定的至少一個顏色值。具體而言,使用者終端可以將所述指定圖片的某個像素顏色值,確定為目標顏色值; 或者,使用者終端也可以計算所述指定圖片的所有像素顏色值的均值,並將該均值確定為目標顏色值;或者,使用者終端還可以統計所述指定圖片中具備不同顏色值的像素的數量,並將統計出的所有數量中的最大數量所對應的顏色值,作為目標顏色值;或者,使用者終端還可以確定用於表示所述指定圖片的主色調的像素顏色值,並將該像素顏色值確定為目標顏色值;等等。 The target color value may be at least one color value determined according to a pixel color value of the specified picture. Specifically, the user terminal may determine a certain pixel color value of the specified picture as the target color value; or the user terminal may calculate an average value of all pixel color values of the specified picture, and the average value Determining as the target color value; or, the user terminal may further count the number of pixels having different color values in the specified picture, and use the color value corresponding to the largest number of all the counted numbers as the target color value; Alternatively, the user terminal may further determine a pixel color value for indicating a dominant color of the specified picture, and determine the pixel color value as a target color value;

所述指定圖片的像素顏色值,可以但不限於是使用者終端通過對所述指定圖片的像素的顏色值進行採樣而獲得的。 The pixel color value of the specified picture may be, but is not limited to, obtained by the user terminal by sampling the color value of the pixel of the specified picture.

其中,上述“主色調”表示色彩外觀的基本傾向。具體而言,一幅圖片雖然用了多種顏色,但圖片在色彩總體上是有一種傾向的,比如是偏藍或偏紅,是偏暖或偏冷等等,色彩外觀的基本傾向就是一幅圖片的主色調。通常,主色調從冷暖方面進行劃分,可以有“暖色調”、“冷色調”和“中間色調”。一般地,紅色、橙色、黃色為表示暖色調;綠色、藍色、黑色表示冷色調;而灰色、紫色、白色則表示中間色調。冷色調的亮度越高,其整體感覺越偏暖,暖色調的亮度越高,其整體感覺越偏冷。 Among them, the above "primary color tone" indicates a basic tendency of color appearance. Specifically, although a picture uses a variety of colors, the picture has a tendency in color overall, such as bluish or reddish, warm or cold, etc. The basic tendency of color appearance is a picture. The main color of the picture. Generally, the main color is divided from the warm and cold side, and there may be "warm tone", "cold tone" and "middle tone". Generally, red, orange, and yellow indicate warm colors; green, blue, and black indicate cool colors; and gray, purple, and white indicate intermediate colors. The higher the brightness of the cool color, the warmer the overall feeling, the higher the brightness of the warm color, the colder the overall feeling.

2、根據指定事件,確定目標顏色值。 2. Determine the target color value based on the specified event.

這裡所說的指定事件,比如可以是與時間有關的事件,如節假日到來,或者使用者生日到來,等等;或者,也可以是使用者終端發生的事件,如使用者終端接收到指定連絡人的短消息、使用者終端進行訂單支付或者使用者 終端獲取到指定類型的天氣(如晴天或陰天)的預報資訊,等等。 The specified event mentioned here may be, for example, an event related to time, such as the arrival of a holiday, or the arrival of a user's birthday, etc.; or, may be an event occurring at the user terminal, such as receiving a designated contact by the user terminal. Short message, user terminal to make an order payment or user terminal to obtain forecast information of a specified type of weather (such as sunny or cloudy days), and the like.

在當前存在指定事件時,可以根據各指定事件與顏色值的映射關係,確定與當前存在的該指定事件映射的顏色值作為目標顏色值。 When the specified event currently exists, the color value mapped to the currently existing specified event may be determined as the target color value according to the mapping relationship between each specified event and the color value.

3、根據使用者選取的顏色值,確定目標顏色值。 3. Determine the target color value according to the color value selected by the user.

比如,可以顯示包括至少兩種顏色的顏色值界面;後續根據使用者對顯示的該顏色值界面中包括的顏色的選擇,確定相應的顏色值作為目標顏色值。 For example, a color value interface including at least two colors may be displayed; subsequently, the corresponding color value is determined as the target color value according to the user's selection of the color included in the displayed color value interface.

步驟12,第三方應用根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性。 Step 12: The third-party application sets the attribute value of the interface element of the third-party application according to the attribute value set by the attribute value.

第三方應用可以直接根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性;或者,第三方應用可以判斷是否能夠根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性;在判斷結果是時,根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性,否則,可以拒絕根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性--比如,可以通過丟棄該屬性值設置消息,從而實現拒絕根據該消息包含的屬性值為第三方應用的界面元素的屬性賦值。 The third-party application can directly set the attribute value of the interface element of the third-party application according to the attribute value setting attribute value of the message; or the third-party application can determine whether the attribute value included in the message can be set according to the attribute value, and the interface of the third-party application is set. The attribute of the element; when the judgment result is yes, set the attribute value contained in the message according to the attribute value, and set the attribute of the interface element of the third-party application; otherwise, it may refuse to set the attribute value included in the message according to the attribute value, and set the interface of the third-party application. The attribute of the element -- for example, the message can be set by discarding the attribute value, thereby deny the attribute assignment of the interface element of the third-party application based on the attribute value contained in the message.

本發明實施例中,第三方應用可以採用但不限於下述任何一種方式,實現判斷是否能夠根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性: In the embodiment of the present invention, the third-party application may use, but is not limited to, any one of the following methods to determine whether the attribute value of the interface element of the third-party application is set according to the attribute value set by the attribute value setting message:

第一種方式:第三方應用獲取預先設置並保存的界面 元素屬性調整規則,並判斷所述規則是否允許第三方應用根據屬性值設置消息包含的屬性值設置界面元素的屬性;若是,則判定能夠根據所述屬性值設置界面元素的屬性;若否,則判定不能夠根據所述屬性值設置界面元素的屬性。 The first method: the third-party application obtains the pre-set and saved interface element attribute adjustment rule, and determines whether the rule allows the third-party application to set the attribute of the interface element according to the attribute value of the attribute value setting message; if yes, the determination can The attribute of the interface element is set according to the attribute value; if not, it is determined that the attribute of the interface element cannot be set according to the attribute value.

所述規則,可以由第三方應用的開發者設置,並保存在第三方應用的資料庫中。 The rules can be set by the developer of the third party application and saved in the database of the third party application.

第二種方式:第三方應用判斷所述屬性值設置消息包含的屬性值,是否適用于第三方應用的界面元素;若是,則判定能夠根據所述屬性值設置界面元素的屬性;若否,則判定不能夠根據所述屬性值設置界面元素的屬性。 The second method: the third-party application determines whether the attribute value included in the attribute value setting message is applicable to the interface element of the third-party application; if yes, determines that the attribute of the interface element can be set according to the attribute value; if not, then It is determined that the attribute of the interface element cannot be set according to the attribute value.

比如,所述屬性值設置消息中除了包含屬性值外,還可以包含與屬性值相映射的界面元素標識。在這樣的情況下,當第三方應用接收到屬性值設置消息後,屬性值設置消息中包含的界面元素標識中,是否存在與第三方應用的界面元素標識相同的界面元素標識。若判斷結果為存在,則可以判定可以根據所述屬性值設置消息中包含的屬性值設置界面元素的屬性;若判斷結果為不存在,則判定不能夠根據所述屬性值設置界面元素的屬性。 For example, the attribute value setting message may include an interface element identifier mapped to the attribute value in addition to the attribute value. In this case, after the third-party application receives the attribute value setting message, whether there is an interface element identifier that is the same as the interface element identifier of the third-party application in the interface element identifier included in the attribute value setting message. If the determination result is that, it may be determined that the attribute of the interface element may be set according to the attribute value included in the attribute value setting message; if the determination result is not present, it is determined that the attribute of the interface element cannot be set according to the attribute value.

本發明實施例中,所述屬性值設置消息中包含的界面元素標識,可以是預先根據界面元素對應的界面功能而設置的界面元素標識。比如,可以針對不同應用的界面元素進行歸類整理,確定出諸如標題區域、控件區域、工具欄等對應於不同界面功能的界面元素;之後, 可以為這些界面元素設置不同的界面元素標識。按照這樣的方式,可以實現以不同的界面元素標識,表示對應不同界面功能的界面元素。 In the embodiment of the present invention, the identifier of the interface element included in the attribute value setting message may be an interface element identifier set in advance according to an interface function corresponding to the interface element. For example, interface elements of different applications may be sorted and determined, such as title areas, control areas, toolbars, and the like, corresponding to different interface functions; after that, different interface element identifiers may be set for these interface elements. In this way, it is possible to identify the interface elements that correspond to different interface functions by different interface elements.

以圖1b所示的APP1和APP2的界面為例,編號為1的區域,為標題區域;編號為2的區域,為控件區域;編號為3的區域,為工具欄。為這些區域設置的界面元素標識,可以依次分別為:HEAD、MAIN和TOOLBAR。 Take the interface of APP1 and APP2 shown in Figure 1b as an example. The area numbered 1 is the title area; the area numbered 2 is the control area; the area numbered 3 is the toolbar. The interface element identifiers set for these regions can be HEAD, MAIN, and TOOLBAR, respectively.

需要說明的是,按照現有技術,為了實現對界面元素的與顯示效果有關的屬性的調整,需要設計人員針對每一個應用單獨進行設計。具體設計內容包括:為應用的界面的不同區域分別設置標識符,並建立起標識符與資源的映射關係。後續開發人員會將所述映射關係以及資源打包到主題包中。這樣的方式存在的缺點在於,設計師和開發人員需要完成的工作量非常大;此外,如果應用的界面有調整,就可能導致原有的標識符無效,進而導致設計師設置的映射關係無效,需要設計師重新設置標識符和資源的映射關係,即需要升級主題包。 It should be noted that, according to the prior art, in order to realize the adjustment of the attributes related to the display effect of the interface elements, the designer needs to design separately for each application. The specific design content includes: setting identifiers for different areas of the application interface, and establishing a mapping relationship between identifiers and resources. Subsequent developers package the mappings and resources into the theme package. The disadvantage of this way is that the amount of work that designers and developers need to accomplish is very large; in addition, if the interface of the application is adjusted, the original identifier may be invalid, and the mapping relationship set by the designer is invalid. The designer needs to reset the mapping between identifiers and resources, that is, the theme package needs to be upgraded.

而本發明實施例中,不需要設計師建立標識符與資源的映射關係,而是採用為應用的界面的不同區域設置界面元素標識的方式。基於界面元素被設置的界面元素標識,應用可以通過前文所述的第二種方式,判斷是否能夠根據屬性值設置消息中包含的屬性值設置界面元素的屬性,若能夠,則可以根據屬性值設置消息中包含的 屬性值,為應用的界面元素的屬性賦值。 In the embodiment of the present invention, the designer does not need to establish a mapping relationship between the identifier and the resource, but adopts a manner of setting the interface element identifier for different regions of the application interface. Based on the interface element identifier set by the interface element, the application may determine whether the attribute of the interface element can be set according to the attribute value included in the attribute value setting by using the second method described above, and if so, may be set according to the attribute value. The attribute value contained in the message assigns a value to the attribute of the interface element of the application.

相對於現有技術而言,本發明實施例提採用為界面的不同區域設置界面元素標識的方式,可以在達到實現調整界面元素的屬性值的前提下,簡化設計和開發工作,節省人力資源。 Compared with the prior art, the embodiment of the present invention adopts a method for setting interface element identifiers for different regions of the interface, which can simplify the design and development work and save human resources under the premise of realizing the adjustment of the attribute values of the interface elements.

本發明實施例中,根據屬性值設置消息包含的屬性值,為第三方應用的界面元素的屬性賦值的實現方式可以靈活多樣。 In the embodiment of the present invention, the attribute value included in the message is set according to the attribute value, and the implementation manner of assigning the attribute of the interface element of the third-party application can be flexible and diverse.

比如,第三方應用可以直接將屬性設置消息包含的屬性值,直接賦值給第三方應用的部分或全部界面元素;也可以根據該屬性值和預設的屬性值第一映射規則,計算該屬性值所映射的其他屬性值,並根據計算得到的所述其他屬性值,為第三方應用的部分或全部界面元素的屬性賦值。 For example, the third-party application may directly assign the attribute value included in the attribute setting message to some or all of the interface elements of the third-party application; or calculate the attribute value according to the attribute value and the preset attribute value first mapping rule. Other attribute values that are mapped, and assign values to attributes of some or all of the interface elements of the third-party application based on the calculated other attribute values.

本發明實施例中,所述屬性值第一映射規則,可以是簡單的一對一的映射關係,也可以是複雜的計算公式,本發明實施例對此不作限定。 In the embodiment of the present invention, the attribute mapping first mapping rule may be a simple one-to-one mapping relationship, or may be a complex calculation formula, which is not limited by the embodiment of the present invention.

再比如,當屬性值設置消息中包含至少兩個屬性值時,根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性的具體實現方式可以包括: For example, when the attribute value setting message includes at least two attribute values, setting the attribute value of the message according to the attribute value, and setting the attribute of the interface element of the third-party application may include:

第三方應用從所述至少兩個屬性值中選取屬性值,並根據選取的屬性值,為所述應用的界面元素的屬性賦值。第三方應用可以直接將選取的屬性值賦值給所述應用的界面元素的屬性;或者,第三方應用可以根據選取的屬性值 和預設的屬性值第二映射規則,計算選取的屬性值所映射的其他屬性值,並根據計算得到的所述其他屬性值,為第三方應用的部分或全部界面元素的屬性賦值。 The third-party application selects an attribute value from the at least two attribute values, and assigns a value to the attribute of the interface element of the application according to the selected attribute value. The third-party application may directly assign the selected attribute value to the attribute of the interface element of the application; or the third-party application may calculate the selected attribute value mapping according to the selected attribute value and the preset attribute value second mapping rule. Other attribute values, and assign values to some or all of the interface elements of the third-party application based on the calculated other attribute values.

考慮到為了使得對界面元素的屬性進行賦值後,得到的不同界面元素的顯示效果能夠相互協調,在一種實施方式中,所述屬性設置消息中,除包含屬性值外,還可以包含與屬性值相映射的界面元素標識。即,屬性設置消息中,可以規定不同的屬性值分別映射的界面元素,比如,規定屬性值“藍色”映射界面元素“控件”,屬性值“白色”映射界面元素“標題欄”,等等。 In the embodiment, the attribute setting message may include the attribute value in addition to the attribute value, in order to make the attribute of the interface element be assigned. The interface element identifier of the phase map. That is, in the attribute setting message, interface elements respectively mapped by different attribute values may be specified, for example, the attribute value "blue" mapping interface element "control", the attribute value "white" mapping interface element "title bar", etc. .

在這樣的條件下,第三方應用可以根據第三方應用的界面元素標識,從屬性設置消息包含的屬性值中選取屬性值。其中,選取的屬性值滿足:所映射的屬性設置消息中的界面元素標識與第三方應用的界面元素標識相同。之後,第三方應用可以根據選取的屬性值,對第三方應用的具備相應界面元素標識的界面元素的屬性賦值。 Under such conditions, the third-party application may select the attribute value from the attribute values included in the attribute setting message according to the interface element identifier of the third-party application. The selected attribute value is satisfied: the interface element identifier in the mapped attribute setting message is the same as the interface element identifier of the third-party application. Afterwards, the third-party application can assign a value to the attribute of the interface element of the third-party application that has the corresponding interface element identifier according to the selected attribute value.

比如,若第三方應用選取了屬性值“藍色”,而“藍色”映射屬性設置消息中的標識“KJ”,則第三方應用根據“藍色”,可以對第三方應用的具備標識“KJ”的界面元素的屬性進行賦值。具體地,若假設具備標識“KJ”的第三方應用的界面元素為控件,則第三方應用可以將“藍色”,賦值給第三方應用的控件的屬性。 For example, if the third-party application selects the attribute value "blue" and the "blue" mapping attribute sets the identifier "KJ" in the message, the third-party application can identify the third-party application according to "blue". The attributes of the interface elements of KJ are assigned. Specifically, if it is assumed that the interface element of the third-party application having the identifier "KJ" is a control, the third-party application can assign "blue" to the attribute of the control of the third-party application.

當所述屬性設置消息中除包含屬性值外,還包含與屬性值相映射的界面元素標識時,若第三方應用具備屬性設 置消息中包含的各界面元素標識分別對應的界面元素,則第三方應用也可以不對屬性設置消息中的屬性值進行篩選,而是直接根據屬性設置消息中包含的屬性值,為屬性設置消息中包含的界面元素標識所對應的、第三方應用的界面元素的屬性賦值。 When the attribute setting message includes an interface element identifier that is mapped to the attribute value, if the third-party application has an interface element corresponding to each interface element identifier included in the attribute setting message, the third party application The application may also not filter the attribute value in the attribute setting message, but directly assign the attribute value of the interface element corresponding to the third party application corresponding to the interface element identifier included in the attribute setting message according to the attribute value included in the attribute setting message. .

本發明實施例中,所述界面元素標識,可以是前文所述的根據界面元素的功能設置的界面元素標識,也可以是用於表示界面元素的其它標識。 In the embodiment of the present invention, the interface element identifier may be an interface element identifier set according to a function of the interface element as described above, or may be another identifier used to represent the interface element.

本發明實施例中,所述第三方應用除了可以接收屬性值設置消息外,也可以將接收到的該屬性值設置消息轉發給其他應用,以使得其他應用判斷是否根據屬性值設置消息中的屬性值,對所述其他應用的界面元素的屬性進行賦值。比如,所述第三方應用可以通過調用前文所述的消息發送第二介面onConfigruationChange/onCreate,實現向其他應用發送屬性值設置消息。 In the embodiment of the present invention, in addition to receiving the attribute value setting message, the third-party application may also forward the received attribute value setting message to other applications, so that other applications determine whether to set the attribute in the message according to the attribute value. A value that assigns an attribute to the interface element of the other application. For example, the third-party application may send an attribute value setting message to other applications by sending a second interface onConfigruationChange/onCreate by calling the message described above.

需要說明的是,本發明實施例中為各步驟設置編號,是為了有條理地描述各步驟,並不是對步驟的執行順序進行限制,即,本發明實施例中為各步驟設置的編號並不能視為限制步驟執行順序的特徵。 It should be noted that, in the embodiment of the present invention, the numbers are set for each step in order to describe the steps in a structured manner, and the order of the steps is not limited, that is, the number set for each step in the embodiment of the present invention cannot be It is considered a feature that limits the order in which steps are performed.

採用本發明實施例提供的上述方法,由於應用可以通過接收屬性值設置消息的方式,實現根據屬性值設置消息中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而可以避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 According to the foregoing method provided by the embodiment of the present invention, since the application can receive the attribute value setting message, the attribute of the interface element is set according to the attribute value in the attribute value setting message, and the resource package is not required to be downloaded and loaded, thereby avoiding changing the terminal. The interface elements cause the problem that the terminal consumes more resources.

此外,應用在獲取到屬性值後,可以自行決定是否進行屬性的賦值,或者可以自行決定對哪些界面元素的屬性進行賦值。 In addition, after the application obtains the attribute value, it can decide whether to assign the attribute or decide which interface element attributes to assign.

可見,如果有新的應用期望進行屬性值的調整,則可以自由增加;或者,如果有應用期望拒絕進行屬性值的調整,也可以非常靈活地實現。 It can be seen that if a new application expects to adjust the attribute value, it can be freely added; or, if there is an application expecting to reject the adjustment of the attribute value, it can be implemented very flexibly.

實施例2  Example 2  

為解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題,本發明實施例提供一種界面元素屬性值的設置方法。該方法的執行主體可以是使用者終端的作業系統;或者使用者終端上安裝的各種應用,例如,基礎應用或第三方應用。所述的執行主體並不構成對本發明的限定,為了便於描述,本發明實施例均以執行主體是作業系統為例進行說明。 In order to solve the problem that the interface elements of the terminal are changed according to the prior art, the method of setting the attribute value of the interface element is provided. The execution body of the method may be an operating system of the user terminal; or various applications installed on the user terminal, such as a base application or a third party application. The embodiments of the present invention are not limited to the embodiments of the present invention. For the convenience of description, the embodiments of the present invention are described by taking an execution subject as an operating system as an example.

可以理解,該方法的執行主體為作業系統只是一種示例性的說明,並不應理解為對該方法的限定。 It can be understood that the execution subject of the method is only an exemplary description of the operating system, and should not be construed as limiting the method.

如圖2所示,為本發明實施例提供的該界面元素屬性值的設置方法的具體實現流程圖,主要包括下述步驟:步驟21,作業系統獲得屬性值設置消息;為了使得應用可以進行屬性的調整,所述屬性值設置消息中可以包含可以賦值給屬性的屬性值。所述屬性,一般為與顯示效果相關的屬性,比如可以是顏色、亮度以及透明度中的至少一種。 As shown in FIG. 2, a specific implementation flowchart of a method for setting an attribute value of the interface element according to an embodiment of the present invention mainly includes the following steps: Step 21: The operating system obtains an attribute value setting message; The adjustment, the attribute value setting message may contain an attribute value that can be assigned to the attribute. The attribute is generally an attribute related to a display effect, such as at least one of color, brightness, and transparency.

本發明實施例中,對該消息中包含的屬性值的數量不進行限定。 In the embodiment of the present invention, the number of attribute values included in the message is not limited.

該消息中包含的屬性值,可以是顏色值、亮度值和透明度值中的至少一種。 The attribute value included in the message may be at least one of a color value, a brightness value, and a transparency value.

作業系統獲得屬性值設置消息,可以包括:作業系統產生屬性值設置消息,或,作業系統接收屬性值設置消息。 The operating system obtains the attribute value setting message, which may include: the operating system generates an attribute value setting message, or the operating system receives the attribute value setting message.

針對前一種實現方式而言,比如,作業系統可以在指定的觸發條件的觸發下,產生屬性值設置消息。所述指定的觸發條件,比如可以為:接收到壁紙設置指令,或接收到主題設置指令,或接收到伺服器發送的屬性值調整通知。其中需要說明的是,主題設置指令,可以是指使用者對使用者終端提供的主題設置選項進行選取而觸發的。 For the former implementation, for example, the operating system can generate an attribute value setting message triggered by the specified trigger condition. The specified triggering condition may be, for example, receiving a wallpaper setting instruction, or receiving a theme setting instruction, or receiving an attribute value adjustment notification sent by the server. It should be noted that the theme setting instruction may be triggered by the user selecting a theme setting option provided by the user terminal.

本發明實施例中,作業系統可以根據預設的屬性值或者獲取到的屬性值,產生包含該屬性值的屬性值設置消息。以屬性值為顏色值為例,作業系統可確定目標顏色值,並根據確定的目標顏色值,產生包含目標顏色值的屬性值設置消息。 In the embodiment of the present invention, the operating system may generate an attribute value setting message including the attribute value according to the preset attribute value or the acquired attribute value. Taking the attribute value as a color value, the operating system can determine the target color value and generate an attribute value setting message including the target color value according to the determined target color value.

這裡所說的目標顏色值,可以但不限於是根據指定圖片、指定事件和使用者選取的顏色值中的至少一種確定的。具體確定方式,可以參見實施例1中的相關描述,此處不再贅述。 The target color value referred to herein may be, but is not limited to, determined based on at least one of a specified picture, a specified event, and a color value selected by the user. For details, refer to the related description in Embodiment 1, and details are not described herein again.

針對作業系統獲得屬性值設置消息的後一種實現方式而言,比如,屬性值設置消息可以由預先設置的介面提供 方產生。該介面提供方,可以提供界面元素屬性調整介面COLOR_CHANGE。該介面提供方所提供的該介面一旦被調用,則該介面提供方會產生包含所述屬性值的屬性值設置消息;然後,該介面提供方可以調用消息發送第一介面updateConfigruation,向作業系統發送屬性值設置消息。 For the latter implementation in which the operating system obtains the attribute value setting message, for example, the attribute value setting message can be generated by a preset interface provider. The interface provider can provide the interface element property adjustment interface COLOR_CHANGE. Once the interface provided by the interface provider is invoked, the interface provider generates an attribute value setting message containing the attribute value; then, the interface provider can invoke the message sending the first interface updateConfigruation to send to the operating system. Property value setting message.

或者,也可以是由伺服器向作業系統發送該屬性值設置消息。 Alternatively, the attribute value setting message may be sent by the server to the operating system.

步驟22,作業系統發送屬性值設置消息,以使屬性值設置消息的接收方應用根據該消息包含的屬性值對界面元素的屬性進行賦值。 Step 22: The operating system sends an attribute value setting message, so that the receiver application of the attribute value setting message assigns an attribute of the interface element according to the attribute value included in the message.

該屬性值設置消息可以是採用廣播的方式發送的,也可以是採用向所述接收方應用定向發送的方式發送的。 The attribute value setting message may be sent by means of broadcast, or may be sent by means of directional transmission to the receiver.

接收方應用可以直接根據屬性值設置消息包含的屬性值,設置第三方應用的界面元素的屬性;或者,接收方應用可以判斷是否能夠根據屬性值設置消息包含的屬性值,設置界面元素的屬性;在判斷結果是時,根據屬性值設置消息包含的屬性值,設置界面元素的屬性,否則,可以拒絕根據屬性值設置消息包含的屬性值,設置界面元素的屬性--比如,可以通過丟棄該屬性值設置消息,從而實現拒絕根據該消息包含的屬性值為界面元素的屬性賦值。 The receiver application can directly set the attribute value of the interface element of the third-party application according to the attribute value setting attribute value of the message; or the receiver application can determine whether the attribute value of the message element can be set according to the attribute value, and the attribute of the interface element is set; When the judgment result is yes, the attribute value included in the message is set according to the attribute value, and the attribute of the interface element is set. Otherwise, the attribute value included in the message setting object may be rejected according to the attribute value, and the attribute of the interface element is set--for example, the attribute may be discarded. The value sets the message, thereby implementing a refusal to assign a value to the attribute of the interface element based on the attribute value contained in the message.

接收方應用如何判斷是否根據所述屬性值對界面元素的屬性進行賦值,可以參見本發明實施例1中對於第一應用如何進行所述判斷的相關描述,此處不再贅述;此外,接收方應用如何根據所述屬性值對界面元素的屬性進行賦 值,也可以參見本發明實施例1中的、對於第一應用如何根據屬性值對界面元素的屬性進行賦值的相關描述,此處也不再贅述。 For details on how to determine the attribute of the interface element according to the attribute value, refer to the related description of how to perform the judgment on the first application in Embodiment 1 of the present invention, and details are not described herein; For an application, how to assign an attribute of an interface element according to the attribute value, and how to assign a value to the attribute of the interface element according to the attribute value in the first embodiment of the present invention, Narration.

與實施例1中的相關記載類似,所述屬性值設置消息中,除包含屬性值外,還可以包含與屬性值相映射的界面元素標識。該界面元素標識的作用,可以參見實施例1中的相關描述,此處不再贅述。 Similar to the related description in Embodiment 1, the attribute value setting message may include an interface element identifier mapped to the attribute value in addition to the attribute value. For the function of the interface element identifier, refer to the related description in Embodiment 1, and details are not described herein again.

該界面元素的設置方式,比如可以包括如下步驟:確定應用界面中不同界面元素的功能;按照為具備相同功能的界面元素設置相同的界面元素標識,且為具備不同功能的界面設置的界面元素標識不同的方式,為應用界面中不同界面元素設置界面元素標識。 The setting manner of the interface element may include the following steps: determining the function of different interface elements in the application interface; setting the same interface element identifier for the interface elements having the same function, and setting the interface element identifier for the interface having different functions. Different ways to set the interface element identifier for different interface elements in the application interface.

在本發明實施例2中,作業系統發送屬性值設置消息後,若接收方應用利用屬性值設置消息中的屬性值對界面元素的屬性進行了賦值,則作業系統還可以記錄由接收方應用利用過的、屬性值設置消息中的屬性值,以及被接收方應用利用屬性值設置消息中的屬性值賦值過的屬性對應的界面元素標識。從而後續作業系統在在指定的觸發條件下,可以利用記錄的被所述接收方應用利用過的屬性值,為記錄的界面元素標識對應的接收方應用的界面元素賦值。採用該方式,可以實現由作業系統為接收方應用的界面元素賦值。 In the second embodiment of the present invention, after the operating system sends the attribute value setting message, if the receiver application assigns the attribute of the interface element by using the attribute value in the attribute value setting message, the operating system may also record the utilization by the receiver application. The attribute value in the attribute value setting message, and the interface element identifier corresponding to the attribute assigned by the receiver application using the attribute value in the attribute value setting message. Therefore, the subsequent operating system can use the recorded attribute value used by the receiving application to specify the interface element of the corresponding receiving party application for the recorded interface element under the specified triggering condition. In this way, it is possible to assign an interface element to the receiver application by the operating system.

採用本發明實施例提供的上述方法,由於可以通過向應用發送屬性值設置消息的方式,使得應用根據屬性值設 置消息中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而可以避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 According to the foregoing method provided by the embodiment of the present invention, since the attribute setting message is sent to the application, the application sets the attribute of the interface element according to the attribute value in the attribute value setting message, and does not need to download and load the resource package, thereby avoiding Changing the interface elements of the terminal leads to the problem that the terminal consumes more resources.

實施例3  Example 3  

本發明實施例3主要是結合實際,提供一種對應用的界面元素的顏色值進行設置的方法,用以對本發明實施例1和實施例2提供的方法在實際中的具體實現方式進行說明。 The embodiment 3 of the present invention mainly provides a method for setting the color value of the interface element of the application in combination with the actual situation, and is used to describe the specific implementation manner of the method provided by the embodiment 1 and the embodiment 2 of the present invention.

本發明實施例3中,假設使用者終端中安裝有APP1和APP2,作業系統(System)在接收到壁紙設置指令後,向APP1和APP2發送顏色值設置消息(相當於前文所述的屬性值設置消息),則本發明實施例3提供的該方法的實現流程圖如圖3所示,包括如下步驟: In the third embodiment of the present invention, assuming that APP1 and APP2 are installed in the user terminal, the operating system (System) sends a color value setting message to APP1 and APP2 after receiving the wallpaper setting instruction (corresponding to the attribute value setting described above). The message flow chart of the method provided in Embodiment 3 of the present invention is as shown in FIG. 3, and includes the following steps:

步驟31,使用者利用桌面壁紙設置應用,從本地保存的圖像中選定一張圖像作為桌面壁紙,使用者所執行的選定該圖像作為桌面壁紙的操作,會使桌面壁紙設置應用接收到桌面壁紙設置指令。 In step 31, the user selects an image from the locally saved image as a desktop wallpaper by using the desktop wallpaper setting application, and the user selects the image as the operation of the desktop wallpaper, so that the desktop wallpaper setting application receives the image. Desktop wallpaper setting instructions.

步驟32,桌面壁紙設置應用回應於桌面壁紙設置指令,將該圖像設置為桌面壁紙,此外,桌面壁紙設置應用會調用圖3所示的DynController所提供的COLOR_CHANGE介面。 In step 32, the desktop wallpaper setting application responds to the desktop wallpaper setting instruction to set the image as a desktop wallpaper. In addition, the desktop wallpaper setting application calls the COLOR_CHANGE interface provided by the DynController shown in FIG.

步驟33,DynController回應於桌面壁紙設置應用對於COLOR_CHANGE介面的調用,根據當前作為桌面壁紙 的該圖像的像素顏色值,確定第一顏色值。 In step 33, the DynController responds to the call of the desktop wallpaper setting application for the COLOR_CHANGE interface, and determines the first color value according to the pixel color value of the image currently being the desktop wallpaper.

所述的第一顏色值,是根據該圖像的像素顏色值確定的至少一個顏色值。具體而言,DynController可以將該圖像的某個或幾個像素顏色值,確定為第一顏色值;或者,DynController也可以計算該圖像的所有像素顏色值的均值,並將該均值確定為第一顏色值;或者,DynController還可以統計該圖像中具備不同顏色值的像素的數量,並將統計出的所有數量中的最大數量所對應的顏色值,作為第一顏色值;或者,DynController還可以確定用於表示該圖像的主色調的像素顏色值,並將該像素顏色值確定為第一顏色值;等等。 The first color value is at least one color value determined according to a pixel color value of the image. Specifically, the DynController may determine one or several pixel color values of the image as the first color value; or, the DynController may also calculate the mean value of all the pixel color values of the image, and determine the mean as The first color value; or, the DynController may also count the number of pixels having different color values in the image, and use the color value corresponding to the maximum number of all the counted numbers as the first color value; or, DynController A pixel color value for indicating a dominant color of the image may also be determined, and the pixel color value is determined to be a first color value;

本發明實施例中,該圖像的像素顏色值,可以但不限於是DynController通過對該圖像的像素的顏色值進行採樣而獲得的。 In the embodiment of the present invention, the pixel color value of the image may be, but is not limited to, obtained by the DynController by sampling the color value of the pixel of the image.

其中,上述“主色調”表示色彩外觀的基本傾向。具體而言,一幅圖像雖然用了多種顏色,但圖像在色彩總體上是有一種傾向的,比如是偏藍或偏紅,是偏暖或偏冷等等,色彩外觀的基本傾向就是一幅圖像的主色調。通常,主色調從冷暖方面進行劃分,可以有“暖色調”、“冷色調”和“中間色調”。一般地,紅色、橙色、黃色為表示暖色調;綠色、藍色、黑色表示冷色調;而灰色、紫色、白色則表示中間色調。冷色調的亮度越高,其整體感覺越偏暖,暖色調的亮度越高,其整體感覺越偏冷。 Among them, the above "primary color tone" indicates a basic tendency of color appearance. Specifically, although an image uses a plurality of colors, the image generally has a tendency in color, such as being bluish or reddish, being warm or cold, etc., and the basic tendency of color appearance is The primary color of an image. Generally, the main color is divided from the warm and cold side, and there may be "warm tone", "cold tone" and "middle tone". Generally, red, orange, and yellow indicate warm colors; green, blue, and black indicate cool colors; and gray, purple, and white indicate intermediate colors. The higher the brightness of the cool color, the warmer the overall feeling, the higher the brightness of the warm color, the colder the overall feeling.

步驟34,DynController根據第一顏色值,產生顏色 值設置消息。 In step 34, the DynController generates a color value setting message according to the first color value.

本發明實施例中,根據第一顏色值,產生顏色值設置消息,比如可以包括:直接產生包含該第一顏色值的顏色值設置消息;或,根據第一顏色值,確定與第一顏色值相映射的第二顏色值,並產生包含第二顏色值的顏色值設置消息。 In the embodiment of the present invention, generating a color value setting message according to the first color value may include: directly generating a color value setting message including the first color value; or determining the first color value according to the first color value. A second color value of the phase map and a color value setting message containing the second color value.

針對後一種實現方式,實際應用中,可以設置預設數量的顏色值集合,並建立起各顏色值集合與不同顏色值範圍的映射關係(後稱第一映射關係)。其中,各顏色值集合分別包含至少一個顏色值;各顏色值集合中包含的顏色值,均相當於上述第二顏色值;各顏色值集合的合集,可稱為系統Guideline色譜。基於系統Guideline色譜,可以根據第一顏色值以及所述不同顏色值範圍,確定第一顏色值所落入的顏色值範圍;根據第一映射關係,從系統Guideline色譜中,確定第一顏色值所落入的顏色值範圍映射的顏色值集合。確定的顏色值集合中的顏色值,即為所述第二顏色值。 For the latter implementation, in a practical application, a preset number of color value sets may be set, and a mapping relationship between each color value set and a different color value range (hereinafter referred to as a first mapping relationship) may be established. Each color value set includes at least one color value; each color value set includes a color value corresponding to the second color value; a collection of each color value set may be referred to as a system Guideline chromatography. Based on the system Guideline chromatography, determining, according to the first color value and the different color value ranges, a range of color values into which the first color value falls; determining, according to the first mapping relationship, a first color value from a system Guideline chromatogram The set of color values mapped to the range of color values. The color value in the determined set of color values is the second color value.

本發明實施例中,假設顏色值設置消息中包含的顏色值(第一顏色值或第二顏色值)有多個,並且,該消息中除了包含顏色值外,還包含與各顏色值分別對應的界面元素標識。 In the embodiment of the present invention, it is assumed that there are multiple color values (first color value or second color value) included in the color value setting message, and the message includes, in addition to the color value, corresponding to each color value. Interface element identifier.

步驟35,DynController通過調用消息發送第一介面updateConfigruation,向System發送產生的顏色值設置消息。 In step 35, the DynController sends the first interface updateConfigruation by calling the message, and sends the generated color value setting message to the System.

步驟36,System在接收到顏色值設置消息後,通過調用消息發送第二介面onConfigruationChange/onCreate,向APP1和APP2發送顏色值設置消息。 Step 36: After receiving the color value setting message, the System sends a second interface onConfigruationChange/onCreate by calling a message to send a color value setting message to APP1 and APP2.

以下步驟以APP1對該顏色值設置消息進行回應為例,對應用接收到顏色值設置消息的處理方式進行說明。 The following step takes APP1 as a response to the color value setting message as an example, and describes a processing method in which the application receives the color value setting message.

步驟37,APP1回應於顏色值設置消息,獲取預先設置並保存的界面元素屬性調整規則,並判斷所述規則是否允許APP1根據顏色值設置消息包含的顏色值設置界面元素的顏色,若判斷結果為是,則執行步驟38,否則,可以丟棄該顏色值設置消息。 Step 37: APP1 responds to the color value setting message, obtains an interface element attribute adjustment rule preset and saved, and determines whether the rule allows APP1 to set the color of the interface element according to the color value included in the color value setting message, and if the judgment result is If yes, go to step 38. Otherwise, the color value setting message can be discarded.

步驟38,APP1根據APP1的界面元素的標識,從顏色值設置消息包含的各顏色值中,選取對應的界面元素標識與APP1的界面元素的標識相同的顏色值。 Step 38: APP1 selects, according to the identifier of the interface element of APP1, the color value corresponding to the identifier of the interface element of APP1 from the color values included in the color value setting message.

步驟39,APP1利用選取的顏色值,對APP1的界面元素的顏色屬性進行賦值。在該過程中,APP1可以調用DynColorSetting介面。該DynColorSetting介面的功能在於,觸發System獲取該過程中被APP1進行顏色屬性賦值的界面元素的標識以及APP1在進行顏色屬性賦值時採用的顏色值。至此,本方法的流程可以結束。 In step 39, APP1 assigns a color attribute of the interface element of APP1 by using the selected color value. In this process, APP1 can call the DynColorSetting interface. The function of the DynColorSetting interface is to trigger the system to obtain the identifier of the interface element assigned by the APP1 in the process and the color value used by the APP1 when assigning the color attribute. At this point, the flow of the method can be ended.

針對後續可能執行的步驟而言,當APP1的某界面需要被展示,且該界面中將要展示的界面元素,是利用選取的顏色值進行屬性賦值的界面元素時,APP1會執行從APP1用於保存界面元素的屬性值和界面元素標識的資料庫中,獲取界面元素的顏色值以及相應的界面元素標識的 操作。作業系統會對實現所述操作的方法進行攔截,並將從所述資料庫中獲取的顏色值以及相應的界面元素標識,作為所述方法的執行結果提供給APP1;APP1根據獲取到的所述執行結果包含的顏色值,對所述執行結果包含的界面元素標識對應的界面元素的顯示效果進行調整。 For the subsequent steps that may be performed, when an interface of APP1 needs to be displayed, and the interface element to be displayed in the interface is an interface element that uses the selected color value for attribute assignment, APP1 performs execution from APP1 for saving. In the database of the attribute values of the interface elements and the identifiers of the interface elements, the operations of obtaining the color values of the interface elements and the corresponding interface element identifiers. The operating system intercepts the method for implementing the operation, and provides the color value obtained from the database and the corresponding interface element identifier as the execution result of the method to APP1; APP1 according to the obtained method The color value included in the execution result is adjusted, and the display effect of the interface element corresponding to the interface element identifier included in the execution result is adjusted.

採用本發明實施例提供的上述方法,由於可以由作業系統通過向應用發送屬性值設置消息的方式,使得應用根據屬性值設置消息中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而可以避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 According to the foregoing method provided by the embodiment of the present invention, since the operating system can send the attribute value setting message to the application, the application sets the attribute of the interface element according to the attribute value in the attribute value setting message, without downloading and loading the resource package. Therefore, it can be avoided that changing the interface elements of the terminal may result in a problem that the terminal consumes more resources.

此外,採用上述方法,無需主題包的支持也可實現對界面元素屬性值的調整,避免了在使用者終端保存主題包所需耗費的儲存資源。 In addition, by adopting the above method, the adjustment of the interface element attribute value can be realized without the support of the theme package, and the storage resource required for saving the theme package in the user terminal is avoided.

實施例4  Example 4  

為解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題,本發明實施例提供一種界面元素屬性值的設置裝置。該裝置的具體結構示意圖如圖4所示,包括下述功能單元:消息接收單元41,用於接收屬性值設置消息;所述屬性值設置消息中,包含屬性值。 In order to solve the problem that the interface elements of the terminal are changed according to the prior art, the method of setting the attribute value of the interface element is provided. The specific structure of the device is as shown in FIG. 4, and includes the following functional unit: a message receiving unit 41, configured to receive an attribute value setting message; and the attribute value setting message includes an attribute value.

賦值單元42,用於根據所述屬性值,為應用的界面元素的屬性賦值。 The assignment unit 42 is configured to assign a value to an attribute of an interface element of the application according to the attribute value.

在一種實施方式中,消息接收單元41,具體可以用 於接收作業系統廣播的屬性值設置消息;或者,消息接收單元41也可以接收第三方應用或基礎應用發送的屬性值設置消息。 In an embodiment, the message receiving unit 41 may be specifically configured to receive an attribute value setting message broadcast by the operating system; or the message receiving unit 41 may also receive an attribute value setting message sent by the third party application or the base application.

在一種實施方式中,利用所述屬性值設置消息,可以實現指定該消息中包含的屬性值具體可以賦值給什麼的界面元素。具體地,所述屬性值設置消息中,除包含屬性值外,還可以包含與屬性值相映射的界面元素標識。在這樣的情況下,賦值單元42具體可以用於:根據所述屬性值,為界面元素標識所對應的所述應用的界面元素的屬性賦值。 In an embodiment, by using the attribute value setting message, it is possible to implement an interface element that specifies what attribute value included in the message can be specifically assigned to. Specifically, the attribute value setting message may include an interface element identifier mapped to the attribute value in addition to the attribute value. In this case, the assignment unit 42 may be configured to: assign an attribute of an interface element of the application corresponding to the interface element identifier according to the attribute value.

在一種實施方式中,所述屬性值設置消息中可以包含至少兩個屬性值。在這樣的情況下,賦值單元42可以根據需求選取屬性值進行賦值,比如,賦值單元42可以從所述至少兩個屬性值中選取屬性值,並根據選取的屬性值,為所述應用的界面元素的屬性賦值。 In an embodiment, the attribute value setting message may include at least two attribute values. In this case, the assignment unit 42 may select an attribute value for assignment according to the requirement. For example, the assignment unit 42 may select an attribute value from the at least two attribute values, and use the selected attribute value as the interface of the application. The attribute assignment of the element.

在一種實施方式中,當屬性值設置消息中除包含屬性值外,還包含與各屬性值相映射的界面元素標識時,賦值單元42可以根據屬性設置消息中的各屬性值映射的界面元素標識,從屬性設置消息包括的屬性值中,選取映射的界面元素標識與所述應用的界面元素標識相同的屬性值,為該應用的界面元素的屬性賦值。採用該方式,可以避免選取屬性值設置消息中不可用於對應用的界面元素進行賦值的屬性值,而導致的處理資源浪費。其中,屬性值設置消息中包含的界面元素標識,以及應用的界面元素的標 識,均可以是前文所述的根據界面元素的功能設置的界面元素標識。 In an embodiment, when the attribute value setting message includes an interface element identifier mapped to each attribute value in addition to the attribute value, the assignment unit 42 may identify the interface element identifier of each attribute value mapping in the attribute setting message. And selecting, from the attribute value included in the attribute setting message, the mapped interface element identifier to be the same attribute value as the interface element identifier of the application, and assigning a value to the attribute of the interface element of the application. In this way, the attribute value in the attribute value setting message that cannot be used to assign the interface element of the application can be avoided, and the processing resource is wasted. The identifier of the interface element included in the attribute value setting message and the identifier of the interface element of the application may be the interface element identifier set according to the function of the interface element as described above.

為了實現為界面元素設置界面元素標識,本發明實施例中提供的該裝置還可以包括:標識設置單元。該單元具體可以用於:確定應用界面中不同界面元素的功能;按照為具備相同功能的界面元素設置相同的界面元素標識,且為具備不同功能的界面設置的界面元素標識不同的方式,為所述應用界面中不同界面元素設置界面元素標識。 In order to implement the setting of the interface element identifier for the interface element, the apparatus provided in the embodiment of the present invention may further include: an identifier setting unit. The unit may be specifically configured to: determine the function of different interface elements in the application interface; set the same interface element identifier for the interface elements having the same function, and identify different interface elements for the interface with different functions, The interface element identifier is set by different interface elements in the application interface.

所述應用界面中的界面元素,包括下述至少一種:按鈕、標題、工具欄、選擇框、開關、滑塊、進度條、輸入框。 The interface elements in the application interface include at least one of the following: a button, a title, a toolbar, a selection box, a switch, a slider, a progress bar, and an input box.

在一種實施方式中,考慮到直接利用屬性值設置消息中的屬性值對應用的界面元素進行賦值,可能會使得應用在整個界面中的色彩不夠醒目,因此,為避免該問題,賦值單元42具體可以用於:根據屬性值設置消息中的屬性值和預設的屬性值映射規則,計算所述屬性值所映射的其他屬性值;根據所述其他屬性值,為所述應用的界面元素的屬性賦值。採用該方式,可以使得應用的界面元素的屬性值與屬性值設置消息中的屬性值有所不同,從而使得應用的界面元素的屬性值更具應用自身的個性化特點。 In an embodiment, considering that the attribute value in the attribute value setting message is used to assign the interface element of the application, the color of the application in the entire interface may be insufficiently conspicuous. Therefore, in order to avoid the problem, the evaluation unit 42 is specific. The method may be configured to: calculate an attribute value in the message according to the attribute value and a preset attribute value mapping rule, and calculate another attribute value mapped by the attribute value; according to the other attribute value, the attribute of the interface element of the application Assignment. In this way, the attribute value of the interface element of the application may be different from the attribute value in the attribute value setting message, so that the attribute value of the interface element of the application is more personalized by the application itself.

在一種實施方式中,所述裝置還可以作為屬性值設置消息的發送方。具體而言,所述裝置還可以包括消息發送單元。該消息發送單元,可以用於向其他應用發送屬性值設置消息,以使得其他應用判斷是否根據所述屬性值設置 消息中的屬性值,對其他應用的界面元素的屬性進行賦值。 In an embodiment, the device may also act as a sender of the attribute value setting message. In particular, the apparatus may also include a message transmitting unit. The message sending unit may be configured to send an attribute value setting message to other applications, so that other applications determine whether to set an attribute of an interface element of another application according to the attribute value in the attribute value setting message.

採用本發明實施例提供的上述裝置,由於可以通過接收屬性值設置消息的方式,實現根據屬性值設置消息中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而可以避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 The device provided by the embodiment of the present invention can implement the setting of the attribute value setting message, and implement the attribute setting element of the attribute value in the attribute value setting message, without downloading and loading the resource package, thereby avoiding changing the terminal. Interface elements can cause problems with the terminal processing more resources.

實施例5  Example 5  

為解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題,本發明實施例提供一種界面元素屬性值的設置裝置。該裝置的具體結構示意圖如圖5所示,包括下述功能單元:消息獲得單元51,用於獲得屬性值設置消息。所述屬性值設置消息中,包含屬性值。 In order to solve the problem that the interface elements of the terminal are changed according to the prior art, the method of setting the attribute value of the interface element is provided. A schematic diagram of a specific structure of the apparatus is shown in FIG. 5, and includes the following functional unit: a message obtaining unit 51 for obtaining an attribute value setting message. The attribute value setting message includes an attribute value.

消息發送單元52,用於發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。 The message sending unit 52 is configured to send an attribute value setting message, so that the receiver application of the attribute value setting message assigns an attribute of the interface element according to the attribute value.

具體地,消息獲得單元51獲得屬性值設置消息的方式可以包括但不限於:產生屬性值設置消息;或接收屬性值設置消息;等等。 Specifically, the manner in which the message obtaining unit 51 obtains the attribute value setting message may include, but is not limited to, generating an attribute value setting message; or receiving an attribute value setting message;

針對消息獲得單元51產生屬性值設置消息的時機而言,本發明實施例中,消息獲得單元51可以是在接收到壁紙設置指令後,產生屬性值設置消息;或在接收到主題 設置指令後,產生屬性值設置消息;或在接收到伺服器發送的屬性值調整通知後,產生屬性值設置消息;等等。 For the timing when the message obtaining unit 51 generates the attribute value setting message, in the embodiment of the present invention, the message obtaining unit 51 may generate the attribute value setting message after receiving the wallpaper setting instruction; or after receiving the theme setting instruction, Generate an attribute value setting message; or generate an attribute value setting message after receiving the attribute value adjustment notification sent by the server; and the like.

針對消息獲得單元51接收屬性值設置消息的方式而言,消息獲得單元51可以是接收伺服器或第二應用發送的屬性值設置消息。 For the manner in which the message obtaining unit 51 receives the attribute value setting message, the message obtaining unit 51 may be an attribute value setting message transmitted by the receiving server or the second application.

針對消息獲得單元51產生屬性值設置消息的方式而言,消息獲得單元51可以確定目標顏色值;根據確定的目標顏色值,產生包含目標顏色值的屬性值設置消息。 For the manner in which the message obtaining unit 51 generates the attribute value setting message, the message obtaining unit 51 may determine the target color value; and generate an attribute value setting message including the target color value based on the determined target color value.

在一種實施方式中,消息獲得單元51可以根據下述資訊中的至少一種,確定目標顏色值:指定圖片;指定事件;使用者選取的顏色值。 In an embodiment, the message obtaining unit 51 may determine a target color value according to at least one of the following information: a specified picture; a specified event; a color value selected by the user.

在一種實施方式中,為了實現指定屬性值具體可以賦值給什麼的界面元素。所述屬性值設置消息中,除包含屬性值外,還可以包含與屬性值相映射的界面元素標識。以使得第一應用能夠根據該消息中包含的屬性值,為界面元素標識所對應的第一應用的界面元素的屬性賦值。 In one embodiment, an interface element can be specifically assigned to a specified attribute value in order to achieve it. The attribute value setting message may include an interface element identifier mapped to the attribute value in addition to the attribute value. So that the first application can assign a value to the attribute of the interface element of the first application corresponding to the interface element identifier according to the attribute value included in the message.

所述裝置還可以包括為界面元素設置界面元素標識的設置單元。該設置單元,具體可以用於採用下述方式設置界面元素標識:確定應用界面中不同界面元素的功能;按照為具備相同功能的界面元素設置相同的界面元素標識,且為具備不同功能的界面設置的界面元素標識不同 的方式,為應用界面中不同界面元素設置界面元素標識。 The apparatus can also include a setting unit that sets an interface element identification for the interface element. The setting unit may be specifically configured to set the interface element identifier in the following manner: determining the function of different interface elements in the application interface; setting the same interface element identifier according to the interface element having the same function, and setting the interface with different functions The interface elements identify different ways to set the interface element identifiers for different interface elements in the application interface.

所述應用界面中的界面元素,可以但不限於包括下述至少一種:按鈕、標題、工具欄、選擇框、開關、滑塊、進度條、輸入框。 The interface elements in the application interface may include, but are not limited to, at least one of the following: a button, a title, a toolbar, a selection box, a switch, a slider, a progress bar, and an input box.

本發明實施例提供的上述裝置,還可以實現直接為第一應用的界面元素的屬性賦值。具體而言,該裝置可以包括確定單元和賦值單元。其中,所述確定單元,用於在消息發送單元51向第一應用發送屬性值設置消息後,確定第一應用利用屬性值設置消息中的屬性值所賦值的界面元素的標識,以及被第一應用利用的屬性值。所述賦值單元,用於在指定的觸發條件下,利用確定單元確定的被第一應用利用的屬性值,為所述標識對應的第一應用的界面元素的屬性賦值。 The above device provided by the embodiment of the present invention can also directly assign an attribute of an interface element of the first application. In particular, the apparatus may comprise a determining unit and an assigning unit. The determining unit is configured to: after the message sending unit 51 sends the attribute value setting message to the first application, determine, by the first application, the identifier of the interface element that is assigned by the attribute value in the attribute value setting message, and is first The attribute value utilized by the application. The assignment unit is configured to assign an attribute of the interface element of the first application corresponding to the identifier to the attribute value used by the first application determined by the determining unit under the specified trigger condition.

採用本發明實施例提供的上述裝置,由於可以通過向應用發送屬性值設置消息的方式,使得應用根據屬性值設置消息中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而可以避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 According to the foregoing apparatus provided by the embodiment of the present invention, the application can send the attribute value setting message to the application, so that the application sets the attribute of the interface element according to the attribute value in the attribute value setting message, and does not need to download and load the resource package, thereby avoiding Changing the interface elements of the terminal leads to the problem that the terminal consumes more resources.

實施例6  Example 6  

為解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題,本發明實施例提供一種智慧設備。該智慧設備可以包括下述功能單元: 記憶體,用於儲存計算機程式指令;處理器,耦合到所述記憶體,用於讀取所述記憶體儲存的計算機程式指令,並作為回應,執行如下操作:獲得屬性值設置消息;所述屬性值設置消息中,包含屬性值;發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。 In order to solve the problem that the method of changing the interface elements of the terminal in the prior art may result in the consumption of more resources of the terminal, the embodiment of the present invention provides a smart device. The smart device may include the following functional units: a memory for storing computer program instructions; a processor coupled to the memory for reading computer program instructions stored in the memory, and in response, executing as follows Operation: obtaining an attribute value setting message; the attribute value setting message includes an attribute value; and sending an attribute value setting message, so that the receiver application of the attribute value setting message assigns an attribute of the interface element according to the attribute value .

在一種實施方式中,處理器獲得屬性值設置消息的具體實現方式可以包括:產生屬性值設置消息;或接收屬性值設置消息。 In an embodiment, the specific implementation manner in which the processor obtains the attribute value setting message may include: generating an attribute value setting message; or receiving an attribute value setting message.

在一種實施方式中,處理器產生屬性值設置消息,具體可以包括:在接收到壁紙設置指令後,產生屬性值設置消息;或在接收到主題設置指令後,產生屬性值設置消息;或在接收到伺服器發送的屬性值調整通知後,產生屬性值設置消息。 In an embodiment, the processor generates the attribute value setting message, which may include: generating an attribute value setting message after receiving the wallpaper setting instruction; or generating an attribute value setting message after receiving the theme setting instruction; or receiving After the attribute value adjustment notification sent by the server, an attribute value setting message is generated.

在一種實施方式中,處理器接收屬性值設置消息,可以包括:接收伺服器或應用發送的屬性值設置消息。 In an embodiment, the processor receiving the attribute value setting message may include: receiving an attribute value setting message sent by the server or the application.

在一種實施方式中,處理器產生屬性值設置消息,可以包括:確定目標顏色值;根據確定的目標顏色值,產生包含目標顏色值的屬性值設置消息。 In an embodiment, the processor generating the attribute value setting message may include: determining a target color value; and generating an attribute value setting message including the target color value according to the determined target color value.

在一種實施方式中,根據下述資訊中的至少一種,確定目標顏色值: 指定圖片;指定事件;使用者選取的顏色值。 In one embodiment, the target color value is determined based on at least one of the following information: a specified picture; a specified event; a color value selected by the user.

在一種實施方式中,所述屬性值設置消息中,除包含屬性值外,還包含與屬性值相映射的界面元素標識。 In an embodiment, the attribute value setting message includes, in addition to the attribute value, an interface element identifier mapped to the attribute value.

在一種實施方式中,所述界面元素標識,是採用下述方式設置的:確定應用界面中不同界面元素的功能;按照為具備相同功能的界面元素設置相同的界面元素標識,且為具備不同功能的界面設置的界面元素標識不同的方式,為所述應用界面中不同界面元素設置界面元素標識。 In an embodiment, the interface element identifier is set in the following manner: determining the function of different interface elements in the application interface; setting the same interface element identifier according to the interface elements having the same function, and having different functions The interface elements of the interface settings identify different ways, and the interface element identifiers are set for different interface elements in the application interface.

在一種實施方式中,所述應用界面中的界面元素,可以但不限於包括下述至少一種:按鈕、標題、工具欄、選擇框、開關、滑塊、進度條、輸入框。 In an embodiment, the interface elements in the application interface may include, but are not limited to, at least one of the following: a button, a title, a toolbar, a selection box, a switch, a slider, a progress bar, and an input box.

在一種實施方式中,處理器在發送屬性值設置消息後,還可以用於:確定所述接收方應用利用屬性值設置消息中的屬性值所賦值的界面元素的標識,以及被所述接收方應用利用的屬性值;在指定的觸發條件下,利用確定的被所述接收方應用利用的屬性值,為所述標識對應的所述接收方應用的界面元素賦值。 In an embodiment, after the sending the attribute value setting message, the processor may be further configured to: determine, by the receiver application, an identifier of the interface element assigned by the attribute value in the attribute value setting message, and be used by the receiver The attribute value utilized by the application; under the specified trigger condition, using the determined attribute value utilized by the recipient application to assign a value to the interface element of the recipient application corresponding to the identifier.

採用本發明實施例提供的上述智慧設備,由於可以通過接收屬性值設置消息的方式,實現根據屬性值設置消息 中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而可以避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 According to the smart device provided by the embodiment of the present invention, the attribute of the interface element can be set according to the attribute value setting message in the attribute value setting message by receiving the attribute value setting message, and the resource package is not required to be downloaded and loaded, thereby avoiding changing the terminal. The interface elements cause the problem that the terminal consumes more resources.

實施例7  Example 7  

為解決按照現有技術中改變終端的界面元素的方式會導致耗費終端較多資源的問題,本發明實施例提供一種智慧設備。該智慧設備可以包括下述功能單元:記憶體,用於儲存計算機程式指令;處理器,耦合到所述記憶體,用於讀取所述記憶體儲存的計算機程式指令,並作為回應,執行如下操作:接收屬性值設置消息;所述屬性值設置消息中,包含屬性值;根據所述屬性值,為所述應用的界面元素的屬性賦值。 In order to solve the problem that the method of changing the interface elements of the terminal in the prior art may result in the consumption of more resources of the terminal, the embodiment of the present invention provides a smart device. The smart device may include the following functional unit: a memory for storing computer program instructions, a processor coupled to the memory, and a computer program instruction for reading the memory, and in response, executing the following Operation: receiving an attribute value setting message; the attribute value setting message includes an attribute value; and assigning a value to an attribute of the interface element of the application according to the attribute value.

在一種實施方式中,處理器接收屬性值設置消息,可以包括:接收作業系統廣播的屬性值設置消息;或接收其他應用發送的屬性值設置消息。 In an embodiment, the processor receiving the attribute value setting message may include: receiving an attribute value setting message broadcast by the operating system; or receiving an attribute value setting message sent by another application.

在一種實施方式中,所述屬性值設置消息中,包含至少兩個屬性值;則,處理器根據所述屬性值為所述應用的界面元素的屬性賦值,包括:處理器從所述至少兩個屬性值中選取屬性值,並根據選取的屬性值,為所述應用的界面元素的屬性賦值。 In an embodiment, the attribute value setting message includes at least two attribute values; then, the processor assigns a value according to the attribute value of the interface element of the application, including: the processor from the at least two The attribute value is selected from the attribute values, and the attribute of the interface element of the application is assigned according to the selected attribute value.

當所述屬性設置消息中,除包含屬性值外,還包含與屬性值相映射的界面元素標識時,處理器根據所述屬性值為所述應用的界面元素的屬性賦值,具體可以包括:根據屬性設置消息中的各屬性值映射的界面元素標識,從屬性設置消息包括的屬性值中,選取映射的界面元素標識與所述應用的界面元素標識相同的屬性值,為該應用的界面元素的屬性賦值。 When the attribute setting message includes, in addition to the attribute value, the interface element identifier that is mapped to the attribute value, the processor assigns a value to the attribute of the interface element of the application according to the attribute value, which may include: The interface element identifier of each attribute value mapping in the attribute setting message, from the attribute value included in the attribute setting message, selecting the mapped interface element identifier to be the same attribute value as the interface element identifier of the application, which is the interface element of the application. Property assignment.

在一種實施方式中,處理器根據所述屬性值為所述應用的界面元素的屬性賦值,具體可以包括:根據所述屬性值和預設的屬性值映射規則,計算所述屬性值所映射的其他屬性值;根據所述其他屬性值,為所述應用的界面元素的屬性賦值。 In an embodiment, the processor assigns a value to the attribute of the interface element of the application according to the attribute value, and specifically includes: calculating, according to the attribute value and the preset attribute value mapping rule, the mapping of the attribute value Other attribute values; assign values to attributes of the interface elements of the application based on the other attribute values.

在一種實施方式中,當所述屬性設置消息中,除包含屬性值外,還包含與屬性值相映射的界面元素標識時,處理器為所述應用的界面元素的屬性賦值,具體可以包括:為界面元素標識所對應的所述應用的界面元素的屬性賦值。 In an embodiment, when the attribute setting message includes an interface element identifier that is mapped to the attribute value, the processor assigns a value to the attribute of the interface element of the application, which may include: Assigning an attribute of an interface element of the application corresponding to the interface element identifier.

在一種實施方式中,處理器為界面元素標識所對應的所述應用的界面元素的屬性賦值,具體可以包括:根據所述與屬性值相映射的界面元素標識,以及預先根據界面元素對應的界面功能為所述應用的界面元素設置的標識,從所述應用的界面元素中,確定具備的標識與所述映射關係中包含的界面元素標識相同的界面元素;為確定出的界面元素的屬性賦值。 In an embodiment, the processor assigns an attribute of the interface element of the application corresponding to the interface element identifier, and specifically includes: the interface element identifier mapped according to the attribute value, and the interface corresponding to the interface element in advance An identifier that is set for an interface element of the application, and determines, from an interface element of the application, an interface element that has the same identity as the interface element identifier included in the mapping relationship; assigns a value to the determined interface element attribute .

其中,所述界面元素標識,可以是處理器採用下述方式設置的:確定應用界面中不同界面元素的功能;按照為具備相同功能的界面元素設置相同的界面元素標識,且為具備不同功能的界面設置的界面元素標識不同的方式,為所述應用界面中不同界面元素設置界面元素標識。 The interface element identifier may be set by the processor in the following manner: determining the function of different interface elements in the application interface; setting the same interface element identifier according to the interface elements having the same function, and having different functions The interface elements set by the interface identify different ways, and the interface element identifiers are set for different interface elements in the application interface.

其中,所述應用界面中的界面元素,可以但不限於包括下述至少一種:按鈕、標題、工具欄、選擇框、開關、滑塊、進度條、輸入框。 The interface element in the application interface may include, but is not limited to, at least one of the following: a button, a title, a toolbar, a selection box, a switch, a slider, a progress bar, and an input box.

在一種實施方式中,處理器還可以用於:向其他應用發送屬性值設置消息,以使得其他應用根據屬性值設置消息中的屬性值,對其他應用的界面元素的屬性進行賦值。 In an embodiment, the processor may be further configured to: send an attribute value setting message to other applications, so that other applications assign attribute values of interface elements of other applications according to attribute values in the attribute value setting message.

上述屬性,為與顯示效果有關的屬性。比如,所述屬性包括下述至少一種:顏色;透明度;亮度。 The above attributes are attributes related to the display effect. For example, the attribute includes at least one of the following: color; transparency; brightness.

採用本發明實施例提供的上述智慧設備,由於可以通過向應用發送屬性值設置消息的方式,使得應用根據屬性值設置消息中的屬性值設置界面元素的屬性,無需下載和加載資源包,從而避免改變終端的界面元素會導致耗費終端較多處理資源的問題。 According to the smart device provided by the embodiment of the present invention, the application can set the message by setting the attribute value to the application, so that the application sets the attribute of the interface element according to the attribute value in the attribute value setting message, and does not need to download and load the resource package, thereby avoiding Changing the interface elements of the terminal leads to the problem that the terminal consumes more resources.

本領域內的通常知識者應明白,本發明的實施例可提供為方法、系統、或計算機程式產品。因此,本發明可採 用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有計算機可用程式代碼的計算機可用儲存介質(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的計算機程式產品的形式。 Those of ordinary skill in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Thus, the invention may take the form of a complete hardware embodiment, a fully software embodiment, or a combination of software and hardware aspects. Furthermore, the invention may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) in which computer usable code is embodied. .

本發明是參照根據本發明實施例的方法、設備(系統)、和計算機程式產品的流程圖和/或方框圖來描述的。應理解可由計算機程式指令實現流程圖和/或方框圖中的每一流程和/或方框、以及流程圖和/或方框圖中的流程和/或方框的結合。可提供這些計算機程式指令到通用計算機、專用計算機、嵌入式處理機或其他可編程資料處理設備的處理器以產生一個機器,使得通過計算機或其他可編程資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的裝置。 The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for generating instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.

這些計算機程式指令也可儲存在能引導計算機或其他可編程資料處理設備以特定方式工作的計算機可讀記憶體中,使得儲存在該計算機可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能。 The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that instructions stored in the computer readable memory produce an article of manufacture including the instruction device. The instruction means implements the functions specified in one or more blocks of the flow or in a flow or block diagram of the flowchart.

這些計算機程式指令也可裝載到計算機或其他可編程資料處理設備上,使得在計算機或其他可編程設備上執行一系列操作步驟以產生計算機實現的處理,從而在計算機或其他可編程設備上執行的指令提供用於實現在流程圖一 個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的步驟。 These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

以上所述僅為本發明的實施例而已,並不用於限制本發明。對於本領域之通常知識者來說,本發明可以有各種更改和變化。凡在本發明的精神和原理之內所作的任何修改、等同替換、改進等,均應包含在本發明的申請專利範圍之內。 The above description is only an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and changes can be made in the present invention. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (34)

一種界面元素屬性值的設置方法,包括:獲得屬性值設置消息;所述屬性值設置消息中,包含屬性值;發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。  A method for setting an interface element attribute value, comprising: obtaining an attribute value setting message; the attribute value setting message includes an attribute value; and sending an attribute value setting message, so that the attribute value setting message is received by the receiver application according to the The attribute value assigns the attribute of the interface element.   如申請專利範圍第1項所述的方法,其中,獲得屬性值設置消息,包括:產生屬性值設置消息;或接收屬性值設置消息。  The method of claim 1, wherein obtaining the attribute value setting message comprises: generating an attribute value setting message; or receiving an attribute value setting message.   如申請專利範圍第2項所述的方法,其中,產生屬性值設置消息,包括:在接收到壁紙設置指令後,產生屬性值設置消息;或在接收到主題設置指令後,產生屬性值設置消息;或在接收到伺服器發送的屬性值調整通知後,產生屬性值設置消息。  The method of claim 2, wherein the generating an attribute value setting message comprises: generating an attribute value setting message after receiving the wallpaper setting instruction; or generating an attribute value setting message after receiving the theme setting instruction; Or generate an attribute value setting message after receiving the attribute value adjustment notification sent by the server.   如申請專利範圍第2項所述的方法,其中,接收屬性值設置消息,包括:接收伺服器或應用發送的屬性值設置消息。  The method of claim 2, wherein receiving the attribute value setting message comprises: receiving an attribute value setting message sent by the server or the application.   如申請專利範圍第2或3項所述的方法,其中,產生屬性值設置消息,包括:確定目標顏色值;根據確定的目標顏色值,產生包含目標顏色值的屬性值設置消息。  The method of claim 2, wherein the generating an attribute value setting message comprises: determining a target color value; and generating an attribute value setting message including the target color value according to the determined target color value.   如申請專利範圍第5項所述的方法,其中,根據下述資訊中的至少一種,確定目標顏色值:指定圖片;指定事件;使用者選取的顏色值。  The method of claim 5, wherein the target color value is determined according to at least one of the following information: a specified picture; a specified event; a color value selected by the user.   如申請專利範圍第1項所述的方法,其中,所述屬性值設置消息中,除包含屬性值外,還包含與屬性值相映射的界面元素標識。  The method of claim 1, wherein the attribute value setting message includes, in addition to the attribute value, an interface element identifier mapped to the attribute value.   如申請專利範圍第7項所述的方法,其中,所述界面元素標識,是採用下述方式設置的:確定應用界面中不同界面元素的功能;按照為具備相同功能的界面元素設置相同的界面元素標識,且為具備不同功能的界面設置的界面元素標識不同的方式,為所述應用界面中不同界面元素設置界面元素標識。  The method of claim 7, wherein the interface element identifier is set in the following manner: determining functions of different interface elements in the application interface; setting the same interface according to interface elements having the same function The element identifiers and the interface elements that are set for interfaces with different functions are identified differently, and the interface element identifiers are set for different interface elements in the application interface.   如申請專利範圍第8項所述的方法,其中,所述應用界面中的界面元素,包括下述至少一種:按鈕、標題、工具欄、選擇框、開關、滑塊、進度條、輸入框。  The method of claim 8, wherein the interface element in the application interface comprises at least one of the following: a button, a title, a toolbar, a selection box, a switch, a slider, a progress bar, and an input box.   如申請專利範圍第1項所述的方法,其中,發送屬性值設置消息後,所述方法還包括:確定所述接收方應用利用屬性值設置消息中的屬性值所賦值的界面元素的標識,以及被所述接收方應用利用的屬性值; 在指定的觸發條件下,利用確定的被所述接收方應用利用的屬性值,為所述標識對應的所述接收方應用的界面元素賦值。  The method of claim 1, wherein, after the attribute value setting message is sent, the method further comprises: determining, by the receiver application, an identifier of an interface element assigned by the attribute value in the attribute value setting message, And an attribute value utilized by the recipient application; under the specified trigger condition, using the determined attribute value utilized by the recipient application to assign a value to the interface element of the recipient application corresponding to the identifier.   如申請專利範圍第1項所述的方法,其中,所述屬性值設置消息中,包含至少兩個屬性值。  The method of claim 1, wherein the attribute value setting message includes at least two attribute values.   如申請專利範圍第1或11項所述的方法,其中,所述屬性值設置消息中,還包含與各屬性值相映射的界面元素標識。  The method of claim 1 or claim 11, wherein the attribute value setting message further includes an interface element identifier mapped to each attribute value.   一種界面元素屬性值的設置方法,包括:應用接收屬性值設置消息;所述屬性值設置消息中,包含屬性值;根據所述屬性值,為所述應用的界面元素的屬性賦值。  A method for setting an interface element attribute value includes: an application receiving attribute value setting message; the attribute value setting message includes an attribute value; and assigning a value to the attribute of the application interface element according to the attribute value.   如申請專利範圍第13項所述的方法,其中,應用接收屬性值設置消息,包括:所述應用接收作業系統廣播的屬性值設置消息;或接收其他應用發送的屬性值設置消息。  The method of claim 13, wherein the application receiving the attribute value setting message comprises: the application receiving an attribute value setting message broadcast by the operating system; or receiving an attribute value setting message sent by another application.   如申請專利範圍第13項所述的方法,其中,所述屬性值設置消息中,包含至少兩個屬性值;則,根據所述屬性值為所述應用的界面元素的屬性賦值,包括:所述應用從所述至少兩個屬性值中選取屬性值,並根據選取的屬性值,為所述應用的界面元素的屬性賦值。  The method of claim 13, wherein the attribute value setting message includes at least two attribute values; and, according to the attribute value, assigning an attribute of the interface element of the application, including: The application selects an attribute value from the at least two attribute values, and assigns a value to an attribute of the interface element of the application according to the selected attribute value.   如申請專利範圍第13或15項所述的方法,其 中,所述屬性設置消息中,除包含屬性值外,還包含與各屬性值相映射的界面元素標識;則,所述根據所述屬性值為所述應用的界面元素的屬性賦值,包括:所述應用根據所述與各屬性值相映射的界面元素標識,從所述屬性設置消息包含的屬性值中,選取映射的界面元素標識與所述應用的界面元素標識相同的屬性值,為該應用的界面元素的屬性賦值。  The method of claim 13 or 15, wherein the attribute setting message includes, in addition to the attribute value, an interface element identifier mapped to each attribute value; The value is a value of the attribute of the interface element of the application, including: the application is configured according to the interface element identifier that is mapped to each attribute value, and the interface element identifier of the mapping is selected from the attribute value included in the attribute setting message. The interface elements of the application identify the same attribute value, and assign values to the attributes of the interface elements of the application.   如申請專利範圍第13項所述的方法,其中,根據所述屬性值為所述應用的界面元素的屬性賦值,包括:根據所述屬性值和預設的屬性值映射規則,計算所述屬性值所映射的其他屬性值;根據所述其他屬性值,為所述應用的界面元素的屬性賦值。  The method of claim 13, wherein assigning the attribute of the interface element of the application according to the attribute value comprises: calculating the attribute according to the attribute value and a preset attribute value mapping rule. Other attribute values mapped by the value; assign values to the attributes of the interface elements of the application based on the other attribute values.   如申請專利範圍第13至17項任一項所述的方法,其中,當所述屬性設置消息中,除包含屬性值外,還包含與屬性值相映射的界面元素標識時;為所述應用的界面元素的屬性賦值,包括:為界面元素標識所對應的所述應用的界面元素的屬性賦值。  The method of any one of the preceding claims, wherein the attribute setting message includes, in addition to the attribute value, an interface element identifier that is mapped to the attribute value; The attribute assignment of the interface element includes: assigning an attribute of the interface element of the application corresponding to the interface element identifier.   如申請專利範圍第18項所述的方法,其中,為界面元素標識所對應的所述應用的界面元素的屬性賦值,包括:根據所述與屬性值相映射的界面元素標識,以及預先 根據界面元素對應的界面功能為所述應用的界面元素設置的標識,從所述應用的界面元素中,確定具備的標識與所述映射關係中包含的界面元素標識相同的界面元素;為確定出的界面元素的屬性賦值。  The method of claim 18, wherein assigning an attribute of an interface element of the application corresponding to the interface element identifier comprises: selecting an interface element identifier according to the attribute value, and pre-corresponding to the interface The interface function corresponding to the element is an identifier set by the interface element of the application, and the interface element having the same identifier as the interface element identifier included in the mapping relationship is determined from the interface element of the application; the determined interface is The attribute assignment of the element.   如申請專利範圍第19項所述的方法,其中,所述界面元素標識,是採用下述方式設置的:確定應用界面中不同界面元素的功能;按照為具備相同功能的界面元素設置相同的界面元素標識,且為具備不同功能的界面設置的界面元素標識不同的方式,為所述應用界面中不同界面元素設置界面元素標識。  The method of claim 19, wherein the interface element identifier is set in the following manner: determining a function of different interface elements in the application interface; setting the same interface according to interface elements having the same function The element identifiers and the interface elements that are set for interfaces with different functions are identified differently, and the interface element identifiers are set for different interface elements in the application interface.   如申請專利範圍第20項所述的方法,其中,所述應用界面中的界面元素,包括下述至少一種:按鈕、標題、工具欄、選擇框、開關、滑塊、進度條、輸入框。  The method of claim 20, wherein the interface element in the application interface comprises at least one of the following: a button, a title, a toolbar, a selection box, a switch, a slider, a progress bar, and an input box.   如申請專利範圍第13項所述的方法,其中,所述方法還包括:所述應用向其他應用發送屬性值設置消息,以使得其他應用根據屬性值設置消息中的屬性值,對其他應用的界面元素的屬性進行賦值。  The method of claim 13, wherein the method further comprises: the application sending an attribute value setting message to other applications, so that other applications set the attribute value in the message according to the attribute value, and the other application The attributes of the interface elements are assigned.   如申請專利範圍第13項所述的方法,其中,所述屬性,為與顯示效果有關的屬性。  The method of claim 13, wherein the attribute is an attribute related to a display effect.   如申請專利範圍第23項所述的方法,其中,所述屬性包括下述至少一種: 顏色;透明度;亮度。  The method of claim 23, wherein the attribute comprises at least one of the following: color; transparency; brightness.   如申請專利範圍第13項所述的方法,其中,所述屬性值設置消息中,包含至少兩個屬性值。  The method of claim 13, wherein the attribute value setting message includes at least two attribute values.   如申請專利範圍第13或25項所述的方法,其中,所述屬性值設置消息中,還包含與各屬性值相映射的界面元素標識。  The method of claim 13 or claim 25, wherein the attribute value setting message further includes an interface element identifier mapped to each attribute value.   一種界面元素屬性值的設置裝置,包括:消息獲得單元,用於獲得屬性值設置消息;所述屬性值設置消息中,包含屬性值;消息發送單元,用於發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。  A device for setting an attribute value of an interface element, comprising: a message obtaining unit, configured to obtain an attribute value setting message; the attribute value setting message includes an attribute value; and a message sending unit, configured to send an attribute value setting message, so as to The receiver application of the attribute value setting message assigns an attribute of the interface element according to the attribute value.   如申請專利範圍第27項所述的裝置,其中,消息獲得單元,用於:產生屬性值設置消息;或接收屬性值設置消息。  The device of claim 27, wherein the message obtaining unit is configured to: generate an attribute value setting message; or receive an attribute value setting message.   如申請專利範圍第28項所述的裝置,其中,消息獲得單元,用於:在接收到壁紙設置指令後,產生屬性值設置消息;或在接收到主題設置指令後,產生屬性值設置消息;或在接收到伺服器發送的屬性值調整通知後,產生屬性值設置消息。  The device of claim 28, wherein the message obtaining unit is configured to: after receiving the wallpaper setting instruction, generate an attribute value setting message; or after receiving the theme setting instruction, generate an attribute value setting message; Or after receiving the attribute value adjustment notification sent by the server, an attribute value setting message is generated.   一種界面元素屬性值的設置裝置,包括:消息接收單元,用於接收屬性值設置消息;所述屬性 值設置消息中,包含屬性值;賦值單元,用於根據所述屬性值,為應用的界面元素的屬性賦值。  An apparatus for setting an attribute value of an interface element, comprising: a message receiving unit, configured to receive an attribute value setting message; the attribute value setting message includes an attribute value; and an assigning unit, configured to be an interface of the application according to the attribute value The attribute assignment of the element.   如申請專利範圍第30項所述的裝置,其中,所述屬性值設置消息中,包含至少兩個屬性值;則,賦值單元用於:從所述至少兩個屬性值中選取屬性值,並根據選取的屬性值,為所述應用的界面元素的屬性賦值。  The device of claim 30, wherein the attribute value setting message includes at least two attribute values; then, the evaluating unit is configured to: select an attribute value from the at least two attribute values, and Assigning values to the attributes of the interface elements of the application based on the selected attribute values.   如申請專利範圍第31項所述的裝置,其中,所述屬性設置消息中,除包含屬性值外,還包含與各屬性值相映射的界面元素標識;則,賦值單元用於:根據所述與各屬性值相映射的界面元素標識,從所述屬性設置消息包含的屬性值中,選取映射的界面元素標識與所述應用的界面元素標識相同的屬性值,為該應用的界面元素的屬性賦值。  The device of claim 31, wherein the attribute setting message includes, in addition to the attribute value, an interface element identifier mapped to each attribute value; then, the assignment unit is configured to: An interface element identifier that is mapped to each attribute value, and from the attribute value included in the attribute setting message, the interface element identifier of the mapping is selected to identify the same attribute value as the interface element identifier of the application, and the attribute of the interface element of the application is Assignment.   一種智慧設備,包括:記憶體,用於儲存計算機程式指令;處理器,耦合到所述記憶體,用於讀取所述記憶體儲存的計算機程式指令,並作為回應,執行如下操作:獲得屬性值設置消息;所述屬性值設置消息中,包含屬性值;發送屬性值設置消息,以使所述屬性值設置消息的接收方應用根據所述屬性值對界面元素的屬性進行賦值。  A smart device comprising: a memory for storing computer program instructions; a processor coupled to the memory for reading computer program instructions stored in the memory, and in response, performing the following operations: obtaining attributes a value setting message; the attribute value setting message includes an attribute value; and the attribute value setting message is sent to enable the recipient application of the attribute value setting message to assign an attribute of the interface element according to the attribute value.   一種智慧設備,包括: 記憶體,用於儲存計算機程式指令;處理器,耦合到所述記憶體,用於讀取所述記憶體儲存的計算機程式指令,並作為回應,執行如下操作:接收屬性值設置消息;所述屬性值設置消息中,包含屬性值;根據所述屬性值,為所述應用的界面元素的屬性賦值。  A smart device comprising: a memory for storing computer program instructions; a processor coupled to the memory for reading computer program instructions stored in the memory, and in response, performing the following operations: receiving attributes a value setting message; the attribute value setting message includes an attribute value; and according to the attribute value, assigning a value to an attribute of the interface element of the application.  
TW106102486A 2017-01-23 2017-01-23 Method, device and smart apparatus for setting interface element attribute value capable of solving problems of consuming more terminal resources caused by a method of changing terminal interface element in the prior art TW201828020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106102486A TW201828020A (en) 2017-01-23 2017-01-23 Method, device and smart apparatus for setting interface element attribute value capable of solving problems of consuming more terminal resources caused by a method of changing terminal interface element in the prior art

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106102486A TW201828020A (en) 2017-01-23 2017-01-23 Method, device and smart apparatus for setting interface element attribute value capable of solving problems of consuming more terminal resources caused by a method of changing terminal interface element in the prior art

Publications (1)

Publication Number Publication Date
TW201828020A true TW201828020A (en) 2018-08-01

Family

ID=63960250

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106102486A TW201828020A (en) 2017-01-23 2017-01-23 Method, device and smart apparatus for setting interface element attribute value capable of solving problems of consuming more terminal resources caused by a method of changing terminal interface element in the prior art

Country Status (1)

Country Link
TW (1) TW201828020A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407082A (en) * 2021-06-23 2021-09-17 青岛海信移动通信技术股份有限公司 Font color control method applied to terminal equipment and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407082A (en) * 2021-06-23 2021-09-17 青岛海信移动通信技术股份有限公司 Font color control method applied to terminal equipment and related device
CN113407082B (en) * 2021-06-23 2023-09-12 青岛海信移动通信技术有限公司 Font color control method and related device applied to terminal equipment

Similar Documents

Publication Publication Date Title
WO2017097140A1 (en) Method for setting attribute value of interface element, and apparatus and smart device therefor
US10885677B2 (en) Method and system for setting interface element colors
CN109191410B (en) Face image fusion method and device and storage medium
EP3754490B1 (en) User interface rendering method and apparatus, and terminal
WO2020038167A1 (en) Video image recognition method and apparatus, terminal and storage medium
US20200204725A1 (en) Method and Device for Displaying Shooting Interface, and Terminal
US10592292B2 (en) Method and apparatus for optimized execution using resource utilization maps
CN106873863B (en) Method and device for setting interface switching animation
US20150235387A1 (en) Information processing method and electronic device
WO2017097137A1 (en) Interface element background image display method, apparatus and intelligent device
CN101764971B (en) On-screen display device and on-screen display method thereof
JP7100154B6 (en) Processor core scheduling method, device, terminal and storage medium
CN107436712B (en) Method, device and terminal for setting skin for calling menu
CN112114929B (en) Display device and image display method thereof
WO2014101618A1 (en) Method and device for processing image data
CN111399965A (en) User interface compatible display method and device, equipment and storage medium
CN114449243B (en) White balance method and terminal equipment
TW201828020A (en) Method, device and smart apparatus for setting interface element attribute value capable of solving problems of consuming more terminal resources caused by a method of changing terminal interface element in the prior art
WO2019184017A1 (en) Control display method and electronic device
CN109035191A (en) Image processing method, picture processing unit and terminal device
CN109074220A (en) The method that dynamic changes user interface element
WO2017100341A1 (en) Methods and system for setting interface element colors
CN108848312A (en) It takes pictures method for previewing, device and electronic equipment
CN109118448A (en) It takes pictures processing method, device and electronic equipment
WO2015117345A1 (en) Method and device for displaying background