WO2017097137A1 - 一种界面元素背景图片的显示方法、装置及智能设备 - Google Patents

一种界面元素背景图片的显示方法、装置及智能设备 Download PDF

Info

Publication number
WO2017097137A1
WO2017097137A1 PCT/CN2016/107592 CN2016107592W WO2017097137A1 WO 2017097137 A1 WO2017097137 A1 WO 2017097137A1 CN 2016107592 W CN2016107592 W CN 2016107592W WO 2017097137 A1 WO2017097137 A1 WO 2017097137A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
color
interface element
color value
interface
Prior art date
Application number
PCT/CN2016/107592
Other languages
English (en)
French (fr)
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 阿里巴巴集团控股有限公司
Publication of WO2017097137A1 publication Critical patent/WO2017097137A1/zh

Links

Images

Classifications

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

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method, device, and smart device for displaying a background image of an interface element.
  • the user terminal before displaying the interface element, the user terminal obtains the corresponding resource from the resource file corresponding to the interface element. Further, the user terminal can display the interface element according to the predetermined display effect according to the acquired resource.
  • the resources mentioned here often include pictures.
  • the user terminal obtains a picture corresponding to the “button” from the resource file corresponding to the “button” before displaying the “button” of the control; further, the user terminal displays the picture to display the “control” by displaying the picture.
  • the preset interface area serves as a background image of the control, and the control is displayed according to a predetermined display effect.
  • the interface element corresponds to multiple resources, which occupies more storage space of the user terminal.
  • the embodiment of the present invention provides a method for displaying a background image of an interface element, which is used to solve the problem that the display mode of the background image of the existing interface element is used, which may result in occupying more storage space of the user terminal.
  • the embodiment of the present application further provides a display device for a background image of an interface element, which is used to solve the problem that the display mode of the background image of the existing interface element is used, which may result in occupying more storage space of the user terminal.
  • the embodiment of the present application further provides a smart device, which is used to solve the problem that the display mode of the background image of the existing interface element is used, which may result in occupying more storage space of the user terminal.
  • a method for displaying a background image of an interface element comprising:
  • the set picture is displayed in a preset first interface area for displaying the first interface element.
  • a display device for an interface element background image comprising:
  • the color attribute setting unit is configured to set a color attribute of the picture to obtain a set picture
  • a display unit configured to display the set picture in a preset first interface area for displaying the first interface element.
  • a smart device that includes:
  • a memory for storing computer program instructions
  • a processor coupled to the memory for reading the computer program instructions stored in the memory, and in response, performing the following operations: setting a color attribute of the picture to obtain a set picture; The preset first interface area of the interface element displays the set picture.
  • the color attribute of the picture can be set, the set picture is obtained, and the set picture is displayed in the preset interface area for displaying the interface element, so the interface element that needs to be displayed with different effects can pass the picture.
  • the color attributes are implemented in different settings, and it is not necessary to locally save multiple resources corresponding to different display effects in the user terminal, thereby avoiding excessive occupation of the storage space of the user terminal.
  • FIG. 1 is a flowchart of implementing a method for displaying a background image of an interface element according to an embodiment of the present application
  • FIG. 1b is a schematic diagram showing a color value displayed in an embodiment of the present application.
  • FIG. 2 is a flowchart of managing a resource file that allows modification of a configuration in an embodiment of the present application
  • FIG. 3 is a schematic diagram of a repacking mechanism adopted in an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a display device for a background image of an interface element according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a smart device according to an embodiment of the present disclosure.
  • the storage space of the user terminal is occupied, and the display method of the background image of the interface element is provided.
  • the execution body of the method may be, but is not limited to, an operating system, a basic application, or a third-party application installed on the user terminal.
  • the user terminal may be, for example, at least one of a mobile phone, a tablet computer, a personal computer (PC), a smart home device, and a smart wearable device.
  • a mobile phone for example, a mobile phone, a tablet computer, a personal computer (PC), a smart home device, and a smart wearable device.
  • PC personal computer
  • the basic application is an application that is installed in an operating system installed on the user terminal, such as a desktop application.
  • the third-party application is an application installed on the user terminal except the basic application.
  • the implementation of the method will be described below by taking the execution subject of the method as a third-party application as an example. It can be understood that the execution body of the method may also be an operating system, and the execution subject of the method is a third-party application, which is merely an exemplary description, and should not be construed as limiting the method.
  • FIG. 1a the implementation flowchart of the method provided by the embodiment of the present application is as shown in FIG. 1a, and includes the following steps:
  • Step 11 The third-party application sets the color attribute of the picture to obtain the set picture.
  • Step 12 The third-party application displays the set picture in a preset interface area for displaying interface elements.
  • the picture described in the "Setting the color attribute of a 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 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 this embodiment of the present application.
  • the picture is hereinafter referred to as a picture to be set.
  • the interface element may be, for example, but not limited to, at least one of an interface element including a button, a selection box, a switch, a slider, a progress bar, or an input box, which can be used as a background by a picture to achieve a predetermined display effect.
  • the set image will be used as the interface element of the background image, which is called "first interface element”.
  • the color attribute of the picture may be set by using at least one of the following information:
  • the state of the first interface element specifies the color value of the image; specifies the mapping relationship between the event and the color value; the color value selected by the user.
  • the color value of the current state map of the first interface element may be determined according to the mapping relationship between the different states of the first interface element and the color value; and then, according to the determined color value, the color attribute of the set image is set.
  • the first interface element is a control "button", and the "button” has three states, "press”, "normal”, and “not available”.
  • the color values corresponding to the three states may be preset. For example, you can set “press” to correspond to the dark blue color value; “normal” corresponds to the light blue color value; “not available” corresponds to the gray color value.
  • the third-party application can set the color attribute of the set picture by using the color value corresponding to the dark blue corresponding to "press".
  • the color value representing the dark blue color may be directly set to the value of the color attribute of the image to be set; or, according to the color value representing the dark blue color, the color value may be calculated according to the preset color value calculation method, and The calculated color value is set to the value of the color attribute of the picture to be set.
  • the specified picture may be any picture saved locally by the user terminal.
  • 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.
  • the specified picture includes the user terminal, in the embodiment of the present application, in order to ensure that the color value of the currently used wallpaper is associated with the color value of the background image of the interface element.
  • the following step I to sub-step III can be used to obtain the color value of the specified picture (hereinafter referred to as the first color value):
  • Sub-step I the user terminal receives a wallpaper setting instruction
  • Sub-step II the user terminal responds to the received wallpaper setting instruction, and sets the picture corresponding to the wallpaper setting instruction as the wallpaper currently used by the user terminal;
  • Sub-step III The user terminal determines the first color value according to the pixel color value of the picture corresponding to the wallpaper setting instruction.
  • the foregoing sub-step I to sub-step III may be specifically performed by an operating system (or a basic application) of the user terminal, so that the operating system (or the basic application) may send the determined first color value to the third party.
  • the third-party application is executed to trigger the third-party application to perform step 11 to step 12; or, the foregoing sub-step I to sub-step III may be performed by a third-party application installed on the user terminal.
  • step 12 shown in FIG. 1a it is possible to associate the pixel color value of the wallpaper currently used by the user terminal with the color of the background image of the interface element as soon as possible, thereby ensuring that the user obtains a better visual experience as soon as possible.
  • 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.
  • the specified picture may be 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.
  • RGB Red Green Blue
  • the first color value is at least one color value determined according to a pixel color value of the specified picture.
  • the user terminal may determine a certain pixel color value of the specified picture as the first color value; or the user terminal may also calculate an average value of all pixel color values of the specified picture, and determine the mean value. a first 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 first 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 first 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.
  • the above "primary color tone” indicates a basic tendency of color appearance.
  • 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 one.
  • 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”.
  • 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.
  • the first color value may be directly set as the value of the color attribute of the image to be set; or the color value may be calculated according to the first color value and the preset color value calculation method, and the calculation may be performed. Get the face The color value, set to the value of the color property of the picture to be set.
  • the specified event mentioned here may be, for example, a time-related event, such as an arrival of a holiday, or a birthday of a user, etc.; or, an event occurring at a user terminal, such as a short message that the user terminal receives the specified contact.
  • the user terminal makes an order payment or the user terminal obtains forecast information of a specified type of weather (such as a sunny day or a cloudy day), and the like.
  • the color value mapped to the currently existing specified event may be determined according to the mapping relationship between the specified event and the color value; further, the color attribute of the image to be set may be set according to the determined color value.
  • the determined color value may be directly set as the value of the color attribute of the image to be set; or the color value may be calculated according to the determined color value and the preset color value calculation method, and The calculated color value is set to the value of the color attribute of the picture to be set.
  • a color value interface including at least two colors may be displayed; subsequently, according to the user's selection of the color included in the displayed color value interface, the corresponding color value is determined as the color value selected by the user, and then according to the color value selected by the user. , set the color properties of the set picture.
  • the color value interface as shown in Figure 1b can be displayed. Based on the user's operation on the region of different colors in the interface (such as a click operation or a gesture operation), one or several color values selected by the user may be determined, thereby setting the color attribute of the image to be set according to the color value selected by the user.
  • the color value selected by the user may be directly set to the value of the color attribute of the image to be set; or the color value may be calculated according to the preset color value calculation method according to the color value selected by the user. And set the calculated color value to the value of the color attribute of the picture to be set.
  • the color attribute setting of the picture may be implemented according to any of the above methods; when the user selects two or more color values, the picture may be separately set according to different color values.
  • the value of the color attribute of the different image parts included, or the color attribute of the picture may be set according to the average of the different color values.
  • the following further describes how to set the color attribute of the set picture according to at least two of the first interface element state, the specified picture, the specified event, and the color value selected by the user.
  • the color value A mapped to the current state of the first interface element and the average value of the color value B determined according to the specified picture may be calculated, thereby setting the color attribute of the picture to be set according to the average value.
  • the color attribute of the picture can be set, the set picture is obtained, and the set picture is displayed in the preset interface area for displaying the interface element, so
  • the interface elements of the effect display can be implemented by differently setting the color attributes of the image, and it is not necessary to locally save multiple resources corresponding to different display effects in the user terminal, thereby avoiding excessive occupation of the storage space of the user terminal.
  • the picture described in the step 11 may be a picture in a resource file (hereinafter referred to as a first resource file) of the third-party application as an execution subject.
  • the third-party application can obtain the image by performing an operation of acquiring the image from the first resource file, and then perform steps 11 and 12.
  • the resource file corresponding to the interface element only a small number (such as a picture) may be set, and then the application to which the interface element belongs invokes the picture in the resource file, and is as shown in FIG. 1a.
  • the method shown is to set the color attribute of the picture, and display the set picture as the background picture of the interface element.
  • a resource file including a picture with a color attribute settable may be referred to as “a resource file that allows modification of the configuration”.
  • the resource file that allows modification of the configuration may include a color configuration scheme corresponding to the picture in addition to the picture.
  • the mapping between different states and color values of the interface elements may be specified in the color configuration scheme, so that the color attributes of the image may be set according to the mapping relationship.
  • the resource file allowed to modify the configuration may be managed by using the process shown in FIG. 2, so that the operating system is expected to be installed to the terminal.
  • the terminal device manufacturer (hereinafter referred to as the terminal manufacturer) in the device can conveniently find the resource file, and then modify the color configuration scheme corresponding to the picture and/or picture in the resource file.
  • the process includes the following steps:
  • Step 21 The system developer names the resource files that are allowed to be modified and configured by the operating system according to a predetermined naming manner, so that the names of the resource files have the same identifier that can be recognized by the terminal manufacturer.
  • the resource file that allows modification of the configuration may be followed by an application (base application) that is provided by the operating system.
  • the resource file that allows modification of the configuration may be subsequently invoked by other applications (third party applications) outside the base application.
  • Step 22 The system developer copies the resource files that are allowed to modify the configuration to a specified directory of the operating system
  • step 22 by instructing the operating system to run a script file for implementing "copy each resource file that allows modification of the configuration to a specified directory of the operating system.”
  • Step 23 The terminal manufacturer identifies the resource file in the operating system directory that is allowed to modify the configuration according to the identifier in step 21, and modifies the picture and/or color configuration scheme in the resource file according to the requirement.
  • the terminal manufacturer expects that the colors of the background images corresponding to the "press”, “normal”, and “unavailable” states of the "sms application” are “green”, “yellow”, and “grey”, respectively.
  • the color configuration scheme corresponding to the button provided by the system developer specifies that the color of the background image corresponding to the three states is “red”, “white” and “grey”, and the terminal manufacturer can according to his own needs. Modify the color configuration scheme.
  • modified resource file that allows modification of the configuration is referred to as a modified resource file.
  • Step 24 The terminal manufacturer recompiles the operating system by using a compile-time resource replacement mechanism, so that the compiled operating system file includes the modified resource file.
  • the process of managing the resource file is as shown in FIG. 2, so that the terminal manufacturer can conveniently find the resource file that allows the configuration to be modified, and then modify the color configuration scheme corresponding to the picture and/or picture in the resource file, so In the case of the interface elements displayed by different display effects, only a small number (for example, one) of pictures can be set in the corresponding resource file, so that the storage resources of the user terminal can be saved compared with the prior art.
  • the terminal manufacturer wants the system developer to provide a personalized background image display scheme of the interface element, the terminal manufacturer and the system developer need to communicate to complete the modification.
  • the terminal manufacturer can modify the resource file that allows modification of the configuration according to the requirements of the device, and does not need to communicate with the system developer, thereby improving the modification efficiency of the resource file.
  • the system developer can generally only provide the vendor binary executable file, and does not provide Source code.
  • the terminal manufacturer cannot obtain it.
  • the system developer can use the repackaging mechanism as shown in FIG. 3 to provide the terminal manufacturer with the permission to repair while avoiding providing the source code of the application to the terminal manufacturer. Change the configured resource file.
  • the implementation process of the repackaging mechanism includes the following steps:
  • Step 31 Before the operating system provides the operating system to the terminal manufacturer, the system developer performs full compilation on the basis of the operating system source code to generate all executable files of the operating system;
  • full compilation of the source code means that the source code is compiled into an executable file.
  • Step 32 the system developer determines the executable file of the application that needs source code protection, and utilizes the feature that the executable file itself is a compressed file in a zip format, and decompresses it to obtain a truly executable executable file.
  • Binary and resource files
  • the binary file mentioned here is a file that can be executed in the executable file of the application.
  • the source code that the system developer needs to protect is included in the file.
  • the file can be encrypted so that the terminal manufacturer cannot obtain the source code.
  • the executable file of the application that needs source code protection is generally the Android installation package (Android Package, APK), and the binary file obtained by decompressing the APK is generally a binary dex file.
  • APK Android Installation package
  • APK Binary Dex file
  • Step 33 The system developer saves the obtained binary file in the source code directory of the application, and deletes the executable file of the application that needs source code protection, that is, deletes the executable file of the application that needs source code protection determined in step 32. file.
  • Step 34 If the terminal manufacturer informs the system developer of the modification requirement of the background image of the interface element, the system developer may modify the resource file obtained by decompressing by performing step 32 according to the modification requirement, and obtain the modified resource.
  • the resource file mentioned here is equivalent to the resource file that allows the modification configuration as described above.
  • step 35 the system developer repackages the binary dex file and the corresponding resource file into a standard executable file (eg, packaged into an APK).
  • a standard executable file eg, packaged into an APK.
  • the system developer provides the operating system with the repackaged standard executables to the terminal vendor.
  • the system developer may also adopt the steps 21 and 22 described above to implement the resource file to be placed in the specified directory, and then the terminal manufacturer itself to the resource file. to modify.
  • the color attribute can be set from the resource file (hereinafter referred to as the first resource file) included in the installation package.
  • the picture thus performing the steps shown in Figure 1a, completes the display of the background picture for the interface element.
  • each background image of the interface elements may be obtained by setting the color attributes of the same picture. Therefore, in this embodiment, the application may be set for different applications.
  • the foregoing first resource file may be a resource file dedicated to an application with respect to the second resource file.
  • the background image of the first interface element of the different interface elements is obtained from the first resource file, and the different interface elements are The background image of the second interface element is obtained from the second resource file.
  • the method shown in FIG. 1a may be adopted, and the background image of the first interface element is implemented based on the image acquired from the first resource file. Displaying; on the other hand, obtaining a picture corresponding to the second interface element from the second resource file, and according to the picture corresponding to the second interface element, in the preset for displaying the second interface element The second interface area is displayed as a picture.
  • execution bodies of the steps of the method provided in Embodiment 1 may all be the same device, or the method may also be performed by different devices.
  • step 12 can be performed in synchronization with step 13, or step 12 can be performed after step 13.
  • the number is 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 application cannot be regarded as a limitation step execution. The characteristics of the order.
  • the embodiment 1 of the present application provides a display device for the background image of the interface element.
  • the specific structure of the device is shown in Figure 4, including:
  • a color attribute setting unit 41 configured to set a color attribute of the picture to obtain a set picture
  • the display unit 42 is configured to display the set picture obtained by the color attribute setting unit 41 in the preset first interface area for displaying the first interface element.
  • the color attribute setting unit 41 may be, but not limited to, configured to set a color attribute of the picture according to at least one of the following information:
  • the color value selected by the user is the color value selected by the user.
  • the color attribute setting unit 41 is configured to:
  • the color attribute of the picture is set according to the color value of the wallpaper currently used by the user terminal, and/or the color value of the picture corresponding to the picture selection instruction.
  • a color value interface including at least two colors is displayed, and a color attribute of the picture is set according to a user's selection of a color included in the color value interface.
  • the apparatus provided in this embodiment of the present application may further include:
  • a picture obtaining unit configured to obtain the picture from the first resource file.
  • the first resource file is obtained from an installation package of an application to which the first interface element belongs;
  • the installation package is obtained by packaging the first resource file and an executable binary file.
  • the picture obtaining unit may be further configured to obtain, from the second resource file, a picture corresponding to the second interface element.
  • the display unit 42 is further configured to perform picture display on the preset second interface area for displaying the second interface element according to the picture corresponding to the second interface element.
  • the color attribute of the picture can be set, the set picture is obtained, and the set picture is displayed in the preset interface area for displaying the interface element, so
  • the interface elements of the effect display can be implemented by differently setting the color attributes of the image, and it is not necessary to locally save multiple resources corresponding to different display effects in the user terminal, thereby avoiding excessive occupation of the storage space of the user terminal.
  • the user terminal has a large storage space, and the smart device shown in FIG. 5 is provided in Embodiment 3 of the present application.
  • the smart device may be, for example, at least one of a mobile phone, a tablet computer, a personal computer (PC), a smart home device, and a smart wearable device.
  • the smart device includes a memory 51 and a processor 52. among them:
  • the memory 51 is configured to store computer program instructions.
  • Processor 52 is coupled to memory 51.
  • the processor 52 is configured to read the computer program instructions stored in the memory 51 and, in response, perform the following operations:
  • the first interface area displays the set picture.
  • the processor 52 may be specifically configured to set a color attribute of the picture according to at least one of the following information:
  • the state of the first interface element specifies the image; specifies the event; the color value selected by the user.
  • the color attribute of the image is set according to the state of the first interface element
  • the processor 52 may be configured to: determine the current state of the first interface element according to the mapping relationship between the different states of the first interface element and the color value.
  • the color value of the state map; the color properties of the image are set according to the determined color value.
  • the processor 52 may be configured to: according to the color value of the wallpaper currently used by the user terminal, and/or the color value of the image corresponding to the image selection instruction, the image is The color properties are set.
  • the color attribute of the picture is set according to the specified event.
  • the processor 52 may be specifically configured to determine, according to the mapping relationship between each specified event and the color value, when the first specified event exists, determine the first designation.
  • the color value of the event map ; set the color property of the image based on the determined color value.
  • the color attribute of the picture is set according to the color value selected by the user.
  • the processor 52 may be specifically configured to display a color value interface including at least two colors, and according to the color included in the interface of the color value by the user. The choice is to set the color properties of the image.
  • the memory 51 is further configured to store an installation package of an application to which the first interface element belongs.
  • the processor 52 is further configured to acquire the picture from a first resource file in an installation package of an application to which the first interface element stored in the memory 51 belongs.
  • the installation package is obtained by packaging the first resource file and an executable binary file.
  • the memory 51 is further configured to store a second resource file.
  • the processor 52 is further configured to: obtain a picture corresponding to the second interface element from the second resource file stored in the memory 51; and display the second interface element according to the acquired picture corresponding to the second interface element
  • the second interface area is preset to perform picture display.
  • the set picture is obtained, and the set picture is displayed in the preset interface area for displaying the interface element, so
  • the interface elements displayed by different effects can be implemented by differently setting the color attributes of the image, and it is not necessary to locally save multiple resources corresponding to different display effects in the user terminal, thereby avoiding excessive occupation of the storage space of the user terminal.
  • the smart device in which the device is located in the embodiment is usually According to the actual function of the smart device, other hardware, such as a memory, a network interface, and the like, may be included, and details are not described herein.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • 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 the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/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.

Landscapes

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

Abstract

本申请公开了一种界面元素背景图片的显示方法、装置及智能设备,用以解决采用现有的界面元素背景图片的显示方式,会导致占用用户终端较多存储空间的问题。方法包括:对图片的颜色属性进行设置,得到设置后的图片;在用于显示第一界面元素的预设第一界面区域,显示所述设置后的图片。

Description

一种界面元素背景图片的显示方法、装置及智能设备
本申请要求2015年12月09日递交的申请号为201510908409.8、发明名称为“一种界面元素背景图片的显示方法、装置及智能设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种界面元素背景图片的显示方法、装置及智能设备。
背景技术
现有技术中,用户终端在显示界面元素前,会从界面元素对应的资源文件中获取相应的资源。进一步地,用户终端根据获取到的资源,可以实现按照预定的显示效果显示界面元素。其中,这里所说的资源,往往包括图片。
比如,用户终端在显示控件“按钮”前,会从“按钮”对应的资源文件中获取与该“按钮”对应的图片;进一步地,用户终端通过将该图片显示到用于展示该“控件”的预设界面区域作为该控件的背景图片,实现按照预定的显示效果显示该控件。
上述方案存在的问题在于,针对需要采用不同显示效果进行显示的界面元素而言,该界面元素会对应多个资源,从而会占用用户终端较多的存储空间。
发明内容
本申请实施例提供一种界面元素背景图片的显示方法,用以解决采用现有的界面元素背景图片的显示方式,会导致占用用户终端较多存储空间的问题。
本申请实施例还提供一种界面元素背景图片的显示装置,用以解决采用现有的界面元素背景图片的显示方式,会导致占用用户终端较多存储空间的问题。
本申请实施例还提供一种智能设备,用以解决采用现有的界面元素背景图片的显示方式,会导致占用用户终端较多存储空间的问题。
本申请实施例采用下述技术方案:
一种界面元素背景图片的显示方法,包括:
对图片的颜色属性进行设置,得到设置后的图片;
在用于显示第一界面元素的预设第一界面区域,显示所述设置后的图片。
一种界面元素背景图片的显示装置,包括:
颜色属性设置单元,用于对图片的颜色属性进行设置,得到设置后的图片;
显示单元,用于在用于显示第一界面元素的预设第一界面区域,显示所述设置后的图片。
一种智能设备,包括:
存储器,用于存储计算机程序指令;
处理器,耦合到所述存储器,用于读取所述存储器存储的计算机程序指令,并作为响应,执行如下操作:对图片的颜色属性进行设置,得到设置后的图片;在用于显示第一界面元素的预设第一界面区域,显示所述设置后的图片。
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:
由于可以对图片的颜色属性进行设置,得到设置后的图片,并在用于显示界面元素的预设界面区域,显示设置后的图片,因此针对需要用不同效果显示的界面元素,可以通过对图片的颜色属性进行不同的设置来实现,无需在用户终端本地保存对应于不同显示效果的多个资源,从而可以避免对于用户终端存储空间的过多占用。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1a为本申请实施例提供的一种界面元素背景图片的显示方法的实现流程图;
图1b为本申请实施例中显示的一种颜色值的示意图;
图2为本申请实施例中对允许修改配置的资源文件进行管理的流程图;
图3为本申请实施例中采用的重打包机制的示意图;
图4为本申请实施例提供的一种界面元素背景图片的显示装置的具体结构示意图;
图5为本申请实施例提供的一种智能设备的具体结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
以下结合附图,详细说明本申请各实施例提供的技术方案。
实施例1
为解决采用现有的界面元素背景图片的显示方式,会导致占用用户终端较多存储空间的问题,本申请实施例1提供一种界面元素背景图片的显示方法。该方法的执行主体,可以但不限于为安装在用户终端上的操作系统、基础应用或者第三方应用。
其中,所述用户终端,比如可以是手机、平板电脑、个人电脑(Personal Computer,PC)、智能家居设备和智能可穿戴设备中的至少一种。
所述基础应用,为安装在用户终端上的操作系统自带的应用,如桌面应用等。
所述第三方应用,为安装在用户终端上的、除所述基础应用外的其他应用。
为便于描述,下文以该方法的执行主体为第三方应用为例,对该方法的实施方式进行介绍。可以理解,该方法的执行主体还可以是操作系统,该方法的执行主体为第三方应用只是一种示例性的说明,并不应理解为对该方法的限定。
具体地,本申请实施例提供的该方法的实现流程图如图1a所示,包括如下步骤:
步骤11,第三方应用对图片的颜色属性进行设置,得到设置后的图片;
步骤12,第三方应用在用于显示界面元素的预设界面区域,显示设置后的图片。
以下分别对上述两个步骤进行具体说明。
针对步骤11而言:
“对图片的颜色属性进行设置”这一操作中所述的图片,一般是指可用于界面元素的背景图片的图片。该图片的大小和形状,可以是根据界面元素的预期显示效果来设置的。该图片可以是位图,也可以是矢量图。该图片可以具备,也可以不具备纹理特征或形状特征,本申请实施例对此不作限定。为便于描述,后文将该图片称为待设置图片。
所述界面元素,比如可以但不限于包括按钮、选择框、开关、滑块、进度条或输入框等可以借助图片作为背景从而达到预定显示效果的界面元素中的至少一种。
为便于描述,后文将采用设置后的图片作为背景图片的界面元素,称为“第一界面元素”。
本申请实施例中,可以但不限于采用下述至少一种信息,对图片的颜色属性进行设置:
第一界面元素的状态;指定图片的颜色值;指定事件与颜色值的映射关系;用户选取的颜色值。
以下分别介绍如何根据上述一种信息,以及如何根据上述信息的组合,对待设置图 片的颜色属性进行设置。
首先,对如何根据上述一种信息对待设置图片的颜色属性进行设置进行介绍。
1、根据第一界面元素的状态,对待设置图片的颜色属性进行设置。
比如,可以根据第一界面元素的不同状态与颜色值的映射关系,确定第一界面元素的当前状态映射的颜色值;然后,根据确定的颜色值,对待设置图片的颜色属性进行设置。
举例而言,若第一界面元素为控件“按钮”,而“按钮”具备三种状态,分别为“按下”、“常态”和“不可用”。则本申请实施例中,可以预先设置这三种状态分别对应的颜色值。比如,可以设置“按下”对应表示深蓝色的颜色值;“常态”对应表示浅蓝色的颜色值;“不可用”对应表示灰色的颜色值。
那么,当“按钮”当前的状态为“按下”时,第三方应用可以利用“按下”对应的表示深蓝色的颜色值,对待设置图片的颜色属性进行设置。比如,可以直接将表示深蓝色的颜色值,设置为待设置图片的颜色属性的值;或者,也可以根据该表示深蓝色的颜色值,按照预设的颜色值计算方法计算颜色值,并将计算得到的颜色值,设置为待设置图片的颜色属性的值。
2、根据指定图片,对待设置图片的颜色属性进行设置。
其中,所述指定图片,比如可以是用户终端本地保存的任意图片。如,可以是用户终端当前使用的壁纸,或者,可以是用户指定的某个图片。
所述壁纸,可以是桌面壁纸,也可以是锁屏壁纸,等等。
为了保证用户终端当前使用的壁纸发生变化后,能够高效地使得当前使用的壁纸的像素颜色值与界面元素的背景图片的颜色值产生关联,本申请实施例中,当所述指定图片包括用户终端当前使用的壁纸时,可以采用下述步骤Ⅰ~子步骤Ⅲ,实现获取指定图片的颜色值(后称第一颜色值):
子步骤Ⅰ:用户终端接收壁纸设置指令;
子步骤Ⅱ:用户终端响应接收到的壁纸设置指令,将对应于壁纸设置指令的图片设置为用户终端当前使用的壁纸;
子步骤Ⅲ:用户终端根据对应于壁纸设置指令的图片的像素颜色值,确定第一颜色值。
具体地,上述子步骤Ⅰ~子步骤Ⅲ具体可以是由用户终端的操作系统(或者基础应用)来执行的,从而操作系统(或者基础应用)可以将确定出的第一颜色值发送给第三方应 用,以触发第三方应用执行步骤11~步骤12;或者,上述子步骤Ⅰ~子步骤Ⅲ还可以是由用户终端上安装的第三方应用执行的。
通过上述子步骤Ⅰ~子步骤Ⅲ,可以实现在用户终端完成对于当前使用的壁纸的设置后,即可尽快确定第一颜色值。进一步结合图1a所示的步骤12,可以实现尽快使得用户终端当前使用的壁纸的像素颜色值与界面元素的背景图片的颜色产生关联,从而保证用户尽快获得较好的视觉体验。
针对所述用户指定的某个图片而言,该图片比如可以是用户终端响应于接收到的图片选取指令而确定的某个图片。该图片选取指令,比如可以是针对图片的点击指令或者手势指令。
所述指定图片可以为位图。当所述指定图片为位图时,所述指定图片的各个像素具备颜色值,像素具备的颜色值也可称像素颜色值。各像素颜色值,均可以但不限于由一个或多个红绿蓝(Red Green Blue,RGB)数组表示,或者由根据RGB数组确定出的一个或多个参数值表示,等等。
所述的第一颜色值,是根据所述指定图片的像素颜色值确定的至少一个颜色值。具体而言,用户终端可以将所述指定图片的某个像素颜色值,确定为第一颜色值;或者,用户终端也可以计算所述指定图片的所有像素颜色值的均值,并将该均值确定为第一颜色值;或者,用户终端还可以统计所述指定图片中具备不同颜色值的像素的数量,并将统计出的所有数量中的最大数量所对应的颜色值,作为第一颜色值;或者,用户终端还可以确定用于表示所述指定图片的主色调的像素颜色值,并将该像素颜色值确定为第一颜色值;等等。
所述指定图片的像素颜色值,可以但不限于是用户终端通过对所述指定图片的像素的颜色值进行采样而获得的。
其中,上述“主色调”表示色彩外观的基本倾向。具体而言,一幅图片虽然用了多种颜色,但图片在色彩总体上是有一种倾向的,比如是偏蓝或偏红,是偏暖或偏冷等等,色彩外观的基本倾向就是一幅图片的主色调。通常,主色调从冷暖方面进行划分,可以有“暖色调”、“冷色调”和“中间色调”。一般地,红色、橙色、黄色为表示暖色调;绿色、蓝色、黑色表示冷色调;而灰色、紫色、白色则表示中间色调。冷色调的亮度越高,其整体感觉越偏暖,暖色调的亮度越高,其整体感觉越偏冷。
本申请实施例中,可以直接将第一颜色值,设置为待设置图片的颜色属性的值;或者,也可以根据该第一颜色值和预设的颜色值计算方法计算颜色值,并将计算得到的颜 色值,设置为待设置图片的颜色属性的值。
3、根据指定事件,对待设置图片的颜色属性进行设置。
这里所说的指定事件,比如可以是与时间有关的事件,如节假日到来,或者用户生日到来,等等;或者,也可以是用户终端发生的事件,如用户终端接收到指定联系人的短消息、用户终端进行订单支付或者用户终端获取到指定类型的天气(如晴天或阴天)的预报信息,等等。
在当前存在指定事件时,可以根据各指定事件与颜色值的映射关系,确定与当前存在的该指定事件映射的颜色值;进一步地,可以根据确定的颜色值,对待设置图片的颜色属性进行设置。
本申请实施例中,可以直接将确定出的颜色值,设置为待设置图片的颜色属性的值;或者,也可以根据确定出的颜色值和预设的颜色值计算方法计算颜色值,并将计算得到的颜色值,设置为待设置图片的颜色属性的值。
4、根据用户选取的颜色值,对待设置图片的颜色属性进行设置。
比如,可以显示包括至少两种颜色的颜色值界面;后续根据用户对显示的该颜色值界面中包括的颜色的选择,确定相应的颜色值作为用户选取的颜色值,进而根据用户选取的颜色值,对待设置图片的颜色属性进行设置。
比如,可以显示如图1b所示的该颜色值界面。基于用户对于界面中的不同颜色所在区域的操作(如点击操作或手势操作),可以确定用户选取的一个或几个颜色值,从而根据用户选取的颜色值,对待设置图片的颜色属性进行设置。
本申请实施例中,可以直接将用户选取的颜色值,设置为待设置的图片的颜色属性的值;或者,也可以根据用户选取的颜色值,按照预设的颜色值计算方法计算颜色值,并将计算得到的颜色值,设置为待设置的图片的颜色属性的值。
当用户仅选取了一个颜色值时,可以按照上述任一方式实现对于该图片的颜色属性的设置;当用户选取了两个及以上的颜色值时,可以根据不同的颜色值,分别设置该图片包含的不同图片部分的颜色属性的值,或者,也可以根据不同的颜色值的平均值,设置该图片的颜色属性。
以下进一步介绍如何根据第一界面元素的状态、指定图片、指定事件以及用户选取的颜色值这几种信息中的至少两种,对待设置图片的颜色属性进行设置。
比如,可以计算与第一界面元素的当前状态相映射的颜色值A,以及根据指定图片确定出的颜色值B的平均值,从而根据该平均值,对待设置图片的颜色属性进行设置。
采用本申请实施例提供的上述方法,由于可以对图片的颜色属性进行设置,得到设置后的图片,并在用于显示界面元素的预设界面区域,显示设置后的图片,因此针对需要用不同效果显示的界面元素,可以通过对图片的颜色属性进行不同的设置来实现,无需在用户终端本地保存对应于不同显示效果的多个资源,从而可以避免对于用户终端存储空间的过多占用。
以下进一步对实施例1提供的该方法的一些可选的实现方式进行介绍。
实施例1中,步骤11中所述的图片,可以是作为执行主体的所述第三方应用的资源文件(后称第一资源文件)中的图片。第三方应用通过执行从第一资源文件中获取该图片的操作,可以获取到该图片,进而执行步骤11和步骤12。
需要说明的是,按照前文背景技术部分的介绍可知,如果期望同一界面元素在不同场景下具有不同的显示效果,现有技术中采用的是直接调用界面元素对应的资源文件中的图片进行替换的方式。该方式要求设计人员按照不同的显示效果设计不同的图片,从而会耗费较多的人力资源,并且也导致界面元素所对应的资源所占据的存储空间较大。
而在本申请实施例中,界面元素所对应的资源文件中,可以仅设置少量(比如一张)图片,后续该界面元素所属的应用调用该资源文件中的该图片,并通过如图1a所示的方法,即可实现设置该图片的颜色属性,并将设置后的图片,作为界面元素的背景图片进行展示。
本申请实施例中,可以将包含颜色属性可设置的图片的资源文件,称为“允许修改配置的资源文件”。一般地,允许修改配置的资源文件除了可以包含该图片外,还可以包含该图片对应的颜色配置方案。该颜色配置方案中比如可以规定界面元素的不同状态与颜色值的映射关系,以便后续可以根据该映射关系,实现对该图片的颜色属性的设置。
针对操作系统的开发商(后称系统开发商)而言,本申请实施例中,可以采用如图2所示的流程,对允许修改配置的资源文件进行管理,以便期望将操作系统安装到终端设备中的终端设备厂商(后称终端厂商)可以方便地查找该资源文件,进而对该资源文件中的图片和/或图片对应的颜色配置方案进行修改。
如图2所示,该流程包括如下步骤:
步骤21,系统开发商按照预定的命名方式,对操作系统提供的各允许修改配置的资源文件进行命名,以使得各个所述资源文件的名称中具备相同的、可被终端厂商识别的标识;
所述允许修改配置的资源文件,后续可以允许操作系统自带的应用(基础应用)调 用;或者,所述允许修改配置的资源文件,后续也可以允许基础应用外的其他应用(第三方应用)调用。
步骤22,系统开发商将各允许修改配置的资源文件拷贝到操作系统的指定目录中;
比如,系统开发商可以通过指示操作系统运行用于实现“将各允许修改配置的资源文件拷贝到操作系统的指定目录下”的脚本文件,来完成步骤22。
步骤23,终端厂商根据步骤21中所述的标识,识别所述操作系统目录下的允许修改配置的资源文件,并根据自身需求,对该资源文件中的图片和/或颜色配置方案进行修改。
比如,终端厂商期望“短信应用”的某按钮的“按下”、“常态”和“不可用”三种状态分别对应的背景图片的颜色为“绿色”、“黄色”和“灰色”,而系统开发商提供的对应于该按钮的颜色配置方案中,规定所述三种状态分别对应的背景图片的颜色为“红色”、“白色”和“灰色”,则终端厂商可以根据自身的需求,对所述颜色配置方案进行修改。
为便于描述,后文将修改后的允许修改配置的资源文件,称为修改后的资源文件。
步骤24,终端厂商采用编译时资源替换的机制,重新编译操作系统,使得编译得到的操作系统的文件中包含修改后的资源文件。
采用如图2所示的管理资源文件的步骤,可以实现终端厂商方便地查找允许修改配置的资源文件,进而对该资源文件中的图片和/或图片对应的颜色配置方案进行修改,因此针对需要采用不同显示效果显示的界面元素而言,相应的资源文件中可以仅设置较少数量(比如一张)的图片,从而相对于现有技术而言,可以节省用户终端的存储资源。另一方面,相比于现有技术中若终端厂商希望系统开发商提供个性化的界面元素背景图片显示方案,则需要终端厂商与系统开发商进行交流才能完成修改的情况相比,采用本申请实施例提供的上述管理流程,终端厂商可以根据自身需求,对允许修改配置的资源文件进行修改,无需与系统开发商交流,从而可以提高对于资源文件的修改效率。
本申请实施例中,系统开发商提供给终端厂商的操作系统中,可能会存在一些需要源代码保护的应用,针对这样的应用,系统开发商一般只能提供给厂商二进制可执行文件,不提供源代码。在这样的场景下,若将图片的数据和/或图片对应的颜色配置方案写到源代码中,则终端厂商是无法获取到的。
因此,针对上述情况,本申请实施例中提出,系统开发商可以采用如图3所示的重打包机制,实现在避免向终端厂商提供应用的源代码的前提下,向终端厂商提供允许修 改配置的资源文件。
具体地,该重打包机制的实现流程包括如下步骤:
步骤31,系统开发商在将操作系统提供给终端厂商前,在操作系统的源代码的基础上进行全编译,生成操作系统的所有可执行文件;
其中,对源代码进行全编译,是指将源代码编译成可执行文件。
步骤32,系统开发商确定需要源代码保护的应用的可执行文件,并利用可执行文件本身是一个zip格式的压缩文件的特点,对其进行解压,从而得到该可执行文件包含的真正可执行的二进制文件和资源文件。
其中,这里所说的二进制文件,是包含于应用的可执行文件中的真正可被执行的文件。系统开发商需要保护的源代码,就包含在该文件中。但该文件可以是加密的,从而终端厂商无法获取到其中的源代码。
以安卓(Android)系统为例,需要源代码保护的应用的可执行文件,一般是应用的安卓安装包(Android Package,APK),而对APK进行解压获得的二进制文件,一般为二进制dex文件。
步骤33,系统开发商将获取到的二进制文件保存在应用的源代码目录下,并删除需要源代码保护的应用的可执行文件,即删除步骤32中确定的需要源代码保护的应用的可执行文件。
步骤34,若终端厂商将自身对于界面元素的背景图片的修改需求告知给系统开发商,则系统开发商可以根据所述修改需求,对通过执行步骤32解压得到资源文件进行修改,得到修改后的资源文件。
其中,这里所说的资源文件,相当于前文所述的允许修改配置的资源文件。
步骤35,系统开发商将二进制dex文件和相应的资源文件,重新打包成标准的可执行文件(如打包成APK)。系统开发商将包含重新打包的标准的可执行文件的操作系统提供给终端厂商。
或者,不同于步骤34和步骤35的实现方式,系统开发商也可以采用前文所述的步骤21和步骤22的方式,实现将资源文件放置到指定目录下,后续由终端厂商自身对该资源文件进行修改。
本申请实施例中,当应用的安装包(如APK)是采用上述方式打包而成时,后续可以从该安装包包含的资源文件(后称第一资源文件)中,获取颜色属性可以进行设置的图片,从而执行如图1a所示的步骤,完成对于界面元素的背景图片的显示。
考虑到不同应用可能会有相同的界面元素,作为该些界面元素的各背景图片,可以是对相同的图片的颜色属性进行设置而得到的,因此,本申请实施例中,可以设置供不同应用调用的公共的资源文件(后称第二资源文件)。
相对于第二资源文件,前述第一资源文件可以是由某应用专用的资源文件。在这样的场景下,当需要显示不同界面元素各自的背景图片时,若假设所述不同界面元素中的第一界面元素的背景图片从第一资源文件中获取,而所述不同界面元素中的第二界面元素的背景图片从第二资源文件中获取,则一方面,可以采用如图1a所示的方法,基于从第一资源文件中获取的图片,实现对第一界面元素的背景图片的显示;另一方面,可以从第二资源文件中,获取与第二界面元素对应的图片,并根据与第二界面元素对应的该图片,在用于显示所述第二界面元素的预设第二界面区域进行图片显示。
需要说明的是,实施例1所提供方法的各步骤的执行主体均可以是同一设备,或者,该方法也由不同设备作为执行主体。
需要说明的是,本申请实施例并不对上述方法的各步骤的执行先后顺序进行限制。比如,步骤12可以与步骤13同步执行,或者,步骤12可以在步骤13后执行。本申请实施例中为各步骤设置编号,是为了有条理地描述各步骤,并不是对步骤的执行顺序进行限制,即,本申请实施例中为各步骤设置的编号并不能视为限制步骤执行顺序的特征。
实施例2
为解决采用现有的界面元素背景图片的显示方式,会导致占用用户终端较多存储空间的问题,本申请实施例1提供一种界面元素背景图片的显示装置。该装置的具体结构示意图如图4所示,包括:
颜色属性设置单元41,用于对图片的颜色属性进行设置,得到设置后的图片;
显示单元42,用于在用于显示第一界面元素的预设第一界面区域,显示颜色属性设置单元41得到的设置后的图片。
在一种实施方式中,颜色属性设置单元41,可以但不限于用于根据下述至少一种信息,对图片的颜色属性进行设置:
所述第一界面元素的状态;
指定图片;
指定事件;
用户选取的颜色值。
在一种实施方式中,颜色属性设置单元41,用于:
根据所述第一界面元素的不同状态与颜色值的映射关系,确定所述第一界面元素的当前状态映射的颜色值;根据确定的颜色值,对图片的颜色属性进行设置。
或者,根据用户终端当前使用的壁纸的颜色值,和/或图片选取指令所对应的图片的颜色值,对图片的颜色属性进行设置。
或者,在当前存在第一指定事件时,根据各指定事件与颜色值的映射关系,确定与所述第一指定事件映射的颜色值;根据确定的颜色值,对图片的颜色属性进行设置。
或者,显示包括至少两种颜色的颜色值界面,并根据用户对所述颜色值界面中包括的颜色的选择,对图片的颜色属性进行设置。
在一种实施方式中,本申请实施例提供的该装置还可以包括:
图片获取单元,用于从第一资源文件中,获取所述图片。
其中,所述第一资源文件,是从第一界面元素所属的应用的安装包中获取到的;
所述安装包,是对所述第一资源文件和可执行的二进制文件打包得到的。
在一种实施方式中,所述图片获取单元,还可以用于从第二资源文件中,获取与第二界面元素对应的图片。在这样的情况下,显示单元42,还可以用于根据与第二界面元素对应的图片,在用于显示第二界面元素的预设第二界面区域进行图片显示。
采用本申请实施例提供的上述装置,由于可以对图片的颜色属性进行设置,得到设置后的图片,并在用于显示界面元素的预设界面区域,显示设置后的图片,因此针对需要用不同效果显示的界面元素,可以通过对图片的颜色属性进行不同的设置来实现,无需在用户终端本地保存对应于不同显示效果的多个资源,从而可以避免对于用户终端存储空间的过多占用。
实施例3
为解决采用现有的界面元素背景图片的显示方式,会导致占用用户终端较多存储空间的问题,本申请实施例3提供一种如图5所示的智能设备。所述智能设备,比如可以是手机、平板电脑、个人电脑(Personal Computer,PC)、智能家居设备和智能可穿戴设备等等中的至少一种。
该智能设备包括存储器51和处理器52。其中:
存储器51,用于存储计算机程序指令。
处理器52耦合到存储器51。处理器52用于读取存储器51存储的计算机程序指令,并作为响应,执行如下操作:
对图片的颜色属性进行设置,得到设置后的图片;在用于显示第一界面元素的预设 第一界面区域,显示所述设置后的图片。
在一种实施方式中,处理器52具体可以用于根据下述至少一种信息,对图片的颜色属性进行设置:
第一界面元素的状态;指定图片;指定事件;用户选取的颜色值。
以根据第一界面元素的状态,对图片的颜色属性进行设置为例,处理器52,具体可以用于:根据第一界面元素的不同状态与颜色值的映射关系,确定第一界面元素的当前状态映射的颜色值;根据确定的颜色值,对图片的颜色属性进行设置。
以根据指定图片,对图片的颜色属性进行设置为例,处理器52具体可以用于:根据用户终端当前使用的壁纸的颜色值,和/或图片选取指令所对应的图片的颜色值,对图片的颜色属性进行设置。
以根据指定事件,对图片的颜色属性进行设置为例,处理器52具体可以用于:在当前存在第一指定事件时,根据各指定事件与颜色值的映射关系,确定与所述第一指定事件映射的颜色值;根据确定的颜色值,对图片的颜色属性进行设置。
以根据用户选取的颜色值,对图片的颜色属性进行设置为例,处理器52具体可以用于:显示包括至少两种颜色的颜色值界面,并根据用户对所述颜色值界面中包括的颜色的选择,对图片的颜色属性进行设置。
在一种实施方式中,所述存储器51,还用于存储第一界面元素所属的应用的安装包。处理器52,还可以用于从存储器51存储的第一界面元素所属的应用的安装包中的第一资源文件中,获取所述图片。其中,所述安装包,是对所述第一资源文件和可执行的二进制文件打包得到的。
在一种实施方式中,所述存储器51,还用于存储第二资源文件。处理器52,还可以用于从存储器51存储的第二资源文件中,获取与第二界面元素对应的图片;根据获取的与第二界面元素对应的图片,在用于显示第二界面元素的预设第二界面区域进行图片显示。
采用本申请实施例提供的上述智能设备,由于可以对图片的颜色属性进行设置,得到设置后的图片,并在用于显示界面元素的预设界面区域,显示设置后的图片,因此针对需要用不同效果显示的界面元素,可以通过对图片的颜色属性进行不同的设置来实现,无需在用户终端本地保存对应于不同显示效果的多个资源,从而可以避免对于用户终端存储空间的过多占用。
除了图5所示的处理器52以及存储器51之外,实施例中装置所在的智能设备通常 根据该智能设备的实际功能,还可以包括其他硬件,例如,内存、网络接口等,对此不再赘述。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (17)

  1. 一种界面元素背景图片的显示方法,其特征在于,包括:
    对图片的颜色属性进行设置,得到设置后的图片;
    在用于显示第一界面元素的预设第一界面区域,显示所述设置后的图片。
  2. 如权利要求1所述的方法,其特征在于,对图片的颜色属性进行设置,包括:
    根据下述至少一种信息,对图片的颜色属性进行设置:
    所述第一界面元素的状态;
    指定图片;
    指定事件;
    用户选取的颜色值。
  3. 如权利要求2所述的方法,其特征在于,根据所述第一界面元素的状态,对图片的颜色属性进行设置,包括:
    根据所述第一界面元素的不同状态与颜色值的映射关系,确定所述第一界面元素的当前状态映射的颜色值;
    根据确定的颜色值,对图片的颜色属性进行设置。
  4. 如权利要求2所述的方法,其特征在于,根据指定图片,对图片的颜色属性进行设置,包括:
    根据用户终端当前使用的壁纸的颜色值,和/或图片选取指令所对应的图片的颜色值,对图片的颜色属性进行设置。
  5. 如权利要求2所述的方法,其特征在于,根据指定事件,对图片的颜色属性进行设置,包括:
    在当前存在第一指定事件时,根据各指定事件与颜色值的映射关系,确定与所述第一指定事件映射的颜色值;
    根据确定的颜色值,对图片的颜色属性进行设置。
  6. 如权利要求2所述的方法,其特征在于,根据用户选取的颜色值,对图片的颜色属性进行设置,包括:
    显示包括至少两种颜色的颜色值界面,并根据用户对所述颜色值界面中包括的颜色的选择,对图片的颜色属性进行设置。
  7. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    从第一资源文件中,获取所述图片;
    所述第一资源文件,是从第一界面元素所属的应用的安装包中获取到的;
    所述安装包,是对所述第一资源文件和可执行的二进制文件打包得到的。
  8. 如权利要求7所述的方法,其特征在于,所述方法还包括:
    从第二资源文件中,获取与第二界面元素对应的图片;
    根据所述与第二界面元素对应的图片,在用于显示所述第二界面元素的预设第二界面区域进行图片显示。
  9. 一种界面元素背景图片的显示装置,其特征在于,包括:
    颜色属性设置单元,用于对图片的颜色属性进行设置,得到设置后的图片;
    显示单元,用于在用于显示第一界面元素的预设第一界面区域,显示所述设置后的图片。
  10. 如权利要求9所述的装置,其特征在于,颜色属性设置单元,用于根据下述至少一种信息,对图片的颜色属性进行设置:
    所述第一界面元素的状态;
    指定图片;
    指定事件;
    用户选取的颜色值。
  11. 如权利要求10所述的装置,其特征在于,颜色属性设置单元,用于:
    根据所述第一界面元素的不同状态与颜色值的映射关系,确定所述第一界面元素的当前状态映射的颜色值;
    根据确定的颜色值,对图片的颜色属性进行设置。
  12. 如权利要求10所述的装置,其特征在于,颜色属性设置单元,用于:
    根据用户终端当前使用的壁纸的颜色值,和/或图片选取指令所对应的图片的颜色值,对图片的颜色属性进行设置。
  13. 如权利要求10所述的装置,其特征在于,颜色属性设置单元,用于:
    在当前存在第一指定事件时,根据各指定事件与颜色值的映射关系,确定与所述第一指定事件映射的颜色值;
    根据确定的颜色值,对图片的颜色属性进行设置。
  14. 如权利要求10所述的装置,其特征在于,颜色属性设置单元,用于:
    显示包括至少两种颜色的颜色值界面,并根据用户对所述颜色值界面中包括的颜色的选择,对图片的颜色属性进行设置。
  15. 如权利要求9所述的装置,其特征在于,所述装置还包括:
    图片获取单元,用于从第一资源文件中,获取所述图片;
    所述第一资源文件,是从第一界面元素所属的应用的安装包中获取到的;
    所述安装包,是对所述第一资源文件和可执行的二进制文件打包得到的。
  16. 如权利要求15所述的装置,其特征在于:
    所述图片获取单元,还用于从第二资源文件中,获取与第二界面元素对应的图片;
    所述显示单元,还用于根据所述与第二界面元素对应的图片,在用于显示所述第二界面元素的预设第二界面区域进行图片显示。
  17. 一种智能设备,其特征在于,包括:
    存储器,用于存储计算机程序指令;
    处理器,耦合到所述存储器,用于读取所述存储器存储的计算机程序指令,并作为响应,执行如下操作:对图片的颜色属性进行设置,得到设置后的图片;在用于显示第一界面元素的预设第一界面区域,显示所述设置后的图片。
PCT/CN2016/107592 2015-12-09 2016-11-29 一种界面元素背景图片的显示方法、装置及智能设备 WO2017097137A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510908409.8A CN106855800A (zh) 2015-12-09 2015-12-09 一种界面元素背景图片的显示方法、装置及智能设备
CN201510908409.8 2015-12-09

Publications (1)

Publication Number Publication Date
WO2017097137A1 true WO2017097137A1 (zh) 2017-06-15

Family

ID=59013737

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/107592 WO2017097137A1 (zh) 2015-12-09 2016-11-29 一种界面元素背景图片的显示方法、装置及智能设备

Country Status (2)

Country Link
CN (1) CN106855800A (zh)
WO (1) WO2017097137A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110780873A (zh) * 2019-09-06 2020-02-11 平安普惠企业管理有限公司 界面颜色适配方法、装置、计算机设备及存储介质
CN111427652A (zh) * 2020-03-31 2020-07-17 苏宁云计算有限公司 自定义按钮的展示方法、装置、介质及计算机设备
CN112543363A (zh) * 2020-12-04 2021-03-23 海看网络科技(山东)股份有限公司 一种iptv多样化配置背景的方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818549A (zh) * 2017-10-27 2018-03-20 上海京颐科技股份有限公司 图像处理方法、装置、设备以及计算机可读介质
CN107749892B (zh) * 2017-11-03 2020-11-03 广州视源电子科技股份有限公司 会议记录的网络读取方法、装置、智能平板和存储介质
CN110851155A (zh) * 2019-10-22 2020-02-28 北京四达时代软件技术股份有限公司 机顶盒界面主题颜色变更方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252343A (zh) * 2013-06-27 2014-12-31 腾讯科技(深圳)有限公司 一种更换应用程序视觉控件的方法及设备
US20150128074A1 (en) * 2013-11-06 2015-05-07 Software Ag System and method for browser side colorizing of icon images
CN104718528A (zh) * 2014-03-28 2015-06-17 华为终端有限公司 确定界面控件的颜色的方法、装置以及终端设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007888A (zh) * 2013-02-27 2014-08-27 深圳市阿科达汽车电子有限公司 一种基于车载dvd导航的界面显示方法以及装置
CN104239076A (zh) * 2013-06-08 2014-12-24 中兴通讯股份有限公司 界面色彩调整方法及装置
CN104636029A (zh) * 2014-12-31 2015-05-20 魅族科技(中国)有限公司 控件的显示控制方法和系统
CN104850395B (zh) * 2015-04-17 2018-11-30 魅族科技(中国)有限公司 界面显示方法和系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252343A (zh) * 2013-06-27 2014-12-31 腾讯科技(深圳)有限公司 一种更换应用程序视觉控件的方法及设备
US20150128074A1 (en) * 2013-11-06 2015-05-07 Software Ag System and method for browser side colorizing of icon images
CN104718528A (zh) * 2014-03-28 2015-06-17 华为终端有限公司 确定界面控件的颜色的方法、装置以及终端设备

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110780873A (zh) * 2019-09-06 2020-02-11 平安普惠企业管理有限公司 界面颜色适配方法、装置、计算机设备及存储介质
CN110780873B (zh) * 2019-09-06 2024-05-03 平安普惠企业管理有限公司 界面颜色适配方法、装置、计算机设备及存储介质
CN111427652A (zh) * 2020-03-31 2020-07-17 苏宁云计算有限公司 自定义按钮的展示方法、装置、介质及计算机设备
CN111427652B (zh) * 2020-03-31 2023-05-19 苏宁云计算有限公司 自定义按钮的展示方法、装置、介质及计算机设备
CN112543363A (zh) * 2020-12-04 2021-03-23 海看网络科技(山东)股份有限公司 一种iptv多样化配置背景的方法
CN112543363B (zh) * 2020-12-04 2022-11-22 海看网络科技(山东)股份有限公司 一种iptv多样化配置背景的方法

Also Published As

Publication number Publication date
CN106855800A (zh) 2017-06-16

Similar Documents

Publication Publication Date Title
WO2017097137A1 (zh) 一种界面元素背景图片的显示方法、装置及智能设备
US10885677B2 (en) Method and system for setting interface element colors
WO2017097140A1 (zh) 一种界面元素属性值的设置方法、装置及智能设备
KR102353766B1 (ko) 디스플레이를 제어하는 장치 및 방법
WO2020038163A1 (zh) 图标的显示方法、装置、终端及存储介质
WO2017097143A1 (zh) 一种界面切换动画的设置方法及装置
US20160133052A1 (en) Virtual environment for sharing information
US20160232686A1 (en) Method and electronic device for converting color of image
US10347221B2 (en) Electronic device and method for controlling display thereof
US9558542B2 (en) Method and device for image processing
CN107688430B (zh) 更换壁纸的方法、装置、终端及存储介质
WO2019047465A1 (zh) 导航栏显示方法、装置和计算机可读存储介质
WO2015184736A1 (zh) 一种触屏设备背景图变换的方法及终端
JP2016218896A (ja) 電子機器および画像処理方法
WO2019052115A1 (zh) 应用控件样式自定义方法、装置以及计算机可读存储介质
CN111399965A (zh) 用户界面兼容显示方法及装置、设备、存储介质
CN114327178A (zh) 界面显示方法、装置及存储介质
KR20180014498A (ko) 텍스트의 시인성을 향상시키는 전자 장치와 이의 동작 방법
WO2017177851A1 (en) Method for dynamically changing user interface elements
KR102216656B1 (ko) 이미지 처리 방법 및 그 전자 장치
US8170380B1 (en) Method and apparatus for importing, exporting and determining an initial state for files having multiple layers
TW201828039A (zh) 介面元素背景圖片的顯示方法、裝置及智慧型設備
WO2021249504A1 (zh) 一种分布显示方法及相关设备
WO2021213222A1 (zh) 阅读内容处理方法、装置、计算机设备和存储介质
WO2018145536A1 (zh) 安卓系统下适配应用通知颜色的方法、装置及计算设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16872328

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16872328

Country of ref document: EP

Kind code of ref document: A1