Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Example 1
The embodiment of the application provides a setting method of an interface switching animation, which is used for providing a scheme for setting the color of the interface switching animation.
The execution main body of the setting method for the interface switching animation provided by the embodiment of the application can be, but is not limited to, at least one of terminal devices such as a mobile phone, a tablet Computer, a Personal Computer (PC), and a smart television. The main body of execution of the method may be an Application (APP) installed in the terminal.
For convenience of description, the following description will be made on an embodiment of the method, taking the execution subject of the method as the user terminal as an example. It is understood that the execution of the method by the ue is only an exemplary illustration and should not be construed as a limitation to the method.
Specifically, a specific implementation flow of the setting method for interface switching animation provided by the embodiment of the present application is shown in fig. 1, and mainly includes the following steps:
step 11, determining at least one color value (hereinafter referred to as a first color value);
for example, the first color value may be a six-bit hexadecimal numerical value used for representing a color in software, the six digits are divided into 3 groups, each group has two digits, and the six digits sequentially represent intensities of three colors, namely red, green and blue. The different colors can be formed by superposition of three basic colors of red, green and blue, and then the first color values of the different colors can be represented by three numerical values indicating the intensities of the red, green and blue components.
The specific implementation manner for determining at least one first color value provided in the embodiment of the present application may include, but is not limited to, the following three types:
mode 1: determining at least one first color value from the designated image;
the designated image may be determined according to a default rule or a custom rule set by a user.
According to a default rule or a custom rule, the user terminal may determine an image as the designated image, for example, in response to a received image selection instruction; or, the wallpaper currently used by the user terminal can be used as the designated image; and so on.
The designated image is typically a bitmap. Each pixel of the specified image has a color value, which may also be referred to as a pixel color value.
Specifically, the user terminal may determine at least one first color value from pixel color values of the designated image through different color absorption algorithms.
For example, the user terminal may extract color values in an image by setting an algorithm (which may be called a color absorbing algorithm according to a function realized by the algorithm). Specifically, depending on the number of color values to be extracted, different principles of the color absorption algorithm may be employed. For example:
determining a certain pixel color value of the designated image as a first color value or determining a plurality of pixel color values of the designated image as a plurality of first color values through a color absorbing algorithm; or,
the user terminal can also calculate the mean value of all pixel color values of the designated image through a color absorption algorithm, and determine the mean value as a first color value, wherein the mode is generally suitable for the condition of extracting one first color value; or,
the user terminal may also count the number of pixels having different color values in the designated image through a color absorption algorithm, and determine the first color value according to a statistical result, for example, if one first color value needs to be extracted, a color value corresponding to the largest number of the counted total numbers may be used as the first color value, and if a plurality of first color values need to be extracted, color values corresponding to the top corresponding numbers in the counted total numbers may be sorted from large to small, and sorted as the plurality of first color values that need to be extracted; or,
the user terminal can also determine a pixel color value used for representing the dominant hue of the designated image through a color absorption algorithm, and determine the pixel color value as a first color value, wherein the manner is generally suitable for the condition of extracting one first color value, and if a plurality of color values need to be extracted, a plurality of hues can be determined; and so on.
The "main color tone" represents a basic tendency of color appearance. Specifically, an image, although using multiple colors, is generally prone to colors, such as bluish or reddish, warmer or colder, etc., and the primary tendency for the appearance of a color is the dominant hue of an image. In general, the main color tone is divided into a warm color tone, a cool color tone, and a neutral color tone. Generally, red, orange, yellow are meant to represent warm tones; green, blue, black represent cool tones; and gray, purple, white represent intermediate tones. The higher the lightness of the cool tone, the warmer the overall feel, and the higher the lightness of the warm tone, the colder the overall feel.
Mode 2: displaying a color value interface comprising at least two colors, and determining at least one first color value according to the selection of a user on the colors contained in the color value interface;
the user terminal can display a color value interface comprising at least two colors for a user to select, and determines a color value corresponding to the color as a first color value in response to at least one received color selection instruction; the color selecting instruction may be, for example, a click instruction or a gesture instruction for a region corresponding to a certain color in the color value interface.
Mode 3: and determining at least one first color value according to the mapping relation between the specified event and the color value.
The specific event may refer to a time-related event, for example. Events such as holidays saved by default by the user terminal, birthdays and anniversaries saved by the user terminal according to user settings, and the like; the user terminal may store a mapping relationship between the date and the above event (e.g., a mapping relationship between 1 month and 1 day and a meta date, a mapping relationship between 2 months and 14 days and an episode, etc.), and when the current date (the system time of the user terminal) of the user terminal has a mapping relationship with a certain event, the event may be considered to be triggered.
The specified event may also be an event triggered by a specified operation of the user terminal. For example, the APP triggered by the clicking operation on the APP icon displayed by the user terminal starts (or closes) an event, the interface switching event triggered by the gesture operation on the APP interface displayed by the user terminal switches, and so on.
The user terminal can set and store mapping relations between different events and color values respectively for different events. Wherein an event may map one or more color values.
For example, for a denier, a mapping relationship between the denier and a color value representing red may be set; for example, for an APP start event, a mapping relationship between the event and a color value representing a started APP interface keytone may be set.
And step 12, determining a color value of an interface element included in part or all of the frame pictures of the interface switching animation according to the at least one first color value determined by executing the step 11.
In the embodiments of the present application, an interface generally refers to a medium for transferring and exchanging information between a human and a machine (computer), and is a set of supporting software, hardware, and methods for a user to perform bidirectional information interaction with a system. I.e., User Interfaces (UIs), also known as Human-Computer interfaces (HCI).
The interface switching may refer to switching an interface of an application a displayed on a display screen of the user terminal to an interface of an application B, for example; or may refer to switching the screen locking interface shown in fig. 2 displayed on the display screen of the user terminal to the operation interface (or referred to as a main interface) shown in fig. 3; and so on.
When the interfaces are switched, if the interfaces are switched from one interface to another interface suddenly and directly, the switching effect is relatively harsh, and bad use experience may be brought to a user. Therefore, to avoid this problem, the user terminal may present the interface switching process to the user in the form of animation when performing interface switching, so that the user may be guided how to switch from one interface to another. In general, an animation that represents an interface switching process and is presented when an interface is switched may be referred to as an interface switching animation.
Each frame picture constituting the interface switching animation may be a graphic (vector diagram) or an image (bitmap). Then, for a case that each frame of picture of the interface switching animation is an image, determining a color value of an interface element included in a part or all of the frame of picture of the interface switching animation according to the first color value, which may specifically include: and respectively assigning values to partial (or all) pixels of partial (or all) frame images in the interface switching animation according to the first color value. For the case that each frame of picture of the interface switching animation is a graphic, determining a color value of an interface element included in part or all of the frame of picture of the interface switching animation according to the first color value, which may specifically include: and respectively filling colors in partial (or all) areas of partial (or all) frame pictures in the interface switching animation according to the colors corresponding to the first color values.
In the embodiment of the application, the interface switching animation may be preset and stored in the user terminal, or may be generated by the user terminal by using a method such as graphic drawing.
As an example of the present application, the interface switching animation may include a picture with a set frame, and specifically, a frame rate, that is, the number of frames displayed per second, may be set in advance. For each frame of picture, different interface elements may be included, and one of the core ideas of the present application is to fill in the color of the interface element in each frame of picture included in the interface switch animation using the determined first color value.
As an example of the application, the number of the first color values to be extracted may be preset, and the corresponding number of color values may be allocated to each interface element included in each frame of picture composing the interface switching animation. The allocation may be random or according to a predetermined correspondence.
As an example of the present application, an interface element may refer to each content (or referred to as a visual object) included in a picture and constituting the picture, different interface elements are located at different positions of the picture, or, it can be said that a plurality of interface elements constitute one frame of the picture.
As an example of the present application, in each frame of picture constituting the interface switching animation, the position, size, number, and the like of the interface element may be changed from frame to frame. Each frame fills the interface element with the at least one first color value determined in step 11.
As an example of the present application, the same interface element may be the same in color, but may be different in size and/or position, in each frame of picture that makes up the interface switch animation.
As an example of the present application, the number of interface elements in each frame of picture constituting the interface switching animation may be the same or different.
As an example of the present application, if the position of the same interface element in each frame of picture composing the interface switching animation changes, the same interface element may move smoothly according to a set trajectory or move smoothly at random, and the smooth movement may mean that the position change of the same interface element in an adjacent frame is smaller than a set value.
As an example of the present application, if the size of the same interface element in each frame of picture composing the interface switching animation changes (e.g., increases or decreases), the same interface element may change smoothly, and the smooth change may mean that the size change of the same interface element in the adjacent frame is smaller than a set value.
As an example of the application, the position of the interface element included in the first frame of the interface switching animation may be determined according to the position (referred to as a touch point) where the user clicks or slides the screen, for example, the relative position relationship between each interface element and the touch point is preset, and after the touch point is determined, the position of each interface element in the first frame may be calculated.
As an example of the present application, after the first frame is generated, interface elements in subsequent frames may be drawn according to a set rule, where the set drawing may include: the amount of change in the position of the interface element in the adjacent frame, and/or the amount of change in the size of the interface element in the adjacent frame, etc.
In order to achieve the purpose of showing an interface switching process to a user through an interface switching animation, when a user terminal generates the interface switching animation, the interface switching animation may be generated according to related information of a gesture operation received by the user terminal, and in one implementation, the method provided by the embodiment of the present application may specifically include: acquiring related information of gesture operation; and generating the interface switching animation according to the related information of the gesture operation.
The gesture operation may refer to an operation that is received by the user terminal and can trigger an interface switching instruction, and the related information of the gesture operation may include, but is not limited to, the following information:
information 1: the sliding distance of the gesture operation.
The sliding distance of the gesture operation may be a distance from a starting point of the gesture operation on an operation interface of the user terminal to a terminating point of the gesture operation on the operation interface; or also a horizontal or vertical distance between the starting point and the end point.
Information 2: and the gesture operates the angle of the sliding track relative to a preset coordinate axis.
The preset coordinate may be, for example, a horizontal coordinate axis included in a screen coordinate system established based on a display screen of the user terminal, an angle of the gesture operation sliding track with respect to the preset coordinate axis may be an angle of an included angle between a straight line connecting a start point and a stop point of the gesture operation sliding track and the horizontal coordinate axis of the user terminal display interface.
The following describes how to generate an interface switching animation according to the above-mentioned information 1 and/or information 2.
For example, the information of the interface element related to the animation effect can be determined according to the information related to the gesture operation; and generating interface switching animation containing the interface elements according to the determined information related to the animation effect. The information related to the animation effect of the interface element may include, but is not limited to, a position of the interface element in the picture and/or a size of the interface element, for example.
Taking the example of determining the information of the interface element related to the animation effect according to the information 1 (the sliding distance of the gesture operation), in this embodiment of the present application, the size of the interface element mapped by the obtained information 1 may be determined according to a preset mapping relationship (hereinafter referred to as a first mapping relationship) between different sliding distances and sizes of the interface element. Therefore, an interface switching animation containing the interface element with the size can be further generated according to the determined size of the interface element, for example, according to a mode of drawing a graph. Generally, the larger the sliding distance is, the larger the size of the interface element mapped by the sliding distance can be, so that a user can intuitively feel the control of the interface switching animation by the gesture operation of the user on the size of the interface element contained in the interface switching animation, and the user experience is improved. In general, in the first mapping relationship, the same sliding distance may map the size of the same interface element when appearing in part or all of the pictures of the interface switching animation, or the same sliding distance may map the size of different interface elements when appearing in part or all of the pictures of the interface switching animation.
Taking the example of determining the information of the interface element related to the animation effect according to the information 2 (the angle of the gesture operation sliding track relative to the preset coordinate axis), in the embodiment of the present application, the position of the interface element mapped with the information 2 may be determined according to a preset mapping relationship (hereinafter referred to as a second mapping relationship) between different angles and the positions of the interface elements. Thus, further, an interface switching animation containing the interface element can be generated according to the determined interface element position, for example, according to a mode of drawing a graph. Wherein, at least one interface element contained in the generated interface switching animation satisfies the following conditions: the position of the interface element in part or all picture frames of the interface switching animation is consistent with the determined position of the interface element mapped with the information 2. Generally, in the second mapping relationship, the same angle may map each position of the same interface element in part or all of the pictures of the interface switching animation, or the same angle may map positions of different interface elements in part or all of the pictures of the interface switching animation.
Taking the example of determining information, related to an animation effect, of an interface element according to information 1 (a sliding distance of a gesture operation) and information 2 (an angle of a sliding track of the gesture operation relative to a preset coordinate axis), in this embodiment of the present application, each size of at least one interface element in each frame of picture of an interface switching animation to be generated may be determined according to information 1, each position of the at least one interface element in each frame of picture may be determined according to information 2, and then an interface switching animation including the at least one interface element may be generated according to each size and each position. When the positions are determined according to the information 2, a sliding track of gesture operation can be used as another basis, so that the positions of the at least one interface element in the frames of pictures meet the following conditions: the positions of the sliding tracks of the gesture operation in the screen coordinate system are taken as a reference, and the positions are arranged around the reference in a dispersed state. The interface elements in the interface switching animation generated according to the information 1 and the information 2 can have different positions and different sizes when appearing in different picture frames, so that a user can watch the animation effect of multiple ends, and the user experience is greatly improved.
In the embodiment of the present application, the first mapping relationship and the second mapping relationship may be a simple one-to-one mapping relationship or a complex functional relationship, and the first mapping relationship and the second mapping relationship are not limited in the embodiment of the present application.
Generally, an interface switching animation is provided with various display effect-related attributes, such as a color attribute, a transparency attribute, a brightness attribute, and the like. The user terminal assigns the attribute related to the display effect by using the attribute value, so that the interface switching animation has the display effect corresponding to the attribute value when the interface switching animation is displayed.
In this embodiment of the application, according to at least one first color value, a color value of an interface element included in a partial or entire frame picture of the interface switching animation is determined, which may include, but is not limited to, the following two ways:
mode 1: and assigning the at least one first color value to a color attribute of an interface element included in part or all of the frame pictures of the interface switching animation, or taking the at least one first color value as a filling color of the interface element included in part or all of the frame pictures of the interface switching animation.
For example, the at least one first color value may be assigned to a certain interface element or all interface elements included in part or all of the frame pictures of the interface switching animation. As an example of the present application, assigning a color value to an interface element may be to fill a picture area corresponding to the interface element with the color value. As an example of the present application, the interface element may be a display area having a set shape, for example. The size and position of the interface element in the picture may be preset or determined as described above.
In the implementation of the application, the first color values of the preset number (hereinafter referred to as the first number) can be determined according to the preset number. The number of interface elements (hereinafter referred to as a second number) to be subjected to color attribute assignment included in the interface switching animation may be the same as or different from the preset number. The interface element to be subjected to color attribute assignment may be an interface element that needs to be filled with a color value.
Specifically, when the first number is equal to the second number, the first number of first color values may be randomly assigned to the color attribute of each interface element in a manner of assigning different first color values to the color attribute of different interface elements; as an example of the application, assigning the color value to the color attribute of the interface element may be to fill a picture area corresponding to the interface element with the color value.
When the first number is greater than the second number, a second number of first color values may be selected from the first number of first color values according to a predetermined color value selection rule (which may be, but is not limited to, random selection), and the color attribute assigned to each interface element;
when the first number is smaller than the second number, the same first color value may be assigned to a plurality of interface elements, for example, the same first color value may be assigned to interface elements of the same type or in a neighboring area.
Mode 2: determining a color value (called a second color value) mapped with the at least one first color value according to the at least one first color value; and assigning the mapped color values to the color attributes of the interface elements included in part or all of the frame pictures of the interface switching animation.
For the latter implementation, in practical application, a preset number of color value sets may be set, and a mapping relationship (hereinafter referred to as a first mapping relationship) between each color value set and different color value ranges is established. Wherein each set of color values comprises at least one color value, respectively; the color values included in each color value set are all equivalent to the second color values.
The user terminal may determine a color value range in which the first color value falls according to the first color value and the different color value range; determining a color value set mapped by a color value range in which the first color value falls according to the first mapping relation; and assigning a value to the color attribute of the interface switching animation according to the color value in the determined color value set.
In the prior art, the interface switching animation of the user terminal is often preset by a developer and is stored on the user terminal. That is, at present, various display effect-related attributes (e.g., color attributes) of the interface switching animation are default values set in advance.
In the embodiment of the application, the user terminal can assign the color attribute of the interface switching animation according to the determined first color value, so that the color of the interface switching animation is associated with the first color value. Because the first color value can be flexibly set by the user through the three modes provided by the step 11, the requirement that the user flexibly sets the interface to switch the animation color according to the preference of the user can be met.
It should be noted that, in the embodiment of the present application, color attribute assignment may be performed on interface elements included in a part or all of the frame pictures of one interface switching animation according to the first color value, and color attribute assignment may also be performed on interface elements included in a part or all of the frame pictures of multiple interface switching animations.
In an embodiment, when only one first color value is determined by performing step 11, color attribute assignment may be performed on all interface elements included in the interface switching animation according to the determined one first color value; or, according to the determined first color value, assigning a color attribute to a specific interface element included in the interface switching animation.
It should be further noted that, when at least two first color values are determined by performing step 11, the at least two first color values may be respectively assigned to interface elements included in at least two interface switching animation parts or all frame pictures; or the at least two first color values can be respectively assigned to interface elements included in part or all of the frame pictures of the interface switching animation.
As an example of the present application, the interface element may have different shapes, such as a circle, a square, a triangle, etc.
In one embodiment, the implementation of step 12 may include: and determining the color value of the interface element included by part or all of the frame pictures of the interface switching animation according to the mapping relation between the at least one first color value and the position information of the interface element and the at least one first color value.
For example, on the premise that an interface switching animation is preset, positions of different interface elements included in the animation in a picture can be set. And specifies that: a first color value representing a warm tone, mapping position 1, a first color value representing a cool tone, mapping position 2. Then, subsequently, after determining the at least one first color value, the color value of the interface element included in part or all of the frame pictures of the interface switching animation may be determined according to the specified mapping relationship and the at least one first color value.
At present, users may often set different wallpaper pictures for different interfaces, for example, a lock screen wallpaper (i.e., a wallpaper picture displayed on a lock screen interface) may be set for a lock screen interface, and a desktop wallpaper (i.e., a wallpaper picture displayed on an operation interface) may also be set for an operation interface. And when the user terminal displays a screen locking interface and receives an interface switching instruction for indicating switching to an operation interface, the user terminal displays a preset interface switching animation, displays the operation interface after the display of the interface switching animation is finished, and simultaneously switches the screen locking wallpaper into desktop wallpaper.
In the prior art, the interface switching animation is usually preset by a developer and stored on a user terminal, so that when the desktop wallpaper and the lock screen wallpaper are set by a user, the interface switching animation, the wallpaper desktop and the lock screen wallpaper are not associated, and thus, the color of the interface switching animation may not be coordinated with the wallpaper color (for example, the keytone of the lock screen wallpaper is warm, the keytone of the interface switching animation is cool, and the like), which may bring poor visual experience to the user.
In an embodiment, the user terminal may assign a value to the color attribute of the interface switching animation according to a first color value determined according to the interface wallpaper, so that the color of the interface switching animation is associated with the first color value, and further the color of the interface switching animation is associated with the color of the interface wallpaper.
By associating the color of the interface switching animation with the color of the interface wallpaper, the requirement of flexibly setting the color of the interface switching animation by a user according to the preference of the user can be met, and meanwhile, the harmony of the interface switching animation and the interface wallpaper on the color can be ensured, so that the pleasing visual experience is brought to the user.
In order to associate the color of the interface switching animation with the color of the interface wallpaper, in an embodiment, the method implemented by the application further includes: and setting any frame of picture contained in the interface switching animation with the color value determined according to the at least one first color value as the background of the interface displayed after the interface switching animation is finished. As an example of the present application, in order to achieve the effect of smooth switching, a last frame of picture included in the interface switching animation may be selected and set as a background of the interface displayed after the interface switching animation is finished. For example, when the user terminal switches between the screen locking interface and the operation interface, the user terminal may set the last frame of picture included in the switching animation as the desktop wallpaper of the operation interface.
It should be noted that triggering the user terminal to set the condition of the interface wallpaper according to at least one frame of picture included in the interface switching animation after the color attribute is assigned may refer to that the user terminal receives a display instruction of an operation interface, for example; or it may also mean that the user terminal determines at least one first color value. For example, after the user terminal determines the at least one first color value, a color value of the interface switching animation may be determined according to the determined at least one first color value, and at least one frame of picture included in the interface switching animation whose color value is determined according to the at least one first color value is set as an interface wallpaper picture.
In one embodiment, when the user terminal switches the screen locking interface and the operation interface according to a received interface switching instruction, the user terminal may determine at least one first color value according to the screen locking wallpaper set by the user; assigning a color attribute of an interface switching animation of a screen locking interface and an operation interface according to the determined at least one first color value, and displaying the interface switching animation after the color attribute is assigned; after the display of the interface switching animation is completed, the user terminal can set desktop wallpaper of the operation interface according to the last frame of picture contained in the interface switching animation and display the operation interface.
Through the operation, the color of the interface switching animation is associated with the color of the screen locking wallpaper of the screen locking interface, and the desktop wallpaper of the operation interface is set according to one frame of picture included in the interface switching animation, so that the screen locking wallpaper, the desktop wallpaper and the interface switching animation are associated with each other (for example, the colors of the screen locking wallpaper, the desktop wallpaper and the interface switching animation are red, and the like), so that the interface switching animation can be ensured to have harmony with the colors of the two pictures of the interface wallpaper before and after the interface switching, and a better visual experience is brought to a user in the interface switching process.
It should be noted that, when the user terminal is a mobile phone and the interface switching process is switching from a mobile phone screen locking interface to a mobile phone operation interface, the above step 11 and step 12 may be implemented by the following specified modules on the mobile phone, which may specifically include:
a lock screen interface base module, which may be, for example, a lock screen interface base class (keyguard hostview); a wallpaper processing module, which may be, for example, a wallpaper processing class (WallpaperScreenElementEx); a bitmap file and color value storage module, which can be, for example, a bitmap file and a color intermediate storage class (WallpaperScreenElementHelper); a wallpaper color absorbing processing module, which can be a wallpaper color absorbing processing class (particle helper), for example; the imbibition algorithm processing library (libparticalcolor. so); the dynamic effect generation module can be, for example, a dynamic effect display color providing class (WallpaperControlScreenElement); and the dynamic effect display module can be a lock screen dynamic effect display class (Lockstyle), for example.
Then, a specific implementation flowchart for completing the foregoing steps 11 and 12 through the above modules is shown in fig. 4, and specifically includes:
loading screen locking wallpaper by a screen locking interface basic module, and sending the screen locking wallpaper to a wallpaper processing module;
the wallpaper processing module converts the received screen locking wallpaper into a bitmap file and sends the bitmap file and the color value storage module;
the bitmap file and color value storage module sends the received bitmap file to the wallpaper color absorption processing module;
the wallpaper color absorbing processing module carries out color absorbing processing on the received bitmap file by calling a color absorbing algorithm in the color absorbing algorithm processing library, and sends the obtained color value back to the bitmap file and color value storage module.
The bitmap file and color value storage module sends the received color values to the dynamic effect generation module;
the dynamic effect generation module sets the color of the interface switching animation according to the received color value;
and when the interface of the mobile phone is switched, the dynamic effect display module displays the interface switching animation with the set color.
By adopting the setting method of the interface switching animation provided by the embodiment 1 of the application, a scheme for setting the color of the interface switching animation is provided as the determined at least one color value can be obtained.
It should be noted that the execution subjects of the steps of the method provided in embodiment 1 may be the same device, or different devices may be used as the execution subjects of the method. For example, the execution subject of step 11 may be the user terminal 1, and the execution subject of step 12 may be the user terminal 2; or the execution subjects of step 11 and step 12 are both the user terminal 1, and so on.
It should be noted that, in the embodiment of the present application, numbers are set for each step to describe each step orderly, and the execution order of the steps is not limited, that is, the numbers set for each step in the embodiment of the present application are not considered as features limiting the execution order of the steps.
Example 2
The embodiment of the application provides a method for setting an interface switching animation displayed when a mobile phone screen locking interface and an operation interface are switched, and is used for providing a scheme for setting the color of the interface switching animation. The specific implementation flow chart of the method is shown in fig. 5, and mainly comprises the following steps:
step 21, the mobile phone receives an unlocking instruction;
for example, the unlocking instruction may refer to a click instruction or a gesture instruction (e.g., sliding) issued by a user with respect to an "unlocking button" displayed on the screen of the mobile phone, for example, on the screen locking interface in fig. 2.
Step 22, in response to receiving the unlocking instruction, the mobile phone performs color sampling on the screen locking wallpaper contained in the screen locking interface;
for example, the mobile phone may adopt a color absorption algorithm to count the number of pixels with different color values in the lock screen wallpaper; and determining the color value corresponding to the maximum number in all the counted numbers as the first color value.
Step 23, assigning a color attribute of an interface switching animation displayed when the screen locking interface and the operation interface are switched by the mobile phone according to the determined first color value;
for example, assuming that the determined first color values are a color value corresponding to yellow, a color value corresponding to red, a color value corresponding to green, and a color value corresponding to blue by executing step 22, and it is exemplarily assumed that the interface switching animation includes four frames of pictures, and the three frames of pictures are sequentially shown in fig. 6 to 9, the mobile phone may assign values to the color attributes of different circular areas in the pictures according to the four color values.
Step 24, displaying the interface switching animation after the color value attribute is assigned by the mobile phone;
and step 25, after the display of the interface switching animation is finished, the mobile phone displays the last frame of picture contained in the interface switching animation with the assigned color attribute and shown in fig. 9 as desktop wallpaper of the operation interface. The operation interface with the last frame of picture as desktop wallpaper is shown in fig. 3.
By adopting the setting method of the interface switching animation provided by the embodiment 2 of the application, a scheme for setting the color of the interface switching animation is provided as the determined at least one color value can be obtained.
Example 3
The embodiment of the application provides a setting device for interface switching animation, which is used for providing a scheme for setting the color of the interface switching animation. The specific structural diagram of the device is shown in fig. 10, and the device comprises: a color value determining unit 31 and a color attribute assigning unit 32.
Wherein the color value determining unit 31 is configured to determine at least one color value;
and the color attribute assignment unit 32 is configured to determine, according to the at least one color value, a color value of an interface element included in part or all of the frame pictures of the interface switching animation.
In order to allow the user to flexibly determine the first color value as desired, in one embodiment, the color value determining unit 31 is configured to: determining at least one color value from the specified image; or displaying a color value interface comprising at least two colors, and determining at least one color value according to the selection of a user on the colors contained in the color value interface; or determining at least one color value according to the mapping relation between the specified event and the color value.
In one embodiment, the color attribute assigning unit 32 is further configured to: and executing a preset operation on at least one frame of picture contained in the interface switching animation after the color value is determined.
In one embodiment, the color attribute assigning unit 32 is configured to: and setting the last frame of picture contained in the interface switching animation after the color value is determined as the background of the interface displayed after the interface switching animation is finished.
In one embodiment, the background of the interface displayed after the interface switching animation is finished comprises: desktop wallpaper.
In one embodiment, the interface switching animation generating unit is configured to: acquiring related information of gesture operation; and generating the interface switching animation according to the related information of the gesture operation.
In one embodiment, the information related to the gesture operation includes at least one of the following information: the sliding distance of the gesture operation; and the gesture operates the angle of the sliding track relative to a preset coordinate axis.
In one embodiment, the interface switching animation generating unit is configured to: determining information of the interface element related to the animation effect according to the related information of the gesture operation; information related to animation effects of the interface elements, including positions of the interface elements in the picture and/or sizes of the interface elements; and generating the interface switching animation containing the interface elements according to the determined information related to the animation effect.
In one embodiment, the color attribute assigning unit 32 is configured to: and determining the color value of the interface element included by part or all of the frame pictures of the interface switching animation according to the mapping relation between the at least one color value and the position information of the interface element and the at least one color value.
In one embodiment, the color attribute assigning unit is configured to: assigning the at least one color value to a color attribute of an interface element included in part or all of the frame pictures of the interface switching animation according to the mapping relation; or, determining a color value mapped with the at least one color value according to the at least one color value; and assigning the mapped color values to the color attributes of the interface elements included in part or all of the frame pictures of the interface switching animation according to the mapping relation.
By adopting the setting device for the interface switching animation provided by the embodiment 3 of the application, a scheme for setting the color of the interface switching animation is provided as the setting device can be used for setting at least one color value according to the determined color value.
Example 4
The embodiment of the application provides a setting device for interface switching animation, which is used for providing a scheme for setting the color of the interface switching animation.
The device can be a smart phone or a computer, for example. The setting device for the interface switching animation can comprise a processor, a memory and the like.
Wherein the memory is used for storing program instructions; a processor, coupled to the memory, for reading program instructions stored by the memory and, in response, performing the following: determining at least one color value; and determining the color value of an interface element included in part or all of the frame pictures of the interface switching animation according to the at least one color value.
In order to allow a user flexibility in determining the first color value as desired, in one embodiment, the processor is configured to: determining at least one color value from the specified image; or displaying a color value interface comprising at least two colors, and determining at least one color value according to the selection of a user on the colors contained in the color value interface; or determining at least one color value according to the mapping relation between the specified event and the color value.
In one embodiment, the processor is further configured to perform a predetermined operation on at least one frame of picture included in the interface switching animation after the color value is determined.
In an embodiment, the processor is configured to set a last frame of picture included in the interface switching animation after the color value is determined as a background of the interface displayed after the interface switching animation is ended.
In one embodiment, the background of the interface displayed after the interface switching animation is finished comprises: desktop wallpaper.
In one embodiment, the processor is used for acquiring information related to gesture operation; and generating the interface switching animation according to the related information of the gesture operation.
In one embodiment, the information related to the gesture operation includes at least one of the following information: the sliding distance of the gesture operation; and the gesture operates the angle of the sliding track relative to a preset coordinate axis.
In one embodiment, the processor is used for determining information related to animation effect of the interface element according to the information related to the gesture operation; information related to animation effects of the interface elements, including positions of the interface elements in the picture and/or sizes of the interface elements; and generating the interface switching animation containing the interface elements according to the determined information related to the animation effect.
In an embodiment, the processor is configured to determine, according to the mapping relationship between the at least one color value and the position information of the interface element, a color value of the interface element included in part or all of the frame pictures of the interface switching animation.
In an embodiment, the processor is configured to assign the at least one color value to a color attribute of an interface element included in part or all of the frame pictures of the interface switching animation according to the mapping relationship; or, determining a color value mapped with the at least one color value according to the at least one color value; and assigning the mapped color values to the color attributes of the interface elements included in part or all of the frame pictures of the interface switching animation according to the mapping relation.
By adopting the setting device for the interface switching animation provided by the embodiment 4 of the application, a scheme for setting the color of the interface switching animation is provided as the setting device can be used for setting at least one color value according to the determined color value.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.