CN113918264A - Interface switching method and device, electronic equipment and storage medium - Google Patents

Interface switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113918264A
CN113918264A CN202111332280.2A CN202111332280A CN113918264A CN 113918264 A CN113918264 A CN 113918264A CN 202111332280 A CN202111332280 A CN 202111332280A CN 113918264 A CN113918264 A CN 113918264A
Authority
CN
China
Prior art keywords
interface
visual element
switching
interpolation
switched
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.)
Pending
Application number
CN202111332280.2A
Other languages
Chinese (zh)
Inventor
施为
颜昀
陈云中
王磊泰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN202111332280.2A priority Critical patent/CN113918264A/en
Publication of CN113918264A publication Critical patent/CN113918264A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention discloses an interface switching method, an interface switching device, electronic equipment and a storage medium, wherein when an interface switching instruction is detected on a displayed first interface, a second interface corresponding to the interface switching instruction and a visual element to be switched are determined, an initial value of the visual element in the first interface and a target value of the visual element of the second interface are obtained, a sliding offset position of the first interface at the current moment is determined in the process of switching the first interface to the second interface, and a visual element interpolation value at the current moment is determined based on the initial value of the visual element, the target value of the visual element and the sliding offset position and is displayed on the current switching interface. In the interface switching process, the visual element interpolation determined according to the real-time sliding offset position of the first interface is displayed on the page in the switching process, so that the first interface is seamlessly switched from one state to the other state displayed on the second interface in a self-adaptive manner, and the whole interface switching process has a transition effect, thereby improving the user experience.

Description

Interface switching method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of electronic device technologies, and in particular, to an interface switching method and apparatus, an electronic device, and a storage medium.
Background
With the development of mobile internet technology, the design and display of interfaces (UI) and the interaction effect are more and more emphasized by people. For example, there are multiple channel pages in the APP home page of the mobile phone, the channel pages are in a flat page relationship, and switching between the channel pages is generally performed by sliding the screen content horizontally or clicking a specific channel title as a switching trigger, so as to completely switch the currently displayed channel page to the target channel page as an end. Often different channel pages have different visual elements such as the font of the title bar text, the background color of the title bar, etc.
However, after research, the inventors of the present invention found that there are generally two cases of the existing interface switching: in the first case, in the interface switching triggering stage, the current interface is directly switched to the target interface; in the second case, at the moment when the interface switching is about to end, the current interface is immediately switched to the target interface. No matter which interface switching condition is adopted, the intermediate transition process of interface switching is not involved, so that the user experience in the whole interface switching process is poor.
Disclosure of Invention
In view of this, the invention discloses an interface switching method, an interface switching device, an electronic device and a storage medium, so as to achieve a transition effect in the whole interface switching process and greatly improve user experience during interface switching.
An interface switching method comprises the following steps:
when an interface switching instruction is detected on a displayed first interface, determining a second interface corresponding to the interface switching instruction and a visual element to be switched, wherein the second interface is an interface switched by the first interface;
obtaining the interpolation value of the visual elements to be switched in the first interface and recording the interpolation value as the initial value of the visual elements, and the interpolation value of the visual elements to be switched in the second interface and recording the interpolation value as the target value of the visual elements;
determining a sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface;
determining a visual element interpolation at the current time based on the visual element initial value, the visual element target value and the sliding offset position;
and displaying the visual element interpolation on a current switching interface, wherein the current switching interface is an interface displayed in the process of switching the first interface to the second interface.
Optionally, in the process of switching the first interface to the second interface, determining a sliding offset position of the first interface at the current time specifically includes:
determining the slide offset position k according to the following formula:
Figure BDA0003349231400000021
in the formula (d)oriIs the initial distance of the second interface relative to the origin in the space coordinate system, dcurIs the current distance of the second interface on the space coordinate system relative to the origin, w is the width of the second interface element, dori,dcur∈{0,+∞}。
Optionally, the determining the interpolation of the visual element at the current time based on the initial value of the visual element, the target value of the visual element, and the sliding offset position specifically includes:
determining the visual element interpolation f (C) according to the following formula1,C2,k):
f(C1,C2,k)=C1+(C2-C1)*k;
In the formula, C1Is the initial value of the visual element, C2K is the slide offset position for the visual element target value.
Optionally, when the visual element to be switched corresponding to the interface switching instruction is a color, the initial value C of the visual element is set1And the visual element target value C2Are all one-dimensional matrices, as follows:
C1=|r1,g1,b1,a1|;C2=|r2,g2,b2,a2|;
wherein r is1,g1,b1,r2,g2,b2Are all positive integers and represent the three primary colors, r, of the RGB metric color values1,g1,b1∈{0,255},r2,g2,b2∈{0,255},a1And a2Are all floating point numbers and all represent transparent values of color, a1∈{0,1},a2∈{0,1},k∈{-1,1}。
Optionally, when the visual element to be switched corresponding to the interface switching instruction is a font size, the initial value C of the visual element is obtained1And the visual element target value C2Are all positive integers and respectively represent the size of a font, C1∈{0,+∞},C2∈{0,+∞}。
An interface switching device comprising:
the device comprises a first determining unit, a second determining unit and a to-be-switched visual element, wherein the first determining unit is used for determining a second interface corresponding to an interface switching instruction and the to-be-switched visual element when the interface switching instruction is detected on a displayed first interface, and the second interface is an interface switched by the first interface;
the acquisition unit is used for acquiring the interpolation value of the visual element to be switched in the first interface and recording the interpolation value as an initial value of the visual element, and the interpolation value of the visual element to be switched in the second interface and recording the interpolation value as a target value of the visual element;
the second determining unit is used for determining the sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface;
a third determination unit configured to determine a visual element interpolation value at the current time based on the visual element initial value, the visual element target value, and the slide offset position;
and the display unit is used for displaying the visual element interpolation on a current switching interface, wherein the current switching interface is an interface displayed in the process of switching the first interface to the second interface.
Optionally, the second determining unit is specifically configured to:
determining the slide offset position k according to the following formula:
Figure BDA0003349231400000031
in the formula (d)oriIs the initial distance of the second interface relative to the origin in the space coordinate system, dcurIs the current distance of the second interface on the space coordinate system relative to the origin, w is the width of the second interface element, dori,dcur∈{0,+∞}。
Optionally, the third determining unit is specifically configured to:
determining the visual element interpolation f (C) according to the following formula1,C2,k):
f(C1,C2,k)=C1+(C2-C1)*k;
In the formula, C1Is the initial value of the visual element, C2K is the slide offset position for the visual element target value.
An electronic device comprising a memory and a processor;
the memory is to store at least one instruction;
the processor is configured to execute the at least one instruction to implement the interface switching method.
A computer-readable storage medium storing at least one instruction which, when executed by a processor, implements the interface switching method described above.
According to the technical scheme, when an interface switching instruction is detected on a displayed first interface, a second interface and a visual element to be switched corresponding to the interface switching instruction are determined, interpolation of the visual element to be switched in the first interface is obtained and recorded as an initial value of the visual element, interpolation of the visual element to be switched in the second interface is recorded as a target value of the visual element, in the process of switching the first interface to the second interface, the sliding offset position of the first interface at the current moment is determined, the interpolation of the visual element at the current moment is determined based on the initial value of the visual element, the target value of the visual element and the sliding offset position, and the interpolation of the visual element is displayed on the current switching interface displayed in the process of switching the first interface to the second interface. In the interface switching process, the visual element interpolation determined according to the real-time sliding offset position of the first interface is displayed on the page in the switching process, so that the first interface can be adaptively and seamlessly switched from one state to the other state displayed by the second interface.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the disclosed drawings without creative efforts.
Fig. 1 is a flowchart of an interface switching method disclosed in the embodiment of the present invention;
FIG. 2 is a schematic diagram of interface switching from left to right according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an interface switching apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The embodiment of the invention discloses an interface switching method, an interface switching device, electronic equipment and a storage medium, wherein when an interface switching instruction is detected on a displayed first interface, a second interface and a visual element to be switched corresponding to the interface switching instruction are determined, interpolation of the visual element to be switched in the first interface is obtained and is recorded as a visual element initial value, interpolation of the visual element to be switched in the second interface is recorded as a visual element target value, in the process of switching the first interface to the second interface, the sliding offset position of the first interface at the current moment is determined, the visual element interpolation at the current moment is determined based on the visual element initial value, the visual element target value and the sliding offset position, and the visual element interpolation is displayed on the current switching interface displayed in the process of switching the first interface to the second interface. In the interface switching process, the visual element interpolation determined according to the real-time sliding offset position of the first interface is displayed on the page in the switching process, so that the first interface can be adaptively and seamlessly switched from one state to the other state displayed by the second interface.
Referring to fig. 1, a flowchart of an interface switching method disclosed in the embodiment of the present invention includes:
s101, when an interface switching instruction is detected on a displayed first interface, determining a second interface corresponding to the interface switching instruction and a visual element to be switched;
and the second interface is the interface after the first interface is switched.
The visual elements to be switched can be position, size, background color, projection angle of the visual elements in the z coordinate, and the like, and in this embodiment, the visual elements to be switched can be one or more visual elements, which are determined by the operator according to the actual needs, and the invention is not limited herein.
S102, obtaining the interpolation value of the visual element to be switched in the first interface and recording the interpolation value as an initial value of the visual element, and the interpolation value of the visual element to be switched in the second interface and recording the interpolation value as a target value of the visual element;
step S103, determining the sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface;
specifically, the slide offset position k is determined according to formula (1):
Figure BDA0003349231400000061
in the formula (d)oriIs the initial distance of the second interface relative to the origin in the space coordinate system, dcurIs the current distance of the second interface on the space coordinate system relative to the origin, w is the width of the second interface element, dori,dcur∈{0,+∞}。
The spatial coordinate system in the present invention may be a cartesian coordinate system with the z-axis and the x-axis, the y-axis being mutually orthogonal to the origin. At any point P in the spatial coordinate system, its position can be expressed in rectangular coordinates (x, y, z).
It should be noted that in this embodiment, the value range of the sliding offset position k is preferably k ∈ { -1,1}, for the following reasons:
when the second interface moves from right to left, the value range of k is { - ∞,0}, and { -1,0} is preferably used as the effective range amount in the invention.
When the second interface moves from left to right, the value range of k is {0, + ∞ }, and the invention takes {0,1} as the effective range quantity preferentially.
In combination, the present invention gives priority to { -1,1} relative to the initial position offset amount during the leftward/rightward shift as the effective range.
Step S104, determining the visual element interpolation value at the current moment based on the visual element initial value, the visual element target value and the sliding offset position;
in practical application, an interpolation algorithm may be used to determine the real-time interpolation of the visual elements for the initial value of the visual elements, the target value of the visual elements, and the sliding offset position.
And S105, displaying the visual element interpolation on the current switching interface.
And the current switching interface is an interface displayed in the process of switching the first interface to the second interface.
It should be noted that, in the process of switching from the first interface to the second interface, the visual elements to be switched, such as the position, the size, the color background, the projection angle, etc., may be changed correspondingly.
In summary, the invention discloses an interface switching method, when an interface switching instruction is detected on a displayed first interface, a second interface and a visual element to be switched corresponding to the interface switching instruction are determined, interpolation of the visual element to be switched in the first interface is obtained and recorded as an initial value of the visual element, interpolation of the visual element to be switched in the second interface is recorded as a target value of the visual element, in the process of switching the first interface to the second interface, a sliding offset position of the first interface at the current moment is determined, the interpolation of the visual element at the current moment is determined based on the initial value of the visual element, the target value of the visual element and the sliding offset position, and the visual element is displayed on the current switching interface displayed in the process of switching the first interface to the second interface in an interpolation mode. In the interface switching process, the visual element interpolation determined according to the real-time sliding offset position of the first interface is displayed on the page in the switching process, so that the first interface can be adaptively and seamlessly switched from one state to the other state displayed by the second interface.
In order to facilitate understanding of the interface switching process disclosed by the present invention, the present invention further provides a specific embodiment, and referring to fig. 2, a schematic diagram of interface switching from left to right disclosed by the embodiment of the present invention, the switching process is as follows:
assuming that the visual elements to be switched are character colors and background colors, and recording the page before switching as: the first page, the switched page is recorded as: the second page, the first page and the second page are of the same size.
(1) Initial state before switching (see leftmost image):
the text color in the first interface is white and the background color is orange.
(2) End state after switching (see rightmost image):
the color of the characters in the second interface is black, and the color of the background is green.
(3) During the sliding of the first interface from left to right (see middle image):
and (3) determining the sliding offset position in real time according to a formula (1), calculating a specific color value in the page switching process in real time by adopting a color interpolation algorithm, and displaying the page which is being switched at the current moment by the color value.
To further optimize the above embodiment, step S104 may specifically include:
determining a visual element interpolation f (C) according to equation (2)1,C2,k):
f(C1,C2,k)=C1+(C2-C1)*k (2);
In the formula, C1Is the initial value of the visual element, C2K is the slide offset position for the visual element target value.
The visual elements to be switched can be colors, the sizes of fonts, projection angles and the like, and the initial values C of the visual elements of different visual elements to be switched1And visual element target value C2There will be differences in the values of (a) and (b), as exemplified below:
(1) when the visual element to be switched corresponding to the interface switching instruction is in color, the initial value C of the visual element1And visual element target value C2All are one-dimensional matrixes, the expression is shown as formula (3), and formula (3) is as follows:
C1=|r1,g1,b1,a1|;C2=|r2,g2,b2,a2| (3);
wherein r is1,g1,b1,r2,g2,b2Are all positive integers and represent the three primary colors, r, of the RGB metric color values1,g1,b1∈{0,255},r2,g2,b2∈{0,255},a1And a2Are all floating point numbers and all represent transparent values of color, a1∈{0,1},a2∈{0,1},k∈{-1,1}。
(2) When the visual element to be switched corresponding to the interface switching instruction is in the size of the font, the initial value C of the visual element1And visual element target value C2Are all positive integers and respectively represent the size of a font, C1∈{0,+∞},C2∈{0,+∞}。
Corresponding to the embodiment of the method, the invention also discloses an interface switching device.
Referring to fig. 3, a schematic structural diagram of an interface switching device disclosed in the embodiment of the present invention includes:
a first determining unit 201, configured to determine, when an interface switching instruction is detected on a displayed first interface, a second interface and a to-be-switched visual element that correspond to the interface switching instruction, where the second interface is an interface after switching of the first interface;
the visual elements to be switched can be positions, sizes, color backgrounds, projection angles and the like, and in this embodiment, the visual elements to be switched can be one or more visual elements, which are determined by the actual needs of operators, and the invention is not limited herein.
An obtaining unit 202, configured to obtain an interpolation value of a to-be-switched visual element in the first interface, which is recorded as an initial value of the visual element, and an interpolation value of the to-be-switched visual element in the second interface, which is recorded as a target value of the visual element;
a second determining unit 203, configured to determine a sliding offset position of the first interface at the current time in a process of switching the first interface to the second interface;
in this embodiment, the second determining unit 203 may specifically be configured to:
determining the slide offset position k according to equation (1):
Figure BDA0003349231400000091
in the formula (d)oriIs the initial distance of the second interface relative to the origin in the space coordinate system, dcurIs the current distance of the second interface on the space coordinate system relative to the origin, dori,dcur∈{0,+∞}。
It should be noted that in this embodiment, the value range of the sliding offset position k is preferably k ∈ { -1,1}, for the following reasons:
when the second interface moves from right to left, the value range of k is { - ∞,0}, and { -1,0} is preferably used as the effective range amount in the invention.
When the second interface moves from left to right, the value range of k is {0, + ∞ }, and the invention takes {0,1} as the effective range quantity preferentially.
In combination, the present invention gives priority to { -1,1} relative to the initial position offset amount during the leftward/rightward shift as the effective range.
A third determining unit 204, configured to determine a visual element interpolation at the current time based on the visual element initial value, the visual element target value, and the sliding offset position;
in practical application, an interpolation algorithm may be used to determine the real-time interpolation of the visual elements for the initial value of the visual elements, the target value of the visual elements, and the sliding offset position.
A display unit 205, configured to display the visual element interpolation on a current switching interface, where the current switching interface is an interface displayed in a process of switching the first interface to the second interface.
It should be noted that, in the process of switching from the first interface to the second interface, the visual elements to be switched, such as the position, the size, the color background, the projection angle, etc., may be changed correspondingly.
In summary, the invention discloses an interface switching device, when an interface switching instruction is detected on a displayed first interface, determining a second interface and a visual element to be switched corresponding to the interface switching instruction, obtaining an interpolation value of the visual element to be switched in the first interface, marking the interpolation value as an initial value of the visual element, and an interpolation value of the visual element to be switched in the second interface, marking the interpolation value as a target value of the visual element, determining a sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface, determining the interpolation value of the visual element at the current moment based on the initial value of the visual element, the target value of the visual element and the sliding offset position, and displaying the interpolation value of the visual element on the current switching interface displayed in the process of switching the first interface to the second interface. In the interface switching process, the visual element interpolation determined according to the real-time sliding offset position of the first interface is displayed on the page in the switching process, so that the first interface can be adaptively and seamlessly switched from one state to the other state displayed by the second interface.
To further optimize the above embodiment, the third determining unit 204 may specifically be configured to:
determining a visual element interpolation f (C) according to equation (2)1,C2,k):
f(C1,C2,k)=C1+(C2-C1)*k (2);
In the formula, C1Is the initial value of the visual element, C2K is the slide offset position for the visual element target value.
It should be noted that, for the specific working principle of each component in the device embodiment, please refer to the corresponding part of the method embodiment, which is not described herein again.
Corresponding to the above embodiment, as shown in fig. 4, the present invention further provides an electronic device, which may include: a processor 1 and a memory 2;
wherein, the processor 1 and the memory 2 complete the communication with each other through the communication bus 3;
a processor 1 for executing at least one instruction;
a memory 2 for storing at least one instruction;
the processor 1 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention.
The memory 2 may comprise a high-speed RAM memory and may also include a non-volatile memory, such as at least one disk memory.
Wherein, the processor executes at least one instruction to realize the following functions:
when an interface switching instruction is detected on a displayed first interface, determining a second interface corresponding to the interface switching instruction and a visual element to be switched, wherein the second interface is an interface switched by the first interface;
obtaining the interpolation value of the visual elements to be switched in the first interface and recording the interpolation value as the initial value of the visual elements, and the interpolation value of the visual elements to be switched in the second interface and recording the interpolation value as the target value of the visual elements;
determining a sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface;
determining a visual element interpolation at the current time based on the visual element initial value, the visual element target value and the sliding offset position;
and displaying the visual element interpolation on a current switching interface, wherein the current switching interface is an interface displayed in the process of switching the first interface to the second interface.
In summary, in the interface switching process, the visual element interpolation determined according to the real-time sliding offset position of the first interface is displayed on the page in the switching process, so that the first interface can be switched from one state to another state displayed by the second interface in a seamless mode in a self-adaptive mode.
The invention also discloses a computer readable storage medium storing at least one instruction which, when executed by a processor, implements the following functions:
when an interface switching instruction is detected on a displayed first interface, determining a second interface corresponding to the interface switching instruction and a visual element to be switched, wherein the second interface is an interface switched by the first interface;
obtaining the interpolation value of the visual elements to be switched in the first interface and recording the interpolation value as the initial value of the visual elements, and the interpolation value of the visual elements to be switched in the second interface and recording the interpolation value as the target value of the visual elements;
determining a sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface;
determining a visual element interpolation at the current time based on the visual element initial value, the visual element target value and the sliding offset position;
and displaying the visual element interpolation on a current switching interface, wherein the current switching interface is an interface displayed in the process of switching the first interface to the second interface.
It should be noted that, for concrete working principles of the electronic device and the computer-readable storage medium, please refer to corresponding parts of the method embodiments, which are not described herein again.
Finally, it is further noted that, herein, relational terms such as current and target, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An interface switching method is characterized by comprising the following steps:
when an interface switching instruction is detected on a displayed first interface, determining a second interface corresponding to the interface switching instruction and a visual element to be switched, wherein the second interface is an interface switched by the first interface;
obtaining the interpolation value of the visual elements to be switched in the first interface and recording the interpolation value as the initial value of the visual elements, and the interpolation value of the visual elements to be switched in the second interface and recording the interpolation value as the target value of the visual elements;
determining a sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface;
determining a visual element interpolation at the current time based on the visual element initial value, the visual element target value and the sliding offset position;
and displaying the visual element interpolation on a current switching interface, wherein the current switching interface is an interface displayed in the process of switching the first interface to the second interface.
2. The interface switching method according to claim 1, wherein determining a slide offset position of the first interface at a current time in a process of switching the first interface to the second interface specifically includes:
determining the slide offset position k according to the following formula:
Figure FDA0003349231390000011
in the formula (d)oriIs the initial distance of the second interface relative to the origin in the space coordinate system, dcurIs the current distance of the second interface on the space coordinate system relative to the origin, w is the width of the second interface element, dori,dcur∈{0,+∞}。
3. The interface switching method according to claim 1, wherein the determining a visual element interpolation at a current time based on the visual element initial value, the visual element target value, and the slide offset position specifically includes:
determining the visual element interpolation f (C) according to the following formula1,C2,k):
f(C1,C2,k)=C1+(C2-C1)*k;
In the formula, C1Is the initial value of the visual element, C2K is the slide offset position for the visual element target value.
4. The interface switching method according to claim 3, wherein when the interface switching instruction corresponds to the interface to be switchedWhen the visual element is switched to be in color, the initial value C of the visual element1And the visual element target value C2Are all one-dimensional matrices, as follows:
C1=|r1,g1,b1,a1|;C2=|r2,g2,b2,a2|;
wherein r is1,g1,b1,r2,g2,b2Are all positive integers and represent the three primary colors, r, of the RGB metric color values1,g1,b1∈{0,255},r2,g2,b2∈{0,255},a1And a2Are all floating point numbers and all represent transparent values of color, a1∈{0,1},a2∈{0,1},k∈{-1,1}。
5. The interface switching method according to claim 3, wherein when the visual element to be switched corresponding to the interface switching instruction is a font size, the initial value C of the visual element is set as the initial value C1And the visual element target value C2Are all positive integers and respectively represent the size of a font, C1∈{0,+∞},C2∈{0,+∞}。
6. An interface switching device, comprising:
the device comprises a first determining unit, a second determining unit and a to-be-switched visual element, wherein the first determining unit is used for determining a second interface corresponding to an interface switching instruction and the to-be-switched visual element when the interface switching instruction is detected on a displayed first interface, and the second interface is an interface switched by the first interface;
the acquisition unit is used for acquiring the interpolation value of the visual element to be switched in the first interface and recording the interpolation value as an initial value of the visual element, and the interpolation value of the visual element to be switched in the second interface and recording the interpolation value as a target value of the visual element;
the second determining unit is used for determining the sliding offset position of the first interface at the current moment in the process of switching the first interface to the second interface;
a third determination unit configured to determine a visual element interpolation value at the current time based on the visual element initial value, the visual element target value, and the slide offset position;
and the display unit is used for displaying the visual element interpolation on a current switching interface, wherein the current switching interface is an interface displayed in the process of switching the first interface to the second interface.
7. The interface switching apparatus according to claim 6, wherein the second determining unit is specifically configured to:
determining the slide offset position k according to the following formula:
Figure FDA0003349231390000031
in the formula (d)oriIs the initial distance of the second interface relative to the origin in the space coordinate system, dcurIs the current distance of the second interface on the space coordinate system relative to the origin, w is the width of the second interface element, dori,dcur∈{0,+∞}。
8. The interface switching device according to claim 6, wherein the third determining unit is specifically configured to:
determining the visual element interpolation f (C) according to the following formula1,C2,k):
f(C1,C2,k)=C1+(C2-C1)*k;
In the formula, C1Is the initial value of the visual element, C2K is the slide offset position for the visual element target value.
9. An electronic device, comprising a memory and a processor;
the memory is to store at least one instruction;
the processor is used for executing the at least one instruction to realize the interface switching method according to any one of claims 1 to 5.
10. A computer-readable storage medium storing at least one instruction which, when executed by a processor, implements an interface switching method as claimed in any one of claims 1 to 5.
CN202111332280.2A 2021-11-11 2021-11-11 Interface switching method and device, electronic equipment and storage medium Pending CN113918264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111332280.2A CN113918264A (en) 2021-11-11 2021-11-11 Interface switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111332280.2A CN113918264A (en) 2021-11-11 2021-11-11 Interface switching method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113918264A true CN113918264A (en) 2022-01-11

Family

ID=79246017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111332280.2A Pending CN113918264A (en) 2021-11-11 2021-11-11 Interface switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113918264A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024017183A1 (en) * 2022-07-22 2024-01-25 华为技术有限公司 Display method for interface switching, and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101968713A (en) * 2010-10-09 2011-02-09 宁波新然电子信息科技发展有限公司 Method for controlling three-dimensional switching of display interface
CN106873863A (en) * 2015-12-09 2017-06-20 阿里巴巴集团控股有限公司 The method to set up and device of a kind of changing interface animation
CN108287744A (en) * 2018-02-09 2018-07-17 腾讯科技(深圳)有限公司 Character displaying method, device and storage medium
CN109947521A (en) * 2019-03-28 2019-06-28 北京小米移动软件有限公司 Interface switching method, device and storage medium
CN111158814A (en) * 2019-12-18 2020-05-15 努比亚技术有限公司 Interface switching method, terminal and computer readable storage medium
CN113282212A (en) * 2021-05-17 2021-08-20 维沃移动通信有限公司 Interface display method, interface display device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101968713A (en) * 2010-10-09 2011-02-09 宁波新然电子信息科技发展有限公司 Method for controlling three-dimensional switching of display interface
CN106873863A (en) * 2015-12-09 2017-06-20 阿里巴巴集团控股有限公司 The method to set up and device of a kind of changing interface animation
CN108287744A (en) * 2018-02-09 2018-07-17 腾讯科技(深圳)有限公司 Character displaying method, device and storage medium
CN109947521A (en) * 2019-03-28 2019-06-28 北京小米移动软件有限公司 Interface switching method, device and storage medium
CN111158814A (en) * 2019-12-18 2020-05-15 努比亚技术有限公司 Interface switching method, terminal and computer readable storage medium
CN113282212A (en) * 2021-05-17 2021-08-20 维沃移动通信有限公司 Interface display method, interface display device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024017183A1 (en) * 2022-07-22 2024-01-25 华为技术有限公司 Display method for interface switching, and electronic device

Similar Documents

Publication Publication Date Title
WO2013186986A1 (en) Image processing apparatus, image processing method, and program
KR102121905B1 (en) Method and apparatus for setting background of ui control, and terminal
KR101450782B1 (en) Image processing device and program
CN104766354B (en) The method and mobile terminal that a kind of augmented reality is drawn
JP5981175B2 (en) Drawing display device and drawing display program
CN113918264A (en) Interface switching method and device, electronic equipment and storage medium
JP5907196B2 (en) Image processing apparatus, image processing method, image processing system, and program
CN112667105A (en) Touch screen control method, device, equipment and storage medium
CN110956584A (en) Pathological microscopic image interactive display method, medium and equipment
JP2011154533A (en) Device and program for controlling display
JP2016200860A (en) Information processing apparatus, control method thereof, and program
JP2019101721A (en) Information processing device and information processing system
CN106354381B (en) Image file processing method and device
JP6437299B2 (en) Information processing apparatus, information processing program, and information processing method
CN109766530B (en) Method and device for generating chart frame, storage medium and electronic equipment
DE102016122567A1 (en) INFORMATION PROCESSING DEVICE, CONTROL METHOD OF INFORMATION PROCESSING DEVICE AND STORAGE MEDIUM
CN108132716B (en) Adjustment method and device of browsing page and computer readable storage medium
CN112465931B (en) Image text erasing method, related equipment and readable storage medium
JP2006106976A (en) Image processor, image processing method and program
JP5751281B2 (en) Image display device and image display program
JP6155893B2 (en) Image processing apparatus and program
CN106951162B (en) Information processing method and electronic equipment
JP6225724B2 (en) Information sharing system, information sharing method, information processing apparatus, and information processing method
JP6973524B2 (en) program
CN112989779B (en) Table generation method, electronic equipment and storage medium thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination