CN105094578B - Method and device for adjusting position of desktop icon - Google Patents
Method and device for adjusting position of desktop icon Download PDFInfo
- Publication number
- CN105094578B CN105094578B CN201410172148.3A CN201410172148A CN105094578B CN 105094578 B CN105094578 B CN 105094578B CN 201410172148 A CN201410172148 A CN 201410172148A CN 105094578 B CN105094578 B CN 105094578B
- Authority
- CN
- China
- Prior art keywords
- desktop
- icon
- color value
- desktop icon
- background area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000000694 effects Effects 0.000 abstract description 6
- 238000004891 communication Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 238000012545 processing Methods 0.000 description 9
- 239000003086 colorant Substances 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 238000004883 computer application Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure relates to a method and a device for adjusting positions of desktop icons. The method comprises the following steps: acquiring a desktop icon and a color value of a desktop background area where the desktop icon is located; determining whether the desktop icon is matched with the desktop background area according to the color value of the desktop icon and the color value of the desktop background area; and if not, adjusting the desktop icon to the matched desktop background target area. According to the method, whether the desktop icon is matched with the desktop background area is determined according to the color value of the desktop icon and the color value of the desktop background area, the desktop icon is adjusted to the desktop background target area matched with the desktop icon under the condition of no match, the position of the desktop icon is adjusted by combining the desktop icon and the color of the desktop background area, the adjustment method is more flexible and intelligent, meanwhile, the adjusted desktop icon can be matched with the desktop background area, and the adjustment effect is more attractive.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for adjusting a position of a desktop icon.
Background
With the rapid development of computer technology, more and more computer applications are emerging. In order to distinguish between computer applications, different computer applications are often represented by different desktop icons on the desktop of a computer, a mobile phone, etc. In addition, in order to beautify the desktop of the terminal, good-looking wallpaper is often used as the desktop background of the terminal. Therefore, when arranging the desktop icons, the desktop icons are often arranged on the desktop background. However, since the number or style of desktop icons may change frequently, the desktop icons may become confused when they change. In order to beautify desktop icons arranged on a desktop background, the positions of the desktop icons often need to be adjusted.
In the related art, when the position of the desktop icon is adjusted, the method that can be adopted is as follows: the positions of the desktop icons are adjusted by shaking the terminal and the like, so that the desktop icons are orderly arranged on the desktop background. In addition, the related art is often performed when the position of the desktop icon is adjusted in a case where the desktop icon is changed. For example, when some desktop icons are located farther apart due to deletion of one or more desktop icons, the desktop icons may be brought into close proximity or proximity by shaking the cell phone, or the like. That is, the related art often adjusts the positions of the desktop icons according to the positional relationship between the desktop icons.
In implementing the present disclosure, the inventors found that the related art has at least the following problems:
when the related art adjusts the positions of the desktop icons, the related art often adjusts the positions of the desktop icons according to the position relationship between the desktop icons, so that the flexibility and the intelligence of the adjustment of the positions of the desktop icons are not high. In addition, the final purpose of adjusting the positions of the desktop icons is to arrange the desktop icons on the desktop background beautifully, so that if only the position relationship between the desktop icons is considered when adjusting the positions of the desktop icons, the adjusted desktop icons may not be matched with the desktop background area where the desktop icons are located, and therefore the adjustment effect is not attractive, and bad operation experience is brought to users.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method and an apparatus for adjusting a position of a desktop icon.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for adjusting a position of a desktop icon, including:
acquiring a color value of a desktop icon, and acquiring a color value of a desktop background area where the desktop icon is located;
determining whether the desktop icon is matched with the desktop background area of the desktop icon according to the color value of the desktop icon and the color value of the desktop background area of the desktop icon;
and if the desktop background area where the desktop icon is located is not matched with the desktop background area where the desktop icon is located, adjusting the desktop icon to the desktop background target area matched with the desktop icon.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the obtaining a color value of a desktop icon includes:
acquiring the color value of each pixel point included by the desktop icon, determining the average color value of the desktop icon according to the color values of all the pixel points included by the desktop icon, and taking the average color value of the desktop icon as the color value of the desktop icon;
the acquiring the color value of the desktop background area where the desktop icon is located includes:
the method comprises the steps of obtaining the color value of each pixel point included in the desktop background area where the desktop icon is located, determining the average color value of the desktop background area where the desktop icon is located according to the color values of all the pixel points included in the desktop background area where the desktop icon is located, and taking the average color value of the desktop background area where the desktop icon is located as the color value of the desktop background area where the desktop icon is located.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the determining, according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located, whether the desktop icon and the desktop background area where the desktop icon is located are matched includes:
determining whether the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value;
and if the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value, determining that the desktop icon is not matched with the desktop background area where the desktop icon is located.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the obtaining a color value of a desktop icon includes:
dividing the desktop icon into at least two sub-icons, acquiring color values of all pixel points included by each sub-icon, determining an average color value of each sub-icon according to the color values of all pixel points included by each sub-icon, and taking the average color value of each sub-icon as the color value of the desktop icon;
the acquiring the color value of the desktop background area where the desktop icon is located includes:
the method comprises the steps of obtaining color values of all pixel points included in a desktop background area where each sub-icon of the desktop icon is located, determining an average color value of the desktop background area where each sub-icon is located according to the color values of all pixel points included in the desktop background area where each sub-icon is located, and taking the average color value of the desktop background area where each sub-icon is located as the color value of the desktop background area where the desktop icon is located.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the determining, according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located, whether the desktop icon and the desktop background area where the desktop icon is located are matched includes:
determining whether the difference value between the average color value of each sub-icon of the desktop icon and the average color value of the desktop background area where each sub-icon is located is smaller than a second preset threshold value;
and if the number of the sub-icons with the difference value smaller than the second preset threshold reaches a third preset threshold, determining that the desktop icons are not matched with the desktop background area where the desktop icons are located.
With reference to any one possible implementation manner of the first aspect to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the adjusting the desktop icon to a desktop background target area matched with the desktop icon includes:
selecting a desktop background target area matched with the desktop icons in an area where the desktop icons are not arranged, and adjusting the desktop icons to the desktop background target area matched with the desktop icons.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for adjusting a position of a desktop icon, including:
the first acquisition module is used for acquiring the color value of the desktop icon;
the second acquisition module is used for acquiring the color value of the desktop background area where the desktop icon is located;
the determining module is used for determining whether the desktop icon is matched with the desktop background area where the desktop icon is located according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located;
and the adjusting module is used for adjusting the desktop icon to a desktop background target area matched with the desktop icon when the desktop icon is not matched with the desktop background area where the desktop icon is located.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the first obtaining module includes:
the first acquisition unit is used for acquiring the color value of each pixel point included by the desktop icon;
the first determining unit is used for determining the average color value of the desktop icon according to the color values of all pixel points included in the desktop icon, and taking the average color value of the desktop icon as the color value of the desktop icon;
the second obtaining module includes:
the second acquisition unit is used for acquiring the color value of each pixel point included in the desktop background area where the desktop icon is located;
and the second determining unit is used for determining the average color value of the desktop background area where the desktop icon is located according to the color values of all pixel points included in the desktop background area where the desktop icon is located, and taking the average color value of the desktop background area where the desktop icon is located as the color value of the desktop background area where the desktop icon is located.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the determining module includes:
a third determining unit, configured to determine whether a difference between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold;
and the fourth determining unit is used for determining that the desktop icon is not matched with the desktop background area where the desktop icon is located when the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the first obtaining module includes:
the dividing unit is used for dividing the desktop icon into at least two sub-icons;
the third acquisition unit is used for acquiring the color values of all pixel points included by each sub-icon;
the fifth determining unit is used for determining the average color value of each sub-icon according to the color values of all pixel points included in each sub-icon, and taking the average color value of each sub-icon as the color value of the desktop icon;
the second obtaining module includes:
the fourth obtaining unit is used for obtaining the color values of all pixel points included in a desktop background area where each sub-icon of the desktop icon is located;
and the sixth determining unit is used for determining the average color value of the desktop background area where each sub-icon is located according to the color values of all pixel points included in the desktop background area where each sub-icon is located, and taking the average color value of the desktop background area where each sub-icon is located as the color value of the desktop background area where the desktop icon is located.
With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the determining module includes:
a seventh determining unit, configured to determine whether a difference between an average color value of each sub-icon of the desktop icon and an average color value of a desktop background area where each sub-icon is located is smaller than a second preset threshold;
and the eighth determining unit is used for determining that the desktop icon is not matched with the desktop background area where the desktop icon is located when the number of the sub-icons of which the difference values are smaller than the second preset threshold reaches a third preset threshold.
With reference to any one possible implementation manner of the second aspect to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the adjusting module includes:
the fifth acquisition unit is used for selecting a desktop background target area matched with the desktop icons in an area where the desktop icons are not arranged;
and the adjusting unit is used for adjusting the desktop icon to a desktop background target area matched with the desktop icon.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
whether the desktop background area where the desktop icon and the desktop icon are located are matched or not is determined according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located, the desktop icon is adjusted to the desktop background target area matched with the desktop icon under the condition that the desktop background area where the desktop icon and the desktop icon are located are not matched, the position of the desktop icon is adjusted by combining the colors of the desktop icon and the desktop background area where the desktop icon is located, the adjusting method is more flexible and intelligent, meanwhile, the desktop icon and the desktop background area where the desktop icon is located can be guaranteed to be matched, and the position adjusting effect of the desktop icon is more attractive.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating a method of adjusting a position of a desktop icon in accordance with an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a method of adjusting a position of a desktop icon in accordance with an exemplary embodiment.
FIG. 3 is a diagram illustrating a background area of a desktop on which a desktop icon is located, according to an illustrative embodiment.
FIG. 4 is a flow diagram illustrating a method of adjusting a position of a desktop icon in accordance with an exemplary embodiment.
FIG. 5 is a block diagram illustrating an apparatus for adjusting a position of a desktop icon, according to an example embodiment.
FIG. 6 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a method for adjusting a position of a desktop icon according to an exemplary embodiment, where the method provided by the embodiment of the present disclosure supports adjusting the position of the desktop icon according to a color relationship between the desktop icon and a desktop background area where the desktop icon is located. As shown in fig. 1, the method for adjusting the position of the desktop icon is used in the terminal and includes the following steps.
In step S101, a color value of the desktop icon is obtained, and a color value of a desktop background area where the desktop icon is located is obtained.
In another embodiment, obtaining the color value of the desktop icon comprises:
acquiring the color value of each pixel point included by the desktop icon, determining the average color value of the desktop icon according to the color values of all the pixel points included by the desktop icon, and taking the average color value of the desktop icon as the color value of the desktop icon;
the method for acquiring the color value of the desktop background area where the desktop icon is located comprises the following steps:
the method comprises the steps of obtaining the color value of each pixel point included in the desktop background area where the desktop icon is located, determining the average color value of the desktop background area where the desktop icon is located according to the color values of all the pixel points included in the desktop background area where the desktop icon is located, and taking the average color value of the desktop background area where the desktop icon is located as the color value of the desktop background area where the desktop icon is located.
In another embodiment, obtaining the color value of the desktop icon comprises:
dividing the desktop icon into at least two sub-icons, acquiring color values of all pixel points included by each sub-icon, determining an average color value of each sub-icon according to the color values of all pixel points included by each sub-icon, and taking the average color value of each sub-icon as the color value of the desktop icon;
the method for acquiring the color value of the desktop background area where the desktop icon is located comprises the following steps:
the method comprises the steps of obtaining color values of all pixel points included in a desktop background area where each sub-icon of the desktop icon is located, determining an average color value of the desktop background area where each sub-icon is located according to the color values of all pixel points included in the desktop background area where each sub-icon is located, and taking the average color value of the desktop background area where each sub-icon is located as the color value of the desktop background area where the desktop icon is located.
In step S102, it is determined whether the desktop background area where the desktop icon is located is matched with the desktop background area where the desktop icon is located according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located.
In another embodiment, determining whether the desktop icon is matched with the desktop background area of the desktop icon according to the color value of the desktop icon and the color value of the desktop background area of the desktop icon includes:
determining whether the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value;
and if the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value, determining that the desktop icon is not matched with the desktop background area where the desktop icon is located.
In another embodiment, determining whether the desktop icon is matched with the desktop background area of the desktop icon according to the color value of the desktop icon and the color value of the desktop background area of the desktop icon includes:
determining whether the difference value between the average color value of each sub-icon of the desktop icon and the average color value of the desktop background area where each sub-icon is located is smaller than a second preset threshold value;
and if the number of the sub-icons with the difference value smaller than the second preset threshold reaches a third preset threshold, determining that the desktop icons are not matched with the desktop background area where the desktop icons are located.
In step S103, if the desktop icon and the desktop background area where the desktop icon is located do not match, the desktop icon is adjusted to the desktop background target area matching the desktop icon.
In another embodiment, adjusting the desktop icon to a desktop background target area matching the desktop icon includes:
selecting a desktop background target area matched with the desktop icons in the area where the desktop icons are not arranged, and adjusting the desktop icons to the desktop background target area matched with the desktop icons.
According to the method provided by the embodiment of the disclosure, whether the desktop background area where the desktop icon is located is matched with the desktop background area where the desktop icon is located is determined according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located, and the desktop icon is adjusted to the desktop background target area matched with the desktop icon under the condition that the desktop background area where the desktop icon is located is not matched with the desktop background area where the desktop icon is located, it is ensured that the position of the desktop icon is adjusted by combining the colors of the desktop icon and the desktop background area where the desktop icon is located, the adjusting method is more flexible and intelligent, meanwhile, the desktop icon can be ensured to be matched with the desktop background area where the desktop icon is located, and the position adjusting effect of the desktop icon is more attractive.
FIG. 2 is a flow diagram illustrating a method of adjusting a position of a desktop icon in accordance with an exemplary embodiment. In the embodiment of the present disclosure, a method for adjusting the position of the desktop icon is described in detail by taking the average color value of the desktop icon as the color value of the desktop icon, and taking the average color value of the desktop background area where the desktop icon is located as the color value of the desktop background area where the desktop icon is located as an example. As shown in fig. 2, the method for adjusting the position of the desktop icon is used in the terminal and includes the following steps.
In step S201, the color value of each pixel point included in the desktop icon is obtained, the average color value of the desktop icon is determined according to the color values of all the pixel points included in the desktop icon, and the average color value of the desktop icon is used as the color value of the desktop icon.
The step is a step of acquiring the color value of the desktop icon. Because the desktop icon is often composed of a certain number of pixel points, the average color value of the desktop icon can be determined by obtaining the color value of each pixel point included in the desktop icon and according to the color values of all the pixel points included in the desktop icon, so that the average color value of the desktop icon is used as the color value of the desktop icon.
The embodiment of the present disclosure is not particularly limited with respect to a manner of obtaining a color value of each pixel point included in the desktop icon. In specific implementation, the method can be realized by devices such as a color sensor. In addition, the embodiment of the present disclosure is not particularly limited with respect to the method of representing the color value. For example, the color value may be expressed in RGB (Red-Green-Blue) value.
Further, there may be many ways to determine the average color value of the desktop icon according to the color values of all the pixel points included in the desktop icon. In specific implementation, the method can be realized by the following two ways:
the first mode is as follows: and taking the desktop icon as a whole, and determining the average color value of the desktop icon according to the color values of all pixel points included in the desktop icon.
For example, if the desktop icon includes 3 pixels A, B and C in total, and the color value is represented by RGB values, and the RGB values of the three pixels A, B and C are (R) respectively1,G1,B1)、(R2,G2,B2) And (R)2,G2,B2) Then, the average color value of the desktop icon obtained by the first method is
In addition, since colors of different regions of the desktop icon may have a large difference, in order to make the obtained average color value of the desktop icon more accurate, when the average color value of the desktop icon is determined according to the color values of all pixel points included in the desktop icon, the desktop icon may be divided into at least two parts, each part serves as one sub-icon, that is, the desktop icon is divided into at least two sub-icons, and then the average color value of the desktop icon is determined according to the divided sub-icons, which is described in detail in the following second manner.
The second mode is as follows: dividing the desktop icon into at least two sub-icons, acquiring the color values of all pixel points included in each sub-icon, and determining the average color value of each sub-icon according to the color values of all pixel points included in each sub-icon; and averaging the average color values of all the sub-icons and taking the average color value as the average color value of the desktop icon.
The specific number of the at least two sub-icons for dividing the desktop icon is not specifically limited in the embodiments of the present disclosure, and may be determined by combining the color difference condition of the desktop icon in specific implementation. For example, a desktop icon may be divided into two sub-icons, three sub-icons, and so on. In addition, when the desktop icon is divided, the desktop icon may be divided into at least two sub-icons with equal size, or the desktop icon may be divided into at least two sub-icons with different size, and so on.
To illustrate the second embodiment, a specific example will be described below. For example, if the desktop icon is divided into three sub-icons a,b and c, and a comprises three pixel points a1、a2And a3B includes two pixel points b1、b2C includes two pixel points c1And c2And a is represented by RGB value1、a2And a3Respectively, are (R)1,G1,B1)、(R2,G2,B2) And (R)3,G3,B3) Then the average color value of sub-icon a isRepresenting b by RGB values1And b2Respectively, are (R)4,G4,B4) And (R)5,G5,B5) Then the average color value of sub-icon b isRepresenting c by RGB values1And c2Respectively, are (R)6,G6,B6) And (R)7,G7,B7) Then the average color value of sub-icon c isFurther, the average color value of the desktop icon determined according to the average color values of the three sub-icons is
Optionally, before executing step S201, a step of obtaining a desktop icon position adjustment instruction for adjusting the position of the desktop icon may be further included, in order to ensure that the adjustment of the position of the desktop icon is triggered under a certain condition, and avoid inconvenience brought to the user for operating the desktop icon due to the automatic triggering of the adjustment of the position of the desktop icon.
There may be various ways to obtain a desktop icon position adjustment instruction for adjusting the position of the desktop icon. For example, a switch may be preset to control the operation of adjusting the position of the desktop icon. Therefore, the manner of obtaining the desktop icon position adjustment instruction for adjusting the position of the desktop icon may be: and detecting whether the switch is turned on, and if the operation that the switch is turned on is detected, determining that a desktop icon position adjusting instruction is obtained. Of course, other ways may also be used to obtain the desktop icon position adjustment instruction, which is not specifically limited in this disclosure.
In step S202, the color value of each pixel point included in the desktop background region where the desktop icon is located is obtained, the average color value of the desktop background region where the desktop icon is located is determined according to the color values of all pixel points included in the desktop background region where the desktop icon is located, and the average color value of the desktop background region where the desktop icon is located is used as the color value of the desktop background region where the desktop icon is located.
The step is a step of obtaining a color value of a desktop background area where the desktop icon is located, and the specific principle is the same as the principle of obtaining the color value of the desktop icon in step S201, which may be specifically referred to the content in step S201, and is not described herein again.
The size of the desktop background area where the desktop icon is located is not specifically limited in the embodiments of the present disclosure. In specific implementation, as shown in fig. 3, an area within a preset width around the desktop icon may be used as a desktop background area where the desktop icon is located. In fig. 3, X denotes a preset width. The embodiment of the present disclosure is not particularly limited with respect to the size of the preset width. For example, the preset width may be 0.3cm (centimeter), 0.5cm, 1cm, or the like. Of course, in fig. 3, only the preset width equal to the periphery of the desktop icon is taken as the desktop background area where the desktop icon is located for example. However, in a specific implementation, the different preset widths around the desktop icon may also be used as a desktop background area where the desktop icon is located, which is not specifically limited in the embodiment of the present disclosure.
It should be noted that, because there are various ways to determine the average color value of the desktop icon according to the color values of all the pixel points included in the desktop icon in step S201, there are also various ways to determine the average color value of the desktop background area where the desktop icon is located according to the color values of all the pixel points included in the desktop background area where the desktop icon is located in this step. In specific implementation, it is only required to ensure that the manner of determining the average color value of the desktop background region where the desktop icon is located according to the color values of all the pixel points included in the desktop background region where the desktop icon is located in this step is consistent with the manner of determining the average color value of the desktop icon according to the color values of all the pixel points included in the desktop icon obtained in step S201.
In step S203, determining whether a difference between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold, and if the difference between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is not smaller than the first preset threshold, determining that the desktop icon is matched with the desktop background area where the desktop icon is located, and ending the process; otherwise, determining that the desktop icon is not matched with the desktop background area where the desktop icon is located, and executing step S204.
In the embodiment of the disclosure, when the colors of the desktop background areas where the desktop icons are located are close to each other, the desktop icons are considered to be not matched with the desktop background areas where the desktop icons are located; when the color difference between the desktop background area where the desktop icon and the desktop background area where the desktop icon are located is large, the desktop background area where the desktop icon and the desktop icon are located is considered to be matched. The first preset threshold is a difference value between a color value of the desktop icon and a color value of the desktop background area where the desktop icon is located when the desktop icon is difficult to identify from the desktop background area where the desktop icon is located. The size of the first preset threshold is not particularly limited in the embodiments of the present disclosure. In practice, the setting may be based on empirical values. Regarding the manner of determining whether the difference between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than the first preset threshold, the determination may be implemented by comparing the color value of the desktop icon obtained in step S201 with the color value of the desktop background area where the desktop icon is located obtained in step S202.
In step S204, a desktop background target area matched with the desktop icon is selected in the area where the desktop icons are not arranged, and the desktop icon is adjusted to the desktop background target area matched with the desktop icon.
In order to match the desktop icon with the desktop background area where the desktop icon is located after the position of the desktop icon is adjusted, before the position of the desktop icon is adjusted, a desktop background target area matched with the desktop icon needs to be selected in an area where the desktop icon is not arranged on the desktop background.
The embodiment of the present disclosure is not particularly limited with respect to a manner of selecting a target area of the desktop background matching the desktop icon in an area where the desktop icons are not arranged. Specifically, in the embodiment of the present disclosure, whether the desktop icon is matched with the desktop background area where the desktop icon is located is determined by whether a difference between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold. Therefore, the manner of selecting the target area of the desktop background matching the desktop icon in the area where the desktop icon is not arranged includes, but is not limited to, the following steps:
the first step is as follows: the method comprises the steps of obtaining the color value of the area, where the desktop icons are not arranged, on the desktop, and determining whether the difference value between the color value of the desktop icons and the color value of the area, where the desktop icons are not arranged, is smaller than a first preset threshold value.
The color value of the area where the desktop icons are not arranged is obtained, and the embodiment of the disclosure is not particularly limited. In specific implementation, the method for obtaining the color value of the desktop icon may be referred to above, that is, the color values of all pixel points included in the region where the desktop icon is not arranged on the desktop may be obtained, and the average color value of all pixel points included in the region where the desktop icon is not arranged on the desktop is used as the color value of the region where the desktop icon is not arranged.
The second step is that: and if the difference value between the color value of the desktop icon and the color value of the area where the desktop icon is not arranged is not smaller than a first preset threshold value, taking the area where the desktop icon is not arranged as a desktop background target area matched with the desktop icon.
Further, embodiments of the present disclosure are not particularly limited with respect to the manner in which the desktop icon is adjusted to the desktop background target area matching the desktop icon. For example, the desktop icon may be adjusted to a desktop background target area matching the desktop icon by dragging the desktop icon.
Optionally, since the desktop background target area matched with the desktop icon may be on the interface without full desktop icons or may be a blank interface without any desktop icon placed, in order to reasonably utilize the area without full desktop icons and to make all the arranged desktop icons orderly and facilitate the user to operate the desktop icons, the desktop icon may be adjusted to the desktop background target area matched with the desktop icon on the interface without full desktop icons.
It should be noted that the method for adjusting the position of the desktop icon provided in the embodiment of the present disclosure may be a scheme that after the position of the desktop icon is adjusted by using the method for adjusting the position of the desktop icon provided in the related art, only the positions of the desktop icons in the portion of the desktop icons that are not matched with the desktop background area where the desktop icon is located are adjusted. Or after the desktop icon position adjusting instruction is obtained, allocating a desktop background area matched with each desktop icon to all desktop icons included on the desktop, so as to determine a scheme for enabling all desktop icons included on the desktop to be matched with the desktop background area where the desktop icons are located, thereby rearranging the positions of all desktop icons included on the desktop according to the determined scheme, and ensuring that each rearranged desktop icon is matched with the desktop background area where each desktop icon is located.
According to the method provided by the embodiment of the disclosure, whether the desktop background area where the desktop icon is located is matched with the desktop background area where the desktop icon is located is determined according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located, and the desktop icon is adjusted to the desktop background target area matched with the desktop icon under the condition that the desktop background area where the desktop icon is located is not matched with the desktop background area where the desktop icon is located, it is ensured that the position of the desktop icon is adjusted by combining the colors of the desktop icon and the desktop background area where the desktop icon is located, the adjusting method is more flexible and intelligent, meanwhile, the desktop icon can be ensured to be matched with the desktop background area where the desktop icon is located, and the position adjusting effect of the desktop icon is more attractive.
FIG. 4 is a flow diagram illustrating a method of adjusting a position of a desktop icon in accordance with an exemplary embodiment. In the embodiment of the disclosure, when color values of the desktop icon and a desktop background area where the desktop icon is located are determined, the desktop icon is divided into at least two sub-icons, and an average color value of each sub-icon is used as the color value of the desktop icon. Similarly, when the color value of the desktop background area where the desktop icon is located is determined, the average color value of the desktop background area where the sub-icons are located is determined respectively, and the average color value of the desktop background area where each sub-icon is located is used as the color value of the desktop background area where the desktop icon is located. As shown in fig. 4, the method for adjusting the position of the desktop icon is used in the terminal and includes the following steps.
In step S401, the desktop icon is divided into at least two sub-icons, the color values of all pixel points included in each sub-icon are obtained, the average color value of each sub-icon is determined according to the color values of all pixel points included in each sub-icon, and the average color value of each sub-icon is used as the color value of the desktop icon.
The step is a step of acquiring the color value of the desktop icon. Since the sub-icons are also composed of a certain number of pixel points, the color values of all the pixel points included in each sub-icon can be obtained, and the average color value of each sub-icon is determined according to the color values of all the pixel points included in each sub-icon. In addition, the desktop icon is divided into at least two sub-icons according to the embodiment of the disclosure. Therefore, the average color value of each sub-icon may be taken as the color value of the desktop icon. That is, in the disclosed embodiment, each desktop icon corresponds to multiple color values.
The embodiment of the present disclosure is not particularly limited as to the manner of obtaining the color value of each pixel point included in the desktop icon. In specific implementation, the method can be realized by devices such as a color sensor. In addition, the embodiment of the present disclosure is not particularly limited with respect to the method of representing the color value. For example, color values may be represented in RGB values.
Regarding the manner of determining the average color value of each sub-icon according to the color values of all the pixel points included in each sub-icon, reference may be made to the manner of determining the average color value of the desktop icon according to the color values of all the pixel points included in the desktop icon in step S201 in the foregoing embodiment, which is not described herein again.
In addition, regarding the specific number of at least two sub-icons for dividing the desktop icon, the embodiment of the present disclosure is not particularly limited, and the specific implementation may be determined by combining the color difference condition of the desktop icon. For example, a desktop icon may be divided into two sub-icons, three sub-icons, and so on. In addition, when the desktop icon is divided, the desktop icon may be divided into at least two sub-icons with equal size, or the desktop icon may be divided into at least two sub-icons with different size, and so on.
Optionally, before executing step S401, a step of obtaining a desktop icon position adjustment instruction for adjusting the position of the desktop icon may be further included, in order to ensure that the adjustment of the position of the desktop icon is triggered under a certain condition, and avoid inconvenience brought to the user for operating the desktop icon due to the automatic triggering of the adjustment of the position of the desktop icon.
There may be various ways to obtain a desktop icon position adjustment instruction for adjusting the position of the desktop icon. For example, a switch may be preset to control the operation of adjusting the position of the desktop icon. Therefore, the manner of obtaining the desktop icon position adjustment instruction for adjusting the position of the desktop icon may be: and detecting whether the switch is turned on, and if the operation that the switch is turned on is detected, determining that a desktop icon position adjusting instruction is obtained. Of course, other ways may also be used to obtain the desktop icon position adjustment instruction, which is not specifically limited in this disclosure.
In step S402, color values of all pixel points included in the desktop background region in which each sub-icon of the desktop icon is located are obtained, an average color value of the desktop background region in which each sub-icon is located is determined according to the color values of all pixel points included in the desktop background region in which each sub-icon is located, and the average color value of the desktop background region in which each sub-icon is located is used as the color value of the desktop background region in which the desktop icon is located.
The step is a step of obtaining a color value of a desktop background area where the desktop icon is located, and the specific principle is the same as the step of obtaining the color value of the desktop icon in step S401, which may be referred to the content in step S401 specifically, and is not described herein again.
The size of the desktop background area where the sub-icon is located is not specifically limited in the embodiments of the present disclosure. In specific implementation, the area within the preset width around the sub-icon can be used as the desktop background area where the sub-icon is located. The embodiment of the present disclosure is not particularly limited with respect to the size of the preset width. In specific implementation, the preset width may be the same as or different from the preset width between the desktop icon and the desktop background area where the desktop icon is located. For example, the preset width may be 0.2cm, 0.3cm, 0.5cm, or the like.
In step S403, determining whether a difference between an average color value of each sub-icon of the desktop icon and an average color value of a desktop background area where each sub-icon is located is smaller than a second preset threshold, and if the number of sub-icons whose difference is smaller than the second preset threshold does not reach a third preset threshold, matching the desktop icon with the desktop background area where the desktop icon is located, and ending the process; otherwise, the desktop icon is not matched with the desktop background area where the desktop icon is located, and step S404 is executed.
The second preset threshold is not specifically limited in the embodiments of the present disclosure, and in specific implementation, the second preset threshold may be equal to or different from the first preset threshold in the above embodiments.
When determining whether the difference value between the average color value of each sub-icon of the desktop icon and the average color value of the desktop background area where each sub-icon is located is smaller than a second preset threshold, the color value of each sub-icon may be compared with the color value of the desktop background area where each sub-icon of the desktop icon is located. And comparing the color value of each sub-icon with the color value of the desktop background area where each sub-icon of the desktop icon is located, so that the number of sub-icons with the difference value smaller than the second preset threshold value can be determined, and subsequently, whether the desktop icon is matched with the desktop background area where the desktop icon is located is further determined according to the number of sub-icons with the difference value smaller than the second preset threshold value.
In addition, regarding the size of the third preset threshold, there may be different values in combination with the number of sub-icons into which the desktop icon is divided. For example, if the desktop icon is divided into three sub-icons, if the difference between the color values of two sub-icons in the three sub-icons and the color value of the desktop background area where the sub-icons are located is smaller than the second preset threshold, it is difficult to identify the desktop icon from the desktop background area where the desktop icon is located. Therefore, the third preset threshold may be set to 2. For another example, if the desktop icon is divided into four sub-icons, a third preset threshold may be set to 2 or 3, and so on.
In step S404, a desktop background target area matched with the desktop icon is selected in the area where the desktop icons are not arranged, and the desktop icon is adjusted to the desktop background target area matched with the desktop icon.
The principle of this step is the same as that in step S204, and reference may be specifically made to the content in step S204, which is not described herein again.
According to the method provided by the embodiment of the disclosure, whether the desktop icon is matched with the desktop background area is determined according to the color value of the desktop icon and the color value of the desktop background area, and the desktop icon is adjusted to the desktop background target area matched with the desktop icon under the condition that the desktop icon is not matched with the desktop background area, so that the position of the desktop icon is adjusted by combining the colors of the desktop icon and the desktop background area where the desktop icon is located.
FIG. 5 is a block diagram illustrating an apparatus for adjusting a position of a desktop icon, according to an example embodiment. Referring to fig. 5, the apparatus includes a first obtaining module 501, a second obtaining module 502, a determining module 503, and an adjusting module 504.
The first obtaining module 501 is configured to obtain a color value of a desktop icon;
the second obtaining module 502 is configured to obtain a color value of a desktop background area where the desktop icon is located;
the determining module 503 is configured to determine whether the desktop icon and the desktop background area where the desktop icon is located are matched according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located;
the adjustment module 504 is configured to adjust the desktop icon to a desktop background target area matching the desktop icon when the desktop icon and the desktop background area where the desktop icon is located do not match.
In another embodiment, the first obtaining module 501 includes a first obtaining unit and a first determining unit. Wherein,
the first acquisition unit is configured to acquire a color value of each pixel point included in the desktop icon;
the first determining unit is configured to determine an average color value of the desktop icon according to color values of all pixel points included in the desktop icon, and the average color value of the desktop icon is used as the color value of the desktop icon;
the second obtaining module 502 includes a second obtaining unit and a second determining unit. Wherein,
the second acquisition unit is configured to acquire a color value of each pixel point included in a desktop background area where the desktop icon is located;
the second determining unit is configured to determine an average color value of the desktop background area where the desktop icon is located according to the color values of all pixel points included in the desktop background area where the desktop icon is located, and use the average color value of the desktop background area where the desktop icon is located as the color value of the desktop background area where the desktop icon is located.
In another embodiment, the determining module 503 includes a third determining unit and a fourth determining unit. Wherein,
the third determining unit is configured to determine whether a difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value;
the fourth determining unit is configured to determine that the desktop icon and the desktop background area where the desktop icon is located are not matched when a difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value.
In another embodiment, the first obtaining module 501 includes a dividing unit, a third obtaining unit, and a fifth determining unit. Wherein,
the dividing unit is configured to divide the desktop icon into at least two sub-icons;
the third acquisition unit is configured to acquire color values of all pixel points included in each sub-icon;
the fifth determining unit is configured to determine an average color value of each sub-icon according to the color values of all pixel points included in each sub-icon, and take the average color value of each sub-icon as the color value of the desktop icon;
the second obtaining module 502 includes a fourth obtaining unit and a sixth determining unit. Wherein,
the fourth obtaining unit is configured to obtain color values of all pixel points included in a desktop background area where each sub-icon of the desktop icon is located;
the sixth determining unit is configured to determine an average color value of the desktop background area where each sub-icon is located according to the color values of all pixel points included in the desktop background area where each sub-icon is located, and use the average color value of the desktop background area where each sub-icon is located as the color value of the desktop background area where the desktop icon is located.
In another embodiment, the determining module 503 includes a seventh determining unit and an eighth determining unit. Wherein,
the seventh determining unit is configured to determine whether a difference value between the average color value of each sub-icon of the desktop icon and the average color value of the desktop background area in which each sub-icon is located is less than a second preset threshold value;
the eighth determining unit is configured to determine that the desktop icon and the desktop background area where the desktop icon is located are not matched when the number of sub-icons of which the difference is smaller than the second preset threshold reaches a third preset threshold.
In another embodiment, the adjusting module 504 includes a fifth obtaining unit and an adjusting unit. Wherein,
the fifth acquisition unit is configured to select a desktop background target area matched with the desktop icons in the area where the desktop icons are not arranged;
the adjusting unit is configured to adjust the desktop icon to a desktop background target area matching the desktop icon.
According to the device provided by the embodiment of the disclosure, whether the desktop background area where the desktop icon is located is matched with the desktop background area where the desktop icon is located is determined according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located, and the desktop icon is adjusted to the desktop background target area matched with the desktop icon under the condition that the desktop icon is not matched with the desktop background area where the desktop icon is located, it is ensured that the position of the desktop icon is adjusted by combining the colors of the desktop icon and the desktop background area where the desktop icon is located, the adjusting method is more flexible and intelligent, meanwhile, the matching of the desktop icon and the desktop background area where the desktop icon is located can be ensured, and the position adjusting effect of the desktop icon is more attractive.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 6 is a block diagram illustrating an apparatus 600 for adjusting a position of a desktop icon, according to an example embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, interface to I/O (Input/Output) 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operation at the device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 604 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as an SRAM (Static Random Access Memory), an EEPROM (Electrically-Erasable Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory), a PROM (Programmable Read-Only Memory), a ROM (Read-Only Memory), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a user. In some embodiments, the screen may include an LCD (Liquid Crystal Display) and a TP (Touch Panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the device 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of components, such as a display and keypad of the apparatus 600, the sensor component 614 may also detect a change in position of the apparatus 600 or a component of the apparatus 600, the presence or absence of user contact with the apparatus 600, orientation or acceleration/deceleration of the apparatus 600, and a change in temperature of the apparatus 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS (Complementary Metal Oxide Semiconductor) or CCD (Charge-coupled Device) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range Communication. For example, the NFC module may be implemented based on an RFID (Radio Frequency Identification) technology, an IrDA (infrared-Data Association) technology, an UWB (Ultra Wideband) technology, a BT (Bluetooth) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more ASICs (Application Specific Integrated circuits), DSPs (Digital signal processors), DSPDs (Digital signal processing devices), PLDs (Programmable Logic devices), FPGAs (Field Programmable Gate arrays), controllers, microcontrollers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the apparatus 600 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of adjusting a position of a desktop icon, the method comprising:
acquiring a color value of a desktop icon, and acquiring a color value of a desktop background area where the desktop icon is located;
determining whether the desktop background area where the desktop icon and the desktop icon are located are matched according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located;
and if the desktop background area where the desktop icon is located is not matched with the desktop background area where the desktop icon is located, adjusting the desktop icon to the desktop background target area matched with the desktop icon.
According to the non-transitory computer-readable storage medium provided by the embodiment of the disclosure, whether the desktop icon is matched with the desktop background area where the desktop icon is located is determined according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located, and the desktop icon is adjusted to the desktop background target area matched with the desktop icon under the condition that the desktop icon is not matched with the desktop background area where the desktop icon is located, so that the position of the desktop icon is adjusted by combining the colors of the desktop icon and the desktop background area where the desktop icon is located.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (10)
1. A method for adjusting the position of a desktop icon is applied to a terminal, and comprises the following steps:
acquiring a color value of a desktop icon, and acquiring a color value of a desktop background area where the desktop icon is located;
determining whether the desktop icon is matched with the desktop background area of the desktop icon according to the color value of the desktop icon and the color value of the desktop background area of the desktop icon;
if the desktop background area where the desktop icon is located is not matched with the desktop background area where the desktop icon is located, adjusting the position of the desktop icon to a desktop background target area matched with the desktop icon;
the terminal is provided with at least one interface, and the adjusting of the position of the desktop icon to a desktop background target area matched with the desktop icon comprises the following steps:
selecting a desktop background target area matched with the desktop icons in an area where the desktop icons are not arranged, and adjusting the positions of the desktop icons to the desktop background target area matched with the desktop icons, wherein the desktop background target area is positioned in the at least one interface and is not arranged on the interface of the desktop icons.
2. The method of claim 1, wherein obtaining the color value of the desktop icon comprises:
acquiring the color value of each pixel point included by the desktop icon, determining the average color value of the desktop icon according to the color values of all the pixel points included by the desktop icon, and taking the average color value of the desktop icon as the color value of the desktop icon;
the acquiring the color value of the desktop background area where the desktop icon is located includes:
the method comprises the steps of obtaining the color value of each pixel point included in the desktop background area where the desktop icon is located, determining the average color value of the desktop background area where the desktop icon is located according to the color values of all the pixel points included in the desktop background area where the desktop icon is located, and taking the average color value of the desktop background area where the desktop icon is located as the color value of the desktop background area where the desktop icon is located.
3. The method of claim 2, wherein the determining whether the desktop icon and the desktop background area where the desktop icon is located are matched according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located comprises:
determining whether the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value;
and if the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value, determining that the desktop icon is not matched with the desktop background area where the desktop icon is located.
4. The method of claim 1, wherein obtaining the color value of the desktop icon comprises:
dividing the desktop icon into at least two sub-icons, acquiring color values of all pixel points included by each sub-icon, determining an average color value of each sub-icon according to the color values of all pixel points included by each sub-icon, and taking the average color value of each sub-icon as the color value of the desktop icon;
the acquiring the color value of the desktop background area where the desktop icon is located includes:
the method comprises the steps of obtaining color values of all pixel points included in a desktop background area where each sub-icon of the desktop icon is located, determining an average color value of the desktop background area where each sub-icon is located according to the color values of all pixel points included in the desktop background area where each sub-icon is located, and taking the average color value of the desktop background area where each sub-icon is located as the color value of the desktop background area where the desktop icon is located.
5. The method of claim 4, wherein the determining whether the desktop icon and the desktop background area where the desktop icon is located are matched according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located comprises:
determining whether the difference value between the average color value of each sub-icon of the desktop icon and the average color value of the desktop background area where each sub-icon is located is smaller than a second preset threshold value;
and if the number of the sub-icons with the difference value smaller than the second preset threshold reaches a third preset threshold, determining that the desktop icons are not matched with the desktop background area where the desktop icons are located.
6. An apparatus for adjusting a position of a desktop icon, the apparatus being a terminal, the apparatus comprising:
the first acquisition module is used for acquiring the color value of the desktop icon;
the second acquisition module is used for acquiring the color value of the desktop background area where the desktop icon is located;
the determining module is used for determining whether the desktop icon is matched with the desktop background area where the desktop icon is located according to the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located;
an adjusting module, configured to adjust the position of the desktop icon to a desktop background target area matching the desktop icon when the desktop icon and the desktop background area where the desktop icon is located are not matched,
wherein the terminal has at least one interface, the adjusting module comprises: the fifth acquisition unit is used for selecting a desktop background target area matched with the desktop icons in an area where the desktop icons are not arranged;
and the adjusting unit is used for adjusting the position of the desktop icon to a desktop background target area matched with the desktop icon, and the desktop background target area is positioned in the at least one interface and is not fully arranged on the interface of the desktop icon.
7. The apparatus of claim 6, wherein the first obtaining module comprises:
the first acquisition unit is used for acquiring the color value of each pixel point included by the desktop icon;
the first determining unit is used for determining the average color value of the desktop icon according to the color values of all pixel points included in the desktop icon, and taking the average color value of the desktop icon as the color value of the desktop icon;
the second obtaining module includes:
the second acquisition unit is used for acquiring the color value of each pixel point included in the desktop background area where the desktop icon is located;
and the second determining unit is used for determining the average color value of the desktop background area where the desktop icon is located according to the color values of all pixel points included in the desktop background area where the desktop icon is located, and taking the average color value of the desktop background area where the desktop icon is located as the color value of the desktop background area where the desktop icon is located.
8. The apparatus of claim 7, wherein the determining module comprises:
a third determining unit, configured to determine whether a difference between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold;
and the fourth determining unit is used for determining that the desktop icon is not matched with the desktop background area where the desktop icon is located when the difference value between the color value of the desktop icon and the color value of the desktop background area where the desktop icon is located is smaller than a first preset threshold value.
9. The apparatus of claim 6, wherein the first obtaining module comprises:
the dividing unit is used for dividing the desktop icon into at least two sub-icons;
the third acquisition unit is used for acquiring the color values of all pixel points included by each sub-icon;
the fifth determining unit is used for determining the average color value of each sub-icon according to the color values of all pixel points included in each sub-icon, and taking the average color value of each sub-icon as the color value of the desktop icon;
the second obtaining module includes:
the fourth obtaining unit is used for obtaining the color values of all pixel points included in a desktop background area where each sub-icon of the desktop icon is located;
and the sixth determining unit is used for determining the average color value of the desktop background area where each sub-icon is located according to the color values of all pixel points included in the desktop background area where each sub-icon is located, and taking the average color value of the desktop background area where each sub-icon is located as the color value of the desktop background area where the desktop icon is located.
10. The apparatus of claim 9, wherein the determining module comprises:
a seventh determining unit, configured to determine whether a difference between an average color value of each sub-icon of the desktop icon and an average color value of a desktop background area where each sub-icon is located is smaller than a second preset threshold;
and the eighth determining unit is used for determining that the desktop icon is not matched with the desktop background area where the desktop icon is located when the number of the sub-icons of which the difference values are smaller than the second preset threshold reaches a third preset threshold.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410172148.3A CN105094578B (en) | 2014-04-25 | 2014-04-25 | Method and device for adjusting position of desktop icon |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410172148.3A CN105094578B (en) | 2014-04-25 | 2014-04-25 | Method and device for adjusting position of desktop icon |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105094578A CN105094578A (en) | 2015-11-25 |
CN105094578B true CN105094578B (en) | 2021-08-17 |
Family
ID=54575160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410172148.3A Active CN105094578B (en) | 2014-04-25 | 2014-04-25 | Method and device for adjusting position of desktop icon |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105094578B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104063123A (en) * | 2014-05-28 | 2014-09-24 | 小米科技有限责任公司 | Icon displaying method and device |
CN105677352B (en) * | 2016-01-06 | 2020-03-17 | 北京小米移动软件有限公司 | Method and device for setting application icon color |
CN105808054A (en) * | 2016-02-29 | 2016-07-27 | 宇龙计算机通信科技(深圳)有限公司 | Control method and control device for control icon, terminal |
CN106527867B (en) * | 2016-11-29 | 2022-02-15 | 北京小米移动软件有限公司 | Method and device for moving suspension layer interface |
CN106873859A (en) * | 2017-03-06 | 2017-06-20 | 深圳天珑无线科技有限公司 | The method and electric terminal of a kind of intelligent distribution tablecloth and application program |
CN106951235A (en) * | 2017-03-06 | 2017-07-14 | 深圳天珑无线科技有限公司 | The method and electric terminal of a kind of intelligent set tablecloth and application program |
CN106951234A (en) * | 2017-03-06 | 2017-07-14 | 深圳天珑无线科技有限公司 | A kind of method and electric terminal for realizing tablecloth and application program intelligent distribution |
CN107329791A (en) * | 2017-07-03 | 2017-11-07 | 深圳Tcl新技术有限公司 | Method, device and the computer-readable recording medium of application are installed in scanning |
CN107390976B (en) * | 2017-07-26 | 2020-09-08 | 上海展扬通信技术有限公司 | Icon display processing method and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916168A (en) * | 2010-08-31 | 2010-12-15 | 宇龙计算机通信科技(深圳)有限公司 | Method and system for displaying application icon and mobile terminal |
CN103019560A (en) * | 2012-11-29 | 2013-04-03 | 中兴通讯股份有限公司 | Method and device for controlling interface of mobile terminal and mobile terminal |
CN103176761A (en) * | 2011-12-23 | 2013-06-26 | 中国移动通信集团公司 | Screen background setting method and movable terminal |
CN103488397A (en) * | 2013-09-13 | 2014-01-01 | 深圳市欧珀通信软件有限公司 | Method and device for arranging icons, and mobile terminal |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092469A (en) * | 2013-01-30 | 2013-05-08 | 东莞宇龙通信科技有限公司 | Terminal and icon moving method |
CN103488379B (en) * | 2013-09-16 | 2016-08-17 | 北京奇虎科技有限公司 | The desktop elements method of adjustment of a kind of intelligent terminal and device |
-
2014
- 2014-04-25 CN CN201410172148.3A patent/CN105094578B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916168A (en) * | 2010-08-31 | 2010-12-15 | 宇龙计算机通信科技(深圳)有限公司 | Method and system for displaying application icon and mobile terminal |
CN103176761A (en) * | 2011-12-23 | 2013-06-26 | 中国移动通信集团公司 | Screen background setting method and movable terminal |
CN103019560A (en) * | 2012-11-29 | 2013-04-03 | 中兴通讯股份有限公司 | Method and device for controlling interface of mobile terminal and mobile terminal |
CN103488397A (en) * | 2013-09-13 | 2014-01-01 | 深圳市欧珀通信软件有限公司 | Method and device for arranging icons, and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN105094578A (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105094578B (en) | Method and device for adjusting position of desktop icon | |
EP3179711B1 (en) | Method and apparatus for preventing photograph from being shielded | |
CN105204846B (en) | Display methods, device and the terminal device of video pictures in more people's videos | |
US20170031557A1 (en) | Method and apparatus for adjusting shooting function | |
CN107102772B (en) | Touch control method and device | |
CN105487805B (en) | Object operation method and device | |
EP3121699A1 (en) | Method and device for displaying badge of icon | |
CN105912258B (en) | Operation processing method and device | |
CN104536783B (en) | Headspace method to set up and device | |
CN107992257B (en) | Screen splitting method and device | |
CN103945275B (en) | Picture recording control method and device and mobile terminal | |
CN107562349B (en) | Method and device for executing processing | |
EP3232301B1 (en) | Mobile terminal and virtual key processing method | |
CN104049864B (en) | object control method and device | |
EP2924552A1 (en) | Method and mobile terminal for executing user instructions | |
CN105094539B (en) | Reference information display methods and device | |
CN105446616A (en) | Screen display control method, apparatus and device | |
CN105956486A (en) | Remote control method and apparatus | |
US10013151B2 (en) | Method and terminal device for adjusting widget | |
CN108881634A (en) | Terminal control method, device and computer readable storage medium | |
CN105677352B (en) | Method and device for setting application icon color | |
CN106296775B (en) | Icon generation method and device | |
CN116954540A (en) | Application program display method and device and terminal | |
CN107491238B (en) | Display method and device of push information | |
CN106527919A (en) | Method and device for adjusting screen display |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |