Nothing Special   »   [go: up one dir, main page]

WO2022111698A1 - Method for generating transition animation for application switching, and related device - Google Patents

Method for generating transition animation for application switching, and related device Download PDF

Info

Publication number
WO2022111698A1
WO2022111698A1 PCT/CN2021/134089 CN2021134089W WO2022111698A1 WO 2022111698 A1 WO2022111698 A1 WO 2022111698A1 CN 2021134089 W CN2021134089 W CN 2021134089W WO 2022111698 A1 WO2022111698 A1 WO 2022111698A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
application
control information
element name
transition animation
Prior art date
Application number
PCT/CN2021/134089
Other languages
French (fr)
Chinese (zh)
Inventor
苏宏凯
李轩恺
温龙胜
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022111698A1 publication Critical patent/WO2022111698A1/en

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

Definitions

  • the present application relates to the technical field of terminals, and in particular, to a method for generating transition animations for application switching and related devices.
  • the resulting transition animation effect is single, for example, gradually fading out the current application page, gradually fading in the next application page, etc., will lead to switching between the pages of the two applications
  • the connection is relatively rigid, and it is difficult to achieve the smoothness of transition animations when switching between different applications.
  • a first aspect of the present application discloses a method for generating a transition animation for application switching.
  • the method for generating a transition animation for application switching includes: when a first application switches to a second application, obtaining a first control information and the second control information of the second application; according to the control attribute in the first control information and the corresponding matching rule, determine the matched control from the second control information; obtain the matched control
  • the name of the control element is used as the name of the shared element of the first application; the corresponding transition animation is executed according to the name of the shared element.
  • the present application realizes the smooth transition of the transition animation between different interfaces when switching between applications, and improves the smoothness of the transition animation.
  • the method further includes: determining the position of the matched control; performing the corresponding transition animation according to the shared element name includes: according to the shared element name and the matching The position of the control, execute the corresponding transition animation.
  • the interface of the first application is smoothly transitioned to the interface of the second application through the transition animation.
  • control properties include one or more of a control type, a control size ratio or a control color
  • the matching rules corresponding to the control properties include one or more of the following: The matching rule corresponding to the control type is that the control type is consistent; the matching rule corresponding to the size ratio of the control is that the difference of the size ratio of the control is within the preset difference range; the matching rule corresponding to the color of the control is the color of the control The similarity is within the preset similarity range.
  • one or more of the matching rules corresponding to the attributes of the control are used to determine the matching control from the second control information, so as to realize the automatic matching of the control, and then determine the shared element name.
  • the acquiring the control element name of the matched control is used as a shared element of the first application
  • the name includes: obtaining a target application icon matching the application icon in the first control information from the second control information, and determining the control element name of the target application icon to share the element name.
  • the transition animation is performed according to the shared element name and the position of the target application icon, so that the application icon of the desktop application is smoothly transitioned to the second application.
  • the acquiring the control element name of the matched control is used as the first application's name. Sharing an element name includes: acquiring a target picture and a target message matching the first control information from the second control information, and determining the control element name of the target picture and the control element name of the target message to share element name.
  • performing the corresponding transition animation according to the shared element name includes: according to the shared element name, the position of the target picture in the notification bar, and the position of the target message in the notification bar position to perform the transition animation.
  • the method before executing the corresponding transition animation according to the shared element name, the method further includes: when the notification bar application sends a notification, transferring the The transition animation corresponding to the shared element name.
  • the obtaining the control element name of the matched control as the shared element name of the first application includes: starting from the first application.
  • the target text matching the first control information is obtained from the second control information, and the control element name of the target text is determined as a shared element name.
  • the transition animation is performed according to the shared element name and the position of the target text, so that the text of the negative one-screen application can be smoothly transitioned to the second application.
  • the obtaining the control element name of the matched control as the shared element name of the first application includes: A matching picture that matches the first control information is obtained from the second control information, and the name of the control element of the matching picture is determined to be a shared element name.
  • the transition animation is executed according to the shared element name and the position of the matching picture, so that the picture of the file manager application can be smoothly transitioned to the second application.
  • the acquiring the first control information of the first application and the second control information of the second application includes: acquiring a first layout file of the first application, from the The first control information is extracted from the first layout file; the second layout file of the second application is acquired, and the second control information is extracted from the second layout file.
  • the method further includes: writing the shared element name into a first layout file of the first application.
  • the determining a matched control from the second control information includes: if a single control in the second control information matches a control in the first control information, determining the matched control The single control is the matched control.
  • the determining a matched control from the second control information includes: if a plurality of controls in the second control information matches a control in the first control information, from the second control information One or two controls are randomly selected from the plurality of controls as the matched controls.
  • the method further includes: if no control in the second control information matches the control in the first control information, comparing the first control information with the second control information
  • the name of the control element in the control information is modified to a preset name; in response to the read operation of the name of the control element in the first control information and the second control information;
  • the name is determined as the shared element name.
  • a second aspect of the present application discloses an electronic device, including a processor and a memory; the memory is used to store instructions; the processor is used to call the instructions in the memory, so that the electronic device executes the The transition animation generation method for application switching.
  • a third aspect of the present application discloses a computer-readable storage medium, where the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, realizes the transition animation generation method for application switching. .
  • a fourth aspect of the present application discloses a chip, which is coupled to a memory in an electronic device, and controls the electronic device to execute the method for generating a transition animation for switching applications.
  • FIG. 1 is a flowchart of a method for generating a transition animation for application switching disclosed in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed by another embodiment of the present application.
  • FIG. 4 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed by another embodiment of the present application.
  • FIG. 5 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed by yet another embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • words such as “exemplary” or “for example” are used to mean serving as an example, illustration or illustration. Any embodiments or designs described in the embodiments of the present application as “exemplary” or “such as” should not be construed as preferred or advantageous over other embodiments or designs. Rather, use of words such as “exemplary” or “such as” is intended to present the related concepts in a specific manner.
  • FIG. 1 it is a flowchart of a method for generating a transition animation of application switching in an embodiment of the present application.
  • the method is applied in an electronic device, and the electronic device can be a mobile phone, a tablet battery, a personal digital assistant, a smart TV, a reader, a wearable device, and the like.
  • the method for generating a transition animation for application switching may include the following steps.
  • Step S101 when switching from a first application to a second application, acquire first widget information of the first application and second widget information of the second application.
  • the first application may be a current application displayed on the electronic device, and the first application may be a desktop application, a notification bar application, a negative one-screen application, or a file manager application, or the like.
  • the second application may be a redirected application that needs to be used or called, and may include shopping applications, instant messaging applications (such as WeChat, QQ, MSN Messenger), video applications (such as Huawei Video, Instagram youtube, etc.), computing device, camera, call, SMS and other applications.
  • the first control information refers to the control and control attribute information constituting the first application page.
  • the second application can be started from a desktop launcher (Launcher) or opened from the background of the system.
  • the application component of the second application is obtained.
  • Activity is a basic component in the Android component, and the application component provides an interface through which the user can Interact to accomplish a task, such as displaying some controls or listening to and processing user actions in response.
  • the Activity name of the second application for example, the application component name is com.huawei.phone/.MainActivity
  • parse the configuration file of the Activity to obtain the first
  • the page information of the second application includes at least the control information constituting the second application page; and the second control information in the application program component is extracted. and extracting the second control information in the application component.
  • the first widget information may be acquired before the second widget information is acquired, or after the second widget information is acquired.
  • the display interface of the electronic device Before responding to the switching operation from the first application to the second application, the display interface of the electronic device displays the page layout corresponding to the first control information, and monitors whether the user performs the switching operation that triggers the switching of the first application to the second application. For example, it may be configured that the user performs switching operations such as clicking, double-clicking, or sliding on the application icon of the second application located in the first application interface to trigger a switching instruction for switching from the first application to the second application.
  • the acquiring the first control information of the first application and the second control information of the second application includes:
  • a second layout file of the second application is acquired, and the second control information is extracted from the second layout file.
  • the first layout file can be obtained through the Activity object or the Context object according to the layout file name of the first application, and then the first control information can be extracted from the first layout file; and according to the second application The layout file name of the second layout file is obtained, and then the second control information is extracted from the second layout file.
  • Step S102 Determine a matched control from the second control information according to the control attribute in the first control information and the corresponding matching rule.
  • the control properties may include, but are not limited to, one or more properties of a control type, a control size ratio (for example, a control aspect ratio), and a control color.
  • the matching rule corresponding to the control property may be that the control type is consistent, the difference in the size ratio of the control is within a preset range, and the background color of the control or the similarity of the main color is within the preset range.
  • the matching rule corresponding to the control type is the first matching rule with the same control type
  • the matching rule corresponding to the size ratio of the control is the second matching rule that the difference of the size ratio of the control is within the preset difference range
  • the matching rule corresponding to the color of the control is the third matching rule that the similarity of the color of the control is within the preset similarity range.
  • the second control information matching the first control information may be searched for according to the first control information.
  • the elements in the first application include an application icon (icon) and an application name (appname), wherein the application icon corresponds to an ImageView control in the first control information, and the application name corresponds to an image view (ImageView) control in the first control information.
  • the text box (TextView) control in the first control information For example, if the ImageView control is a square, the corresponding aspect ratio is 1:1, and the TextView control is a rectangle, and the corresponding aspect ratio is 2:3, that is, the control size ratio.
  • control type in the second control information is ImageView control and the control size ratio is 1:1 as the control matching the application icon of the first application
  • the control type in the second control information is TextView control and A control whose size ratio is 2:3 is used as a control matching the application name of the first application.
  • control properties include one or more of a control type, a control size ratio, or a control color
  • the matching rules corresponding to the control properties include one or more of the following; and
  • the matching rule corresponding to the control type is that the control type is consistent;
  • the matching rule corresponding to the size ratio of the control is that the difference of the size ratio of the control is within the preset difference range;
  • the matching rule corresponding to the color of the control is the similarity of the color of the control is within the preset similarity range.
  • one matching rule or multiple matching rules may be used to match the first control information and the second control information. If the single control in the second control information matches the control in the first control information, it is determined that the single control is the matched control. For example, using a matching rule for matching, when the control type in the first control information is a picture and the number of pictures is one, if there is a picture control in the second control information, the second control type can be determined according to the matching rule with the same control type. The picture in the control information is the matched control.
  • two matching rules are used for matching.
  • the control in the first control information is a picture and the number of pictures is one
  • the difference in the size ratio of the controls can be combined.
  • the matching rule whose value is within the preset difference value range or the matching rule whose color similarity is within the preset similarity range is determined from the two picture controls in the second control information to satisfy the control size ratio.
  • a matching rule within the difference range or a picture whose color similarity of the control matches the rule within a preset similarity range is set as a matching control.
  • the difference in the size ratio of the controls can be combined first. If the matching rule whose value is within the preset difference value range is matched, if in the second control information, more than one picture control that satisfies the matching rule of the same control type and the difference value of the control size ratio matching the rule within the preset difference value range at the same time , continue to perform matching in combination with the matching rules that the similarity of the color of the control is within the preset similarity range, and match the second control information that simultaneously satisfies the matching rule of the same control type and the difference between the size ratio of the control is within the preset difference range.
  • the picture of the matching rule whose similarity between the matching rule and the color of the control is within the preset similarity range is used as the matching control. If in the second control information, the matching rule of the same control type, the matching rule of the difference of the size ratio of the control within the preset difference range and the matching rule of the similarity of the color of the control within the preset similarity range are satisfied at the same time. If there is still more than one, you can choose an image as a matching control.
  • Step S103 according to the matched control, obtain the control element name of the matched control as the first application shared element name.
  • control element name refers to the name of an element that a control can share.
  • the shared element name refers to the name of the shared element (such as view) used by the two applications in the transition, and is an element attribute.
  • the shared element is an animation effect when one page jumps to another page, which is used to realize the sharing of one or more elements.
  • the control element name of the matched control of the second application can be obtained according to the XML of the matched control or the name attribute in the layout file, and the matching control of the second application can also be obtained according to the position or coordinates of the matched control of the second application.
  • the control element name of the control can be obtained according to the XML of the matched control or the name attribute in the layout file, and the matching control of the second application can also be obtained according to the position or coordinates of the matched control of the second application.
  • the control element name of the control can be obtained according to the XML of the matched control or the name attribute in the layout file, and the matching control of the second application can also
  • the name of the control element is used as the shared element name of the matched control of the first application, so that the shared element names of the second application and the first application are consistent, so that the attribute of the shared element name is used to specify a common element for the two shared elements. Name, so that subsequent transitions of the transition animation based on the shared element name can be implemented.
  • the shared element name may be written into the layout file when the first application is running, so that the shared elements in the two layout files corresponding to the first application and the second application are shared.
  • the element names are the same.
  • the control element name of the matched control in the second control information is used as the shared element name, thereby realizing the automatic determination of the shared element. Name, to avoid the cumbersome and inefficiency of artificially configuring shared element names.
  • a control is randomly selected from the multiple controls as the matching control, and the second control is selected as the matching control.
  • the control element name of the matched control in the control information is used as the shared element name, which realizes the automatic matching of the control, and then determines the shared element name.
  • the transition animation corresponding to two or more shared element names since the transition animation corresponding to two or more shared element names is executed, the transition animation during the application switching process may be sticky, causing user distraction and degrading user experience. Therefore, the number of shared element names can be limited to two to avoid sticky transition animations.
  • the first application is the desktop application and the second application is the calling application.
  • the application icon of the desktop application the application icon of the calling application can be matched to obtain the calling application.
  • the application icon element name is used as the shared element name of the application icon of the desktop application, and is written into the layout file when the desktop application is running, so that the shared element name of the desktop application is modified to be the same as the shared element name of the calling application. .
  • the name of the control element of the matched control of the first application can also be obtained, and the name of the control element is used as the name of the shared element of the second application, and written into the layout file when the second application is running,
  • the shared element names of the first application and the second application are consistent, so that a common name is specified for the shared elements in the two layout files by using the attribute of the shared element name, so that the transition of the transition animation can be realized based on the shared element name subsequently.
  • the first application at this time is the calling application
  • the second application is the desktop application
  • the control element name of the application icon of the calling application is obtained as the name of the application icon of the desktop application.
  • the shared element name is written into the layout file when the desktop application is running, so that the shared element name of the desktop application is modified to a shared element name that is consistent with the shared element name of the calling application.
  • the method further includes: if no control in the second control information matches the control in the first control information, comparing the first control information with the second control information
  • the name of the control element in the control information is modified to a preset name; in response to the read operation of the name of the control element in the first control information and the second control information; The name is determined as the shared element name.
  • control element name of the first control information and the control element name of the second control information can also be agreed as the shared element name, so that the corresponding transition animation can be executed according to the shared element name later, thereby avoiding In the case of failure to match, when switching from the first application to the second application, there is no transition animation connection, resulting in a blunt switching screen.
  • Step S104 Execute a corresponding transition animation according to the shared element name.
  • each shared element name is correspondingly configured with a transition animation, and when the shared element names are the same, the animation properties of the shared element corresponding to the shared element name are set.
  • the transition animation By calling the API of the system to execute the transition animation corresponding to the shared element name, the transition animation of switching from the first application to the second application is generated. Smooth transitions between interfaces improve the smoothness of transition animations.
  • animation properties of shared elements of different applications can also be set for different applications to improve the diversity of transition animations.
  • the step S103 further includes determining the position of the matched control; the step S104 may further include: according to the shared element name and the position of the matched control, Execute the corresponding transition animation.
  • a system function method can be called, such as the getLocationOnScreen() method provided in the Android system to determine the position of the matched control, and then, according to the position of the matched control, the transition animation corresponding to the shared element name is executed to achieve The interface of the first application is smoothly transitioned to the interface of the second application through the transition animation.
  • executing the transition animation corresponding to the shared element name according to the position of the matched control may be to use the position of the matched control as the starting position of the execution of the transition animation.
  • the corresponding transition animation may be an application
  • the icon moves from the starting position to another preset position, or the transition animation gradually enlarges from the starting position until the preset size (for example, it can be displayed in full screen, half screen or other sizes).
  • the position of the matched control may also be used as the end position of the transition animation, so as to realize different presentation effects of the transition animation.
  • the first application is a desktop application and the first control information includes an application icon
  • the obtained control element name of the matched control is used as a shared element of the first application
  • the name includes: obtaining a target application icon matching the application icon in the first control information from the second control information, and determining the control element name of the target application icon to share the element name.
  • the first control information includes at least an application icon
  • the second control information includes at least an application icon
  • the matched control is the second control
  • the application icon of the application that is, the target application icon.
  • the target application icon is used as the shared element
  • the control element name of the target application icon is used as the shared element name.
  • the position of the target application icon is determined from the second control information, and the transition animation corresponding to the shared element name is executed according to the position of the target application icon, so as to realize the smooth transition of the application icon of the desktop application to the second application.
  • FIG. 2 it shows a schematic diagram of the interface change process during application switching in a scenario.
  • the call icon slowly moves to the lower right corner of the call interface, and the call interface gradually appears. , which implements the transition animation of opening the calling application from the desktop application.
  • each icon of the desktop application namely the first application page 201
  • the call icon is moved to the lower right corner , which presents a transition animation of switching from the desktop application to the opening of the calling application (the page can present a certain transparency), that is, the transition animation page 202 .
  • the page of the calling application that is, the second application page 203, is presented, which realizes the smooth transition from the desktop application to the opening of the calling application, and improves the smoothness of the generated transition animation.
  • the control element name of the first application as the shared element name of the first application includes: obtaining a target picture and a target message matching the first control information from the second control information, and determining the control element name of the target picture.
  • the control element name of the target message is shared element name.
  • the performing the corresponding transition animation according to the shared element name includes: according to the shared element name, the position of the target picture in the notification bar, and the position of the target message in the notification bar position to perform the transition animation.
  • the first control information may include pictures and messages, and after matching the first control information and the second control information, the matching information can be determined.
  • the controls are pictures and messages of the second application, ie, target pictures and target messages.
  • the target picture and target message are used as shared elements, and the control element names of the target picture and target message are both used as shared element names.
  • the position of the target picture in the notification bar and the position of the target message in the notification bar are obtained from the second control information. Execute the control element name of the matching image at the position of the notification bar from the target image as the transition animation corresponding to the shared element name, and execute the control element name of the matching message from the target message at the position of the notification bar as the shared element name.
  • the transition animation realizes the smooth transition of the pictures and messages of the notification bar application to the second application.
  • the notification bar message that is, the first application page 301
  • the avatar icon of the second application is displayed.
  • the content of the message is moved from the position of the target message in the notification bar to the message window, the message in the notification bar disappears, and the transition animation of switching from the notification bar application to opening the WeChat message is presented (page A certain transparency can be presented), that is, the transition animation page 302 .
  • the page of the WeChat message application that is, the second application page 303, is presented, which realizes the smoothness of the transition from the notification bar application to the opening of the WeChat message, and improves the smoothness of the generated transition animation.
  • the method before performing the corresponding transition animation according to the shared element name, the method further includes: when the notification bar application sends a notification, passing the shared element name by calling an interface The corresponding transition animation.
  • the transition animation corresponding to the shared element name can be dynamically transmitted by calling an interface such as the setExtras() function.
  • the obtaining the control element name of the matched control is used as the share of the first application
  • the element name includes: acquiring target text matching the first control information from the second control information, and determining the control element name of the target text as a shared element name.
  • the target text is used as the shared element, and the control element name of the target text is used as the shared element name.
  • the position of the target text is obtained from the second control information, and the transition animation corresponding to the shared element name is executed from the position of the target text, so as to realize the smooth transition of the text of the negative one-screen application to the second application.
  • FIG. 4 it shows a schematic diagram of the interface change process during the application switching process in another scenario.
  • the temperature slowly moves to the position displayed by the text
  • the city name slowly moves to the position displayed by the text.
  • a negative one-screen page that is, the first application page 401.
  • an instruction to switch applications is received, such as clicking on the negative one-screen card, then each element in the weather application is moved to the corresponding position (for example, the temperature , city name, etc.
  • the transition animation page 402 (the page can present a certain transparency).
  • the page of the weather application ie the second application page 403, is presented. The smoothness of transition from negative one-screen application to open weather is realized, and the smoothness of the generated transition animation is improved.
  • the acquired control element name of the matched control is used as the first
  • the shared element name of the application includes: obtaining a matching picture matching the first control information from the second control information, and determining the control element name of the matching picture as a shared element name.
  • the first application is a file manager application and the control attribute of the first control information is a picture
  • the matched control is picture, i.e. matching picture.
  • the matching image is used as the shared element
  • the control element name of the matching image is used as the shared element name.
  • the position of the picture is matched from the second control information, and the transition animation corresponding to the shared element name is executed from the position of the matched picture, so as to realize the smooth transition of the picture of the file manager application to the second application.
  • FIG. 5 shows a schematic diagram of the interface change process during the application switching process in another scenario.
  • the user clicks on the file manager to open a second application (such as a gallery), and the photo of the file manager is slowly enlarged to the full screen, displaying The interface of previewing the picture from the gallery is realized, and the transition animation of opening the picture from the file manager application is realized.
  • a second application such as a gallery
  • FIG. 5 first, each icon of the file manager application, that is, the first application page 501, is presented.
  • FIG. 6 it is a schematic structural diagram of an electronic device 60 in an embodiment of the present application.
  • the electronic device 60 includes, but is not limited to, a processor 601 and a memory 602 .
  • the aforementioned devices may be connected through one or more communication buses 603 .
  • Memory 602 is used to store one or more computer programs 604 .
  • One or more computer programs 604 are configured to be executed by the processor 601 .
  • the one or more computer programs 604 include multiple instructions, and when the multiple instructions are executed by the processor 601, the method for generating a transition animation for application switching executed on the electronic device 60 in the foregoing embodiment can be implemented, In order to achieve smooth transition between different interfaces when switching between applications, improve the smoothness of transition animations.
  • This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned relevant method steps to realize the conversion of the application switching in the above-mentioned embodiment.
  • the animation generation method is also provided.
  • This embodiment also provides a computer program product, which when the computer program product runs on the computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the transition animation generation method for application switching in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the method for generating a transition animation for application switching in the foregoing method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined. Or it may be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a readable storage medium.
  • a readable storage medium including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
  • the aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disk, or optical disk.

Landscapes

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

Abstract

A method for generating a transition animation for application switching, and a related device. The method comprises: acquiring first control information of a first application and second control information of a second application when the first application is switched to the second application; determining a matched control from the second control information according to a control attribute in the first control information and a corresponding matching rule; according to the matched control, acquiring a control element name of the matched control to serve as a shared element name of the matched control of the first application; and executing a corresponding transition animation according to the shared element name. By means of the method, shared element names of different applications are determined, and transition animations corresponding to the shared element names are executed, such that a smooth transition between different interfaces is realized when switching is performed between the applications, and the fluency of the transition animations is improved.

Description

应用切换的转场动画生成方法及相关设备Application switching transition animation generation method and related equipment
本申请要求于2020年11月30日提交中国专利局、申请号为202011385063.5、发明名称为“应用切换的转场动画生成方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011385063.5 and the invention titled "Application Switching Transition Animation Generation Method and Related Equipment" filed with the China Patent Office on November 30, 2020, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种应用切换的转场动画生成方法及相关设备。The present application relates to the technical field of terminals, and in particular, to a method for generating transition animations for application switching and related devices.
背景技术Background technique
在智能终端执行多个应用程序时,会涉及在不同应用程序之间的页面切换。例如,由一个应用程序到另一个应用程序的跳转,如桌面上点击通话应用,则桌面会打开通话页面,通过向四周扩张的方式覆盖桌面的页面。When a smart terminal executes multiple applications, page switching between different applications will be involved. For example, when jumping from one application to another, such as clicking on the call application on the desktop, the desktop will open the call page and cover the page of the desktop by expanding around.
然而,从一个应用程序切换到另一个应用程序时,产生的转场动画效果单一,例如,逐渐淡出当前应用页面、逐渐淡入下一个应用页面等,会导致两个应用程序的页面之间的切换衔接较为生硬,难以实现不同应用之间切换的转场动画的流畅性。However, when switching from one application to another, the resulting transition animation effect is single, for example, gradually fading out the current application page, gradually fading in the next application page, etc., will lead to switching between the pages of the two applications The connection is relatively rigid, and it is difficult to achieve the smoothness of transition animations when switching between different applications.
发明内容SUMMARY OF THE INVENTION
鉴于以上内容,有必要提供一种应用切换的转场动画生成方法及相关设备,以实现应用间切换时,不同界面之间的平滑过渡,提高转场动画的流畅性。In view of the above content, it is necessary to provide a transition animation generation method and related equipment for application switching, so as to realize smooth transition between different interfaces when switching between applications, and improve the smoothness of the transition animation.
本申请第一方面公开了一种应用切换的转场动画生成方法,所述应用切换的转场动画生成方法包括:当第一应用切换至第二应用时,获取所述第一应用的第一控件信息和所述第二应用的第二控件信息;根据所述第一控件信息中的控件属性及对应的匹配规则,从所述第二控件信息中确定匹配的控件;获取所述匹配的控件的控件元素名作为所述第一应用共享元素名;根据所述共享元素名执行对应的转场动画。A first aspect of the present application discloses a method for generating a transition animation for application switching. The method for generating a transition animation for application switching includes: when a first application switches to a second application, obtaining a first control information and the second control information of the second application; according to the control attribute in the first control information and the corresponding matching rule, determine the matched control from the second control information; obtain the matched control The name of the control element is used as the name of the shared element of the first application; the corresponding transition animation is executed according to the name of the shared element.
本申请通过共享元素名对应的共享元素动画,实现了在应用间切换时,不同界面之间的转场动画平滑过渡,提高了转场动画的流畅性。By sharing the shared element animation corresponding to the element name, the present application realizes the smooth transition of the transition animation between different interfaces when switching between applications, and improves the smoothness of the transition animation.
在一些可选的实施方式中,所述方法还包括:确定所述匹配的控件的位置;所述根据所述共享元素名执行对应的转场动画包括:根据所述共享元素名以及所述匹配的控件的位置,执行对应的转场动画。In some optional implementation manners, the method further includes: determining the position of the matched control; performing the corresponding transition animation according to the shared element name includes: according to the shared element name and the matching The position of the control, execute the corresponding transition animation.
通过上述技术方案,实现了第一应用的界面通过转场动画平滑的过渡到第二应用的界面。Through the above technical solution, the interface of the first application is smoothly transitioned to the interface of the second application through the transition animation.
在一些可选的实施方式中,所述控件属性包括控件类型、控件尺寸比例或控件颜色中的一种或者多种,其中,与控件属性对应的匹配规则包括以下的一种或者多种:与所述控件类型对应的匹配规则为控件类型一致;与所述控件尺寸比例对应的匹配规则为控件尺寸比例的差值在预设差值范围内;与所述控件颜色对应的匹配规则为控件颜色的相似度在预设相似度范围内。In some optional implementation manners, the control properties include one or more of a control type, a control size ratio or a control color, wherein the matching rules corresponding to the control properties include one or more of the following: The matching rule corresponding to the control type is that the control type is consistent; the matching rule corresponding to the size ratio of the control is that the difference of the size ratio of the control is within the preset difference range; the matching rule corresponding to the color of the control is the color of the control The similarity is within the preset similarity range.
通过上述技术方案,利用与控件属性对应的匹配规则中一种或者多种从所述第二控件信 息中确定匹配的控件,实现了控件的自动匹配,进而确定共享元素名。Through the above technical solution, one or more of the matching rules corresponding to the attributes of the control are used to determine the matching control from the second control information, so as to realize the automatic matching of the control, and then determine the shared element name.
在一些可选的实施方式中,若所述第一应用为桌面应用且所述第一控件信息包括应用图标,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息中的应用图标匹配的目标应用图标,并确定所述目标应用图标的控件元素名为共享元素名。In some optional implementations, if the first application is a desktop application and the first control information includes an application icon, the acquiring the control element name of the matched control is used as a shared element of the first application The name includes: obtaining a target application icon matching the application icon in the first control information from the second control information, and determining the control element name of the target application icon to share the element name.
通过上述技术方案,根据所述共享元素名和所述目标应用图标的位置执行所述转场动画,实现了桌面应用的应用图标平滑过渡到第二应用上。Through the above technical solution, the transition animation is performed according to the shared element name and the position of the target application icon, so that the application icon of the desktop application is smoothly transitioned to the second application.
在一些可选的实施方式中,若所述第一应用为通知栏应用且所述第一控件信息包括图片和消息,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息匹配的目标图片和目标消息,并确定所述目标图片的控件元素名及所述目标消息的控件元素名为共享元素名。In some optional implementations, if the first application is a notification bar application and the first control information includes pictures and messages, the acquiring the control element name of the matched control is used as the first application's name. Sharing an element name includes: acquiring a target picture and a target message matching the first control information from the second control information, and determining the control element name of the target picture and the control element name of the target message to share element name.
在一些可选的实施方式中,所述根据所述共享元素名执行对应的转场动画包括:根据所述共享元素名、所述目标图片在通知栏的位置和所述目标消息在通知栏的位置执行所述转场动画。In some optional implementation manners, performing the corresponding transition animation according to the shared element name includes: according to the shared element name, the position of the target picture in the notification bar, and the position of the target message in the notification bar position to perform the transition animation.
通过上述技术方案,实现了通知栏应用的图片和消息平滑得过渡到第二应用上。Through the above technical solutions, the pictures and messages of the notification bar application are smoothly transitioned to the second application.
在一些可选的实施方式中,在所述根据所述共享元素名执行对应的转场动画之前,所述方法还包括:在所述通知栏应用发送通知时,通过调用接口的方式传递所述共享元素名对应的转场动画。In some optional implementation manners, before executing the corresponding transition animation according to the shared element name, the method further includes: when the notification bar application sends a notification, transferring the The transition animation corresponding to the shared element name.
通过上述技术方案,实现了动态传递通知栏应用中的通知消息共享元素名的转场动画。Through the above technical solution, the transition animation of dynamically transmitting the notification message sharing element name in the notification bar application is realized.
在一些可选的实施方式中,若所述第一控件信息的控件属性为文本,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息匹配的目标文本,并确定所述目标文本的控件元素名为共享元素名。In some optional implementation manners, if the control attribute of the first control information is text, the obtaining the control element name of the matched control as the shared element name of the first application includes: starting from the first application. The target text matching the first control information is obtained from the second control information, and the control element name of the target text is determined as a shared element name.
通过上述技术方案,根据所述共享元素名和所述目标文本的位置执行转场动画,实现了负一屏应用的文本平滑得过渡到第二应用上。Through the above technical solution, the transition animation is performed according to the shared element name and the position of the target text, so that the text of the negative one-screen application can be smoothly transitioned to the second application.
在一些可选的实施方式中,若所述第一控件信息的控件属性为图片,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息匹配的匹配图片,并确定所述匹配图片的控件元素名为共享元素名。In some optional implementation manners, if the control attribute of the first control information is a picture, the obtaining the control element name of the matched control as the shared element name of the first application includes: A matching picture that matches the first control information is obtained from the second control information, and the name of the control element of the matching picture is determined to be a shared element name.
通过上述技术方案,根据所述共享元素名和所述匹配图片的位置执行所述转场动画,实现了文件管理器应用的图片平滑得过渡到第二应用上。Through the above technical solution, the transition animation is executed according to the shared element name and the position of the matching picture, so that the picture of the file manager application can be smoothly transitioned to the second application.
在一些可选的实施方式中,所述获取所述第一应用的第一控件信息和所述第二应用的第二控件信息包括:获取所述第一应用的第一布局文件,从所述第一布局文件中提取出所述第一控件信息;获取所述第二应用的第二布局文件,从所述第二布局文件中提取出所述第二控件信息。In some optional implementation manners, the acquiring the first control information of the first application and the second control information of the second application includes: acquiring a first layout file of the first application, from the The first control information is extracted from the first layout file; the second layout file of the second application is acquired, and the second control information is extracted from the second layout file.
在一些可选的实施方式中,所述方法还包括:将所述共享元素名写入所述第一应用的第一布局文件中。In some optional implementation manners, the method further includes: writing the shared element name into a first layout file of the first application.
在一些可选的实施方式中,所述从所述第二控件信息中确定匹配的控件包括:若所述第二控件信息中的单个控件与所述第一控件信息中的控件匹配,确定所述单个控件为所述匹配的控件。通过上述技术方案,实现了自动确定共享元素名,避免了人为配置共享元素名的繁琐与低效率。In some optional implementations, the determining a matched control from the second control information includes: if a single control in the second control information matches a control in the first control information, determining the matched control The single control is the matched control. Through the above technical solution, the automatic determination of the shared element name is realized, and the tediousness and low efficiency of artificially configuring the shared element name are avoided.
在一些可选的实施方式中,所述从所述第二控件信息中确定匹配的控件包括:若所述第二控件信息中的多个控件与所述第一控件信息中的控件匹配,从所述多个控件中随机选取一个控件或两个控件作为所述匹配的控件。通过上述技术方案,避免了转场动画的粘性。In some optional implementation manners, the determining a matched control from the second control information includes: if a plurality of controls in the second control information matches a control in the first control information, from the second control information One or two controls are randomly selected from the plurality of controls as the matched controls. Through the above technical solution, the stickiness of the transition animation is avoided.
在一些可选的实施方式中,所述方法还包括:若所述第二控件信息中无控件与所述第一控件信息中的控件匹配,则将所述第一控件信息和所述第二控件信息中的控件元素名修改为预设的名称;响应于对所述第一控件信息和所述第二控件信息中的控件元素名的读取操作;将读取到的所述预设的名称确定为所述共享元素名。通过上述技术方案,避免了匹配失败的情况下,从第一应用切换至第二应用时,没有转场动画衔接导致切换画面生硬的问题。In some optional implementation manners, the method further includes: if no control in the second control information matches the control in the first control information, comparing the first control information with the second control information The name of the control element in the control information is modified to a preset name; in response to the read operation of the name of the control element in the first control information and the second control information; The name is determined as the shared element name. The above technical solution avoids the problem that in the case of a matching failure, when switching from the first application to the second application, there is no transition animation connection, resulting in a rigid switching screen.
本申请第二方面公开了一种电子设备,包括处理器和存储器;所述存储器,用于存储指令;所述处理器,用于调用所述存储器中的指令,使得所述电子设备执行所述的应用切换的转场动画生成方法。A second aspect of the present application discloses an electronic device, including a processor and a memory; the memory is used to store instructions; the processor is used to call the instructions in the memory, so that the electronic device executes the The transition animation generation method for application switching.
本申请第三方面公开了一种计算机可读存储介质,所述计算机可读存储介质存储有至少一个指令,所述至少一个指令被处理器执行时实现所述的应用切换的转场动画生成方法。A third aspect of the present application discloses a computer-readable storage medium, where the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, realizes the transition animation generation method for application switching. .
本申请第四方面公开了一种芯片,所述芯片与电子设备中的存储器耦合,控制所述电子设备执行所述的应用切换的转场动画生成方法。A fourth aspect of the present application discloses a chip, which is coupled to a memory in an electronic device, and controls the electronic device to execute the method for generating a transition animation for switching applications.
另外,第二至第四方面所带来的技术效果可参见上述方法部分各设计的方法相关的描述,此处不再赘述。In addition, for the technical effects brought about by the second to fourth aspects, reference may be made to the descriptions related to the methods designed in the above-mentioned method section, which will not be repeated here.
附图说明Description of drawings
图1是本申请实施例公开的一种应用切换的转场动画生成方法的流程图。FIG. 1 is a flowchart of a method for generating a transition animation for application switching disclosed in an embodiment of the present application.
图2是本申请实施例公开的一个场景中应用切换过程中的界面变化过程的示意图。FIG. 2 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed in an embodiment of the present application.
图3是本申请另一实施例公开的一个场景中应用切换过程中的界面变化过程的示意图。FIG. 3 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed by another embodiment of the present application.
图4是本申请又一实施例公开的一个场景中应用切换过程中的界面变化过程的示意图。FIG. 4 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed by another embodiment of the present application.
图5是本申请再一实施例公开的一个场景中应用切换过程中的界面变化过程的示意图。FIG. 5 is a schematic diagram of an interface change process during an application switching process in a scenario disclosed by yet another embodiment of the present application.
图6是本申请实施例提供的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, illustration or illustration. Any embodiments or designs described in the embodiments of the present application as "exemplary" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请中的技术领域的技术人员通常理解的含义相同。本申请的说明书中所使用的术语只是为了描述具体的实 施例的目的,不是旨在于限制本申请。应理解,本申请中除非另有说明,“/”表示或的意思。例如,A/B可以表示A或B。本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B三种情况。“至少一个”是指一个或者多个。“多个”是指两个或多于两个。例如,a、b或c中的至少一个,可以表示:a,b,c,a和b,a和c,b和c,a、b和c七种情况。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field in this application. The terms used in the specification of the present application are for the purpose of describing specific embodiments only, and are not intended to limit the present application. It should be understood that unless otherwise specified in this application, "/" means or means. For example, A/B can mean A or B. In this application, "and/or" is only an association relationship to describe associated objects, which means that there can be three kinds of relationships. For example, A and/or B can mean that A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Plural" means two or more. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.
参考图1所示,为本申请一实施例中应用切换的转场动画生成方法的流程图。所述方法应用在电子设备中,所述电子设备可以为手机、平板电能、个人数字助理、智能电视、阅读器、穿戴式装置等设备。具体地,所述应用切换的转场动画生成方法可包括如下步骤。Referring to FIG. 1 , it is a flowchart of a method for generating a transition animation of application switching in an embodiment of the present application. The method is applied in an electronic device, and the electronic device can be a mobile phone, a tablet battery, a personal digital assistant, a smart TV, a reader, a wearable device, and the like. Specifically, the method for generating a transition animation for application switching may include the following steps.
步骤S101,当从第一应用切换至第二应用时,获取所述第一应用的第一控件信息和所述第二应用的第二控件信息。Step S101, when switching from a first application to a second application, acquire first widget information of the first application and second widget information of the second application.
在本申请的一些实施例中,第一应用可以是电子设备上显示的当前应用,该第一应用可以是桌面应用、通知栏应用、负一屏应用或者文件管理器应用等。第二应用可以是需要使用或调用的被跳转的应用,可以包括购物应用程序、即时通信应用程序(例如微信、QQ、MSN Messenger),视频应用程序(例如华为视频、Instagram youtube等)、计算器,相机,通话,短信息等应用。第一控件信息是指构成第一应用页面的控件及控件属性信息。In some embodiments of the present application, the first application may be a current application displayed on the electronic device, and the first application may be a desktop application, a notification bar application, a negative one-screen application, or a file manager application, or the like. The second application may be a redirected application that needs to be used or called, and may include shopping applications, instant messaging applications (such as WeChat, QQ, MSN Messenger), video applications (such as Huawei Video, Instagram youtube, etc.), computing device, camera, call, SMS and other applications. The first control information refers to the control and control attribute information constituting the first application page.
具体地,第二应用可以从桌面启动器(Launcher)中启动或者从系统后台打开。在接收到从第一应用切换至第二应用的切换指令时,获取第二应用的应用程序组件,如Activity是Android组件中的一个基本组件,该应用程序组件提供一个界面,用户可以通过该界面进行交互以完成某项任务,如显示一些控件或者监听并处理用户的操作以做出响应。响应于从第一应用切换至第二应用的切换指令,获取第二应用的Activity名,如该应用程序组件名为com.huawei.phone/.MainActivity,然后对Activity的配置文件进行解析,得到第二应用的页面信息,至少包括构成第二应用页面的控件信息;并提取出应用程序组件中第二控件信息。及提取应用程序组件中的第二控件信息。第一控件信息可以是在第二控件信息获取之前,或,在第二控件信息获取之后,进行获取。Specifically, the second application can be started from a desktop launcher (Launcher) or opened from the background of the system. When receiving the switching instruction from the first application to the second application, the application component of the second application is obtained. For example, Activity is a basic component in the Android component, and the application component provides an interface through which the user can Interact to accomplish a task, such as displaying some controls or listening to and processing user actions in response. In response to the switching instruction from the first application to the second application, obtain the Activity name of the second application, for example, the application component name is com.huawei.phone/.MainActivity, and then parse the configuration file of the Activity to obtain the first The page information of the second application includes at least the control information constituting the second application page; and the second control information in the application program component is extracted. and extracting the second control information in the application component. The first widget information may be acquired before the second widget information is acquired, or after the second widget information is acquired.
在响应于从第一应用切换至第二应用的切换操作之前,电子设备的显示界面显示第一控件信息对应的页面布局,并监控用户是否执行触发第一应用切换至第二应用的切换操作。例如,可设置用户在位于第一应用界面的第二应用的应用图标上进行点击、双击或者滑动等切换操作,以触发从第一应用切换至第二应用的切换指令。Before responding to the switching operation from the first application to the second application, the display interface of the electronic device displays the page layout corresponding to the first control information, and monitors whether the user performs the switching operation that triggers the switching of the first application to the second application. For example, it may be configured that the user performs switching operations such as clicking, double-clicking, or sliding on the application icon of the second application located in the first application interface to trigger a switching instruction for switching from the first application to the second application.
作为一种可选的实施方式,所述获取所述第一应用的第一控件信息和所述第二应用的第二控件信息包括:As an optional implementation manner, the acquiring the first control information of the first application and the second control information of the second application includes:
获取第一应用的第一布局文件,从所述第一布局文件中提取出所述第一控件信息;obtaining a first layout file of a first application, and extracting the first control information from the first layout file;
获取第二应用的第二布局文件,从所述第二布局文件中提取出所述第二控件信息。A second layout file of the second application is acquired, and the second control information is extracted from the second layout file.
在该可选的实施方式中,可以通过Activity对象或者Context对象,根据第一应用的布局文件名获取到第一布局文件,然后从第一布局文件中提取第一控件信息;以及根据第二应用的布局文件名获取第二布局文件,然后从第二布局文件中提取第二控件信息。In this optional implementation manner, the first layout file can be obtained through the Activity object or the Context object according to the layout file name of the first application, and then the first control information can be extracted from the first layout file; and according to the second application The layout file name of the second layout file is obtained, and then the second control information is extracted from the second layout file.
步骤S102,根据所述第一控件信息中的控件属性及对应的匹配规则,从所述第二控件信息中确定匹配的控件。Step S102: Determine a matched control from the second control information according to the control attribute in the first control information and the corresponding matching rule.
其中,所述控件属性可以包括,但不限于:控件类型、控件尺寸比例(例如,控件宽高比)、控件颜色中的一种或者多种属性。与控件属性相应的匹配规则可以是控件类型一致、控件尺寸比例的差值在预设范围内、控件背景颜色或者主颜色相似度在预设范围内。例如,所述控件类型对应的匹配规则为控件类型一致的第一匹配规则,所述控件尺寸比例对应的匹配规则为控件尺寸比例的差值在预设差值范围内的第二匹配规则,所述控件颜色对应的匹配规则为控件颜色的相似度在预设相似度范围内的第三匹配规则。基于所述第一匹配规则、所述第二匹配规则和/或所述第三匹配规则,可以根据所述第一控件信息,查找与所述第一控件信息匹配的第二控件信息。The control properties may include, but are not limited to, one or more properties of a control type, a control size ratio (for example, a control aspect ratio), and a control color. The matching rule corresponding to the control property may be that the control type is consistent, the difference in the size ratio of the control is within a preset range, and the background color of the control or the similarity of the main color is within the preset range. For example, the matching rule corresponding to the control type is the first matching rule with the same control type, and the matching rule corresponding to the size ratio of the control is the second matching rule that the difference of the size ratio of the control is within the preset difference range, so The matching rule corresponding to the color of the control is the third matching rule that the similarity of the color of the control is within the preset similarity range. Based on the first matching rule, the second matching rule and/or the third matching rule, the second control information matching the first control information may be searched for according to the first control information.
在本申请的一个实施例中,第一应用中的元素有应用图标(icon)和一个应用名(appname),其中,应用图标对应第一控件信息中的图像视图(ImageView)控件,应用名对应第一控件信息中的文本框(TextView)控件。例如,若ImageView控件为正方形,对应的宽高比为1:1,TextView控件为长方形,对应的宽高比为2:3,也即控件尺寸比例。那么,可将第二控件信息中的控件类型为ImageView控件且控件尺寸比例为1:1的控件作为与第一应用的应用图标匹配的控件,将第二控件信息中的控件类型为TextView控件且控件尺寸比例为2:3的控件作为与第一应用的应用名匹配的控件。In an embodiment of the present application, the elements in the first application include an application icon (icon) and an application name (appname), wherein the application icon corresponds to an ImageView control in the first control information, and the application name corresponds to an image view (ImageView) control in the first control information. The text box (TextView) control in the first control information. For example, if the ImageView control is a square, the corresponding aspect ratio is 1:1, and the TextView control is a rectangle, and the corresponding aspect ratio is 2:3, that is, the control size ratio. Then, the control type in the second control information is ImageView control and the control size ratio is 1:1 as the control matching the application icon of the first application, and the control type in the second control information is TextView control and A control whose size ratio is 2:3 is used as a control matching the application name of the first application.
作为一种可选的实施方式,所述控件属性包括控件类型、控件尺寸比例或控件颜色中的一种或者多种,其中,与控件属性对应的匹配规则包括以下的一种或者多种;与控件类型对应的匹配规则为控件类型一致;与所述控件尺寸比例对应的匹配规则为控件尺寸比例的差值在预设差值范围内;与所述控件颜色对应的匹配规则为控件颜色的相似度在预设相似度范围内。As an optional implementation manner, the control properties include one or more of a control type, a control size ratio, or a control color, wherein the matching rules corresponding to the control properties include one or more of the following; and The matching rule corresponding to the control type is that the control type is consistent; the matching rule corresponding to the size ratio of the control is that the difference of the size ratio of the control is within the preset difference range; the matching rule corresponding to the color of the control is the similarity of the color of the control is within the preset similarity range.
在可选的实施方式中,可以利用一个匹配规则或者多个匹配规则对第一控件信息和第二控件信息进行匹配。若所述第二控件信息中的单个控件与所述第一控件信息中的控件匹配,确定所述单个控件为所述匹配的控件。例如,利用一个匹配规则进行匹配,当第一控件信息中的控件类型为图片且图片的数量为一个,如果第二控件信息中存在一个图片控件,则可以根据控件类型一致的匹配规则确定第二控件信息中的图片为匹配的控件。In an optional implementation manner, one matching rule or multiple matching rules may be used to match the first control information and the second control information. If the single control in the second control information matches the control in the first control information, it is determined that the single control is the matched control. For example, using a matching rule for matching, when the control type in the first control information is a picture and the number of pictures is one, if there is a picture control in the second control information, the second control type can be determined according to the matching rule with the same control type. The picture in the control information is the matched control.
又如,利用两个匹配规则进行匹配,当第一控件信息中的控件为图片且图片的数量为一个,如果第二控件信息中存在两个以上的图片控件,则可以结合控件尺寸比例的差值在预设差值范围内的匹配规则或者控件颜色的相似度在预设相似度范围内的匹配规则,从第二控件信息中的两个图片控件中确定满足控件尺寸比例的差值在预设差值范围内的匹配规则或者控件颜色的相似度在预设相似度范围内匹配规则的图片作为匹配的控件。For another example, two matching rules are used for matching. When the control in the first control information is a picture and the number of pictures is one, if there are more than two picture controls in the second control information, the difference in the size ratio of the controls can be combined. The matching rule whose value is within the preset difference value range or the matching rule whose color similarity is within the preset similarity range is determined from the two picture controls in the second control information to satisfy the control size ratio. A matching rule within the difference range or a picture whose color similarity of the control matches the rule within a preset similarity range is set as a matching control.
再如,利用三个匹配规则进行匹配,当第一控件信息中的控件为图片且图片的数量为一个,如果第二控件信息中存在两个以上的图片控件,可以先结合控件尺寸比例的差值在预设差值范围内的匹配规则进行匹配,若在第二控件信息中同时满足控件类型一致的匹配规则和控件尺寸比例的差值在预设差值范围内匹配规则的图片控件超过一个,继续结合控件颜色的相似度在预设相似度范围内的匹配规则进行匹配,将第二控件信息中同时满足控件类型一致的匹配规则、控件尺寸比例的差值在预设差值范围内的匹配规则和控件颜色的相似度在预设相似度范围内的匹配规则的图片作为匹配的控件。假如在第二控件信息中同时满足控件类型一致的匹配规则、控件尺寸比例的差值在预设差值范围内的匹配规则和控件颜色的相似度在预设相似度范围内的匹配规则的图片仍然超过一个,可以任选一个图片作为匹配的控件。For another example, using three matching rules for matching, when the control in the first control information is a picture and the number of pictures is one, if there are more than two picture controls in the second control information, the difference in the size ratio of the controls can be combined first. If the matching rule whose value is within the preset difference value range is matched, if in the second control information, more than one picture control that satisfies the matching rule of the same control type and the difference value of the control size ratio matching the rule within the preset difference value range at the same time , continue to perform matching in combination with the matching rules that the similarity of the color of the control is within the preset similarity range, and match the second control information that simultaneously satisfies the matching rule of the same control type and the difference between the size ratio of the control is within the preset difference range. The picture of the matching rule whose similarity between the matching rule and the color of the control is within the preset similarity range is used as the matching control. If in the second control information, the matching rule of the same control type, the matching rule of the difference of the size ratio of the control within the preset difference range and the matching rule of the similarity of the color of the control within the preset similarity range are satisfied at the same time. If there is still more than one, you can choose an image as a matching control.
此外,对于无法找到匹配控件的情况,下文会进一步进行说明。Additionally, for cases where no matching controls can be found, further explanations follow.
步骤S103,根据所述匹配的控件,获取所述匹配的控件的控件元素名作为所述第一应用共享元素名。Step S103, according to the matched control, obtain the control element name of the matched control as the first application shared element name.
其中,控件元素名是指一个控件可共享的元素的名称。共享元素名(transitionName)是指用于转场中两个应用的共享元素(如view)的名称,是一种元素属性。其中的共享元素是一个页面向另一个页面跳转时的一种动画效果,用于实现一个或多个元素进行共享。具体地,可以根据匹配的控件的XML或者布局文件中的名称属性获取第二应用的匹配的控件的控件元素名,也可以根据第二应用的匹配的控件的位置或者坐标获取第二应用的匹配的控件的控件元素名。然后,将控件元素名作为第一应用的匹配的控件的共享元素名,使得第二应用和第一应用的共享元素名一致,从而实现了利用共享元素名的属性为两个共享元素指定一个通用名称,以便后续基于该共享元素名实现转场动画的过渡。Among them, the control element name refers to the name of an element that a control can share. The shared element name (transitionName) refers to the name of the shared element (such as view) used by the two applications in the transition, and is an element attribute. The shared element is an animation effect when one page jumps to another page, which is used to realize the sharing of one or more elements. Specifically, the control element name of the matched control of the second application can be obtained according to the XML of the matched control or the name attribute in the layout file, and the matching control of the second application can also be obtained according to the position or coordinates of the matched control of the second application. The control element name of the control. Then, the name of the control element is used as the shared element name of the matched control of the first application, so that the shared element names of the second application and the first application are consistent, so that the attribute of the shared element name is used to specify a common element for the two shared elements. Name, so that subsequent transitions of the transition animation based on the shared element name can be implemented.
可选地,在本申请提供的实施例中,可将共享元素名写入所述第一应用运行时的布局文件中,使得第一应用与第二应用各自对应的两个布局文件中的共享元素名一致。Optionally, in the embodiment provided in this application, the shared element name may be written into the layout file when the first application is running, so that the shared elements in the two layout files corresponding to the first application and the second application are shared. The element names are the same.
在上述实施例中,若第二控件信息存在一个控件与第一控件信息中的控件匹配,将第二控件信息中的匹配的控件的控件元素名作为共享元素名,从而实现了自动确定共享元素名,避免了人为配置共享元素名的繁琐与低效率。In the above embodiment, if there is a control in the second control information that matches the control in the first control information, the control element name of the matched control in the second control information is used as the shared element name, thereby realizing the automatic determination of the shared element. Name, to avoid the cumbersome and inefficiency of artificially configuring shared element names.
如果第二控件信息中的多个控件与所述第一控件信息中的控件匹配,为了保证后续能够自动确定共享元素名,从多个控件中随机选取一个控件作为匹配的控件,将该第二控件信息中的匹配的控件的控件元素名作为共享元素名,实现了控件的自动匹配,进而确定共享元素名。If multiple controls in the second control information match the controls in the first control information, in order to ensure that the shared element name can be automatically determined later, a control is randomly selected from the multiple controls as the matching control, and the second control is selected as the matching control. The control element name of the matched control in the control information is used as the shared element name, which realizes the automatic matching of the control, and then determines the shared element name.
进一步地,在本申请的其它实施例中,在进行匹配的过程中,若所述第二控件信息中的多个控件与所述第一控件信息中的控件匹配,从所述多个控件中随机选取两个控件作为所述匹配的控件。若在所述第二控件信息中选取两个控件作为匹配的控件,即对应两个共享元素名,后续可执行两个共享元素名对应的转场动画。Further, in other embodiments of the present application, in the process of matching, if multiple controls in the second control information match the controls in the first control information, from the multiple controls Two controls are randomly selected as the matched controls. If two controls are selected as matching controls in the second control information, that is, corresponding to the two shared element names, the transition animation corresponding to the two shared element names can be executed subsequently.
此外,由于执行两个以上的共享元素名对应的转场动画,可能会使应用切换过程中的转场动画存在粘性,导致用户分心进而降低用户体验。因此,可将共享元素名的数量控制在两个以内,避免转场动画的粘性。In addition, since the transition animation corresponding to two or more shared element names is executed, the transition animation during the application switching process may be sticky, causing user distraction and degrading user experience. Therefore, the number of shared element names can be limited to two to avoid sticky transition animations.
例如,在从桌面应用中打开通话应用的场景中,此时的第一应用为桌面应用,第二应用为通话应用,可根据桌面应用的应用图标匹配到通话应用的应用图标,获取通话应用的应用图标元素名作为桌面应用的应用图标的共享元素名,写入到桌面应用运行时的布局文件中,从而使得桌面应用的共享元素名被修改为与通话应用的共享元素名一致的共享元素名。For example, in the scenario where the calling application is opened from the desktop application, the first application is the desktop application and the second application is the calling application. According to the application icon of the desktop application, the application icon of the calling application can be matched to obtain the calling application. The application icon element name is used as the shared element name of the application icon of the desktop application, and is written into the layout file when the desktop application is running, so that the shared element name of the desktop application is modified to be the same as the shared element name of the calling application. .
需要说明的是,本实施例中,还可以获取第一应用的匹配的控件的控件元素名,将控件元素名作为第二应用的共享元素名,写入第二应用运行时的布局文件中,使得第一应用和第二应用的共享元素名一致,实现了利用共享元素名的属性为两个布局文件中的共享元素指定一个通用名称,以便后续基于该共享元素名实现转场动画的过渡。示例性地,在关闭通话应用返回到桌面应用的场景中,此时的第一应用为通话应用,第二应用为桌面应用,获取通话应用的应用图标的控件元素名作为桌面应用的应用图标的共享元素名,写入到桌面应用运行时的布局文件中,从而使得桌面应用的共享元素名被修改为与通话应用的共享元素名一致的共享元素名。It should be noted that, in this embodiment, the name of the control element of the matched control of the first application can also be obtained, and the name of the control element is used as the name of the shared element of the second application, and written into the layout file when the second application is running, The shared element names of the first application and the second application are consistent, so that a common name is specified for the shared elements in the two layout files by using the attribute of the shared element name, so that the transition of the transition animation can be realized based on the shared element name subsequently. Exemplarily, in the scenario of closing the calling application and returning to the desktop application, the first application at this time is the calling application, and the second application is the desktop application, and the control element name of the application icon of the calling application is obtained as the name of the application icon of the desktop application. The shared element name is written into the layout file when the desktop application is running, so that the shared element name of the desktop application is modified to a shared element name that is consistent with the shared element name of the calling application.
作为一种可选的实施方式,所述方法还包括:若所述第二控件信息中无控件与所述第一控件信息中的控件匹配,则将所述第一控件信息和所述第二控件信息中的控件元素名修改为预设的名称;响应于对所述第一控件信息和所述第二控件信息中的控件元素名的读取操作;将读取到的所述预设的名称确定为所述共享元素名。As an optional implementation manner, the method further includes: if no control in the second control information matches the control in the first control information, comparing the first control information with the second control information The name of the control element in the control information is modified to a preset name; in response to the read operation of the name of the control element in the first control information and the second control information; The name is determined as the shared element name.
在该可选的实施方式中,还可以通过约定第一控件信息的控件元素名和第二控件信息的控件元素名,作为共享元素名,以便后续根据共享元素名执行对应的转场动画,从而避免匹配失败的情况下,从第一应用切换至第二应用时,没有转场动画衔接导致切换画面生硬的问题。In this optional embodiment, the control element name of the first control information and the control element name of the second control information can also be agreed as the shared element name, so that the corresponding transition animation can be executed according to the shared element name later, thereby avoiding In the case of failure to match, when switching from the first application to the second application, there is no transition animation connection, resulting in a blunt switching screen.
步骤S104,根据所述共享元素名执行对应的转场动画。Step S104: Execute a corresponding transition animation according to the shared element name.
在本申请的实施例中,每个共享元素名对应配置有转场动画,在共享元素名一致时,设置共享元素名对应的共享元素的动画属性。通过调用系统的API执行共享元素名对应的转场动画,生成了从第一应用切换至第二应用的转场动画,通过共享元素名对应的共享元素动画,实现了在应用间切换时,不同界面之间的平滑过渡,提高了转场动画的流畅性。In the embodiment of the present application, each shared element name is correspondingly configured with a transition animation, and when the shared element names are the same, the animation properties of the shared element corresponding to the shared element name are set. By calling the API of the system to execute the transition animation corresponding to the shared element name, the transition animation of switching from the first application to the second application is generated. Smooth transitions between interfaces improve the smoothness of transition animations.
进一步地,还可以对不同应用,设置不同应用的共享元素的动画属性,提高转场动画的多样性。Further, animation properties of shared elements of different applications can also be set for different applications to improve the diversity of transition animations.
在本申请的一些实施例中,所述步骤S103中,还进一步包括确定所述匹配的控件的位置;所述步骤S104可进一步包括:根据所述共享元素名以及所述匹配的控件的位置,执行对应的转场动画。In some embodiments of the present application, the step S103 further includes determining the position of the matched control; the step S104 may further include: according to the shared element name and the position of the matched control, Execute the corresponding transition animation.
例如,可以调用系统函数的方法,如Android系统中提供的getLocationOnScreen()方法确定所述匹配的控件的位置,然后,根据所述匹配的控件的位置,执行共享元素名对应的转场动画,实现了第一应用的界面通过转场动画平滑地过渡到第二应用的界面。具体地,根据所述匹配的控件的位置执行共享元素名对应的转场动画,可以是将所述匹配的控件的位置作为转场动画执行的起点位置,例如,对应的转场动画可以是应用图标从起点位置移动到另一个预设位置,也可以是转场动画从起点位置逐渐进行放大直到预设大小(例如,可以是满屏、半屏或其他尺寸进行显示)。此外,在其他的实施例中,也可以是将所述匹配的控件的位置作为转场动画执行的终点位置,以实现转场动画的不同呈现效果。作为一种可选的实施方式,若所述第一应用为桌面应用且所述第一控件信息包括应用图标,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息中的应用图标匹配的目标应用图标,并确定所述目标应用图标的控件元素名为共享元素名。For example, a system function method can be called, such as the getLocationOnScreen() method provided in the Android system to determine the position of the matched control, and then, according to the position of the matched control, the transition animation corresponding to the shared element name is executed to achieve The interface of the first application is smoothly transitioned to the interface of the second application through the transition animation. Specifically, executing the transition animation corresponding to the shared element name according to the position of the matched control may be to use the position of the matched control as the starting position of the execution of the transition animation. For example, the corresponding transition animation may be an application The icon moves from the starting position to another preset position, or the transition animation gradually enlarges from the starting position until the preset size (for example, it can be displayed in full screen, half screen or other sizes). In addition, in other embodiments, the position of the matched control may also be used as the end position of the transition animation, so as to realize different presentation effects of the transition animation. As an optional implementation manner, if the first application is a desktop application and the first control information includes an application icon, the obtained control element name of the matched control is used as a shared element of the first application The name includes: obtaining a target application icon matching the application icon in the first control information from the second control information, and determining the control element name of the target application icon to share the element name.
在该可选的实施方式中,若第一应用为桌面应用,则第一控件信息至少包括应用图标,通过对第一控件信息和第二控件信息进行匹配后,可以确定匹配的控件为第二应用的应用图标,即目标应用图标。将目标应用图标作为共享元素,目标应用图标的控件元素名作为共享元素名。接着,从第二控件信息中确定目标应用图标的位置,根据目标应用图标的位置执行共享元素名对应的转场动画,实现了桌面应用的应用图标平滑过渡到第二应用上。In this optional implementation manner, if the first application is a desktop application, the first control information includes at least an application icon, and after matching the first control information and the second control information, it can be determined that the matched control is the second control The application icon of the application, that is, the target application icon. The target application icon is used as the shared element, and the control element name of the target application icon is used as the shared element name. Next, the position of the target application icon is determined from the second control information, and the transition animation corresponding to the shared element name is executed according to the position of the target application icon, so as to realize the smooth transition of the application icon of the desktop application to the second application.
结合参考图2,其示出了一个场景中应用切换过程中的界面变化过程的示意图,用户点击桌面应用中的通话图标时,通话图标慢慢移动到通话界面的右下角位置,通话界面逐渐显现,实现了从桌面应用打开通话应用的转场动画。如图2所示,首先,呈现桌面应用的各个图标,即第一应用页面201,随后,当接收到对应用进行切换的指令时, 例如,打开通话应用,然后,通话图标移动到右下角位置,呈现了由桌面应用切换到打开通话应用的转场动画(页面可呈现一定的透明度),即转场动画页面202。最后,呈现了通话应用的页面,即第二应用页面203,实现了从桌面应用过渡到打开通话应用的平滑性,提高了生成的转场动画的流畅性。Referring to FIG. 2, it shows a schematic diagram of the interface change process during application switching in a scenario. When the user clicks the call icon in the desktop application, the call icon slowly moves to the lower right corner of the call interface, and the call interface gradually appears. , which implements the transition animation of opening the calling application from the desktop application. As shown in FIG. 2, first, each icon of the desktop application, namely the first application page 201, is presented, then, when an instruction to switch applications is received, for example, the call application is opened, and then the call icon is moved to the lower right corner , which presents a transition animation of switching from the desktop application to the opening of the calling application (the page can present a certain transparency), that is, the transition animation page 202 . Finally, the page of the calling application, that is, the second application page 203, is presented, which realizes the smooth transition from the desktop application to the opening of the calling application, and improves the smoothness of the generated transition animation.
作为一种可选的实施方式,若所述第一应用为通知栏应用,若所述第一应用为通知栏应用且所述第一控件信息包括图片和消息,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息匹配的目标图片和目标消息,并确定所述目标图片的控件元素名及所述目标消息的控件元素名为共享元素名。As an optional implementation manner, if the first application is a notification bar application, if the first application is a notification bar application and the first control information includes pictures and messages, the acquiring the matching control The control element name of the first application as the shared element name of the first application includes: obtaining a target picture and a target message matching the first control information from the second control information, and determining the control element name of the target picture. And the control element name of the target message is shared element name.
作为一种可选的实施方式,所述根据所述共享元素名执行对应的转场动画包括:根据所述共享元素名、所述目标图片在通知栏的位置和所述目标消息在通知栏的位置执行所述转场动画。As an optional implementation manner, the performing the corresponding transition animation according to the shared element name includes: according to the shared element name, the position of the target picture in the notification bar, and the position of the target message in the notification bar position to perform the transition animation.
在该可选的实施方式中,若所述第一应用为通知栏应用,则第一控件信息可包括图片和消息,通过对第一控件信息和第二控件信息进行匹配后,可以确定匹配的控件为第二应用的图片和消息,即目标图片和目标消息。将目标图片和目标消息作为共享元素,将目标图片和目标消息的控件元素名皆作为共享元素名。接着,从第二控件信息中获取目标图片在通知栏的位置和目标消息在通知栏的位置。从目标图片在通知栏的位置处执行匹配的图片的控件元素名作为共享元素名所对应的转场动画,从目标消息在通知栏的位置处执行匹配的消息的控件元素名作为共享元素名所对应的转场动画,实现了通知栏应用的图片和消息平滑得过渡到第二应用上。In this optional implementation manner, if the first application is a notification bar application, the first control information may include pictures and messages, and after matching the first control information and the second control information, the matching information can be determined. The controls are pictures and messages of the second application, ie, target pictures and target messages. The target picture and target message are used as shared elements, and the control element names of the target picture and target message are both used as shared element names. Next, the position of the target picture in the notification bar and the position of the target message in the notification bar are obtained from the second control information. Execute the control element name of the matching image at the position of the notification bar from the target image as the transition animation corresponding to the shared element name, and execute the control element name of the matching message from the target message at the position of the notification bar as the shared element name. The transition animation realizes the smooth transition of the pictures and messages of the notification bar application to the second application.
结合参考图3,其示出了另一个场景中应用切换过程中的界面变化过程的示意图,用户点击通知栏通知消息打开第二应用(如微信),微信的消息内容慢慢移动到消息窗口的位置,头像图标慢慢移动到头像的位置。如图3所示,首先,呈现通知栏消息,即第一应用页面301,当接收到对应用进行切换的指令时,例如点击通知栏的通知消息,然后,第二应用(微信)的头像图标由目标图片在通知栏的位置移动到头像位置,消息内容由目标消息在通知栏的位置移动到消息窗口,通知栏消息消失,呈现了由通知栏应用切换到打开微信消息的转场动画(页面可呈现一定的透明度),即转场动画页面302。最后,呈现了微信消息应用的页面,即第二应用页面303,实现了从通知栏应用过渡到打开微信消息的平滑性,提高了生成的转场动画的流畅性。3, which shows a schematic diagram of the interface change process in the application switching process in another scenario, the user clicks the notification bar notification message to open the second application (such as WeChat), and the message content of WeChat slowly moves to the message window. position, the avatar icon slowly moves to the position of the avatar. As shown in FIG. 3 , first, the notification bar message, that is, the first application page 301, is presented. When an instruction to switch applications is received, for example, click the notification message in the notification bar, and then the avatar icon of the second application (WeChat) is displayed. From the position of the target image in the notification bar to the position of the avatar, the content of the message is moved from the position of the target message in the notification bar to the message window, the message in the notification bar disappears, and the transition animation of switching from the notification bar application to opening the WeChat message is presented (page A certain transparency can be presented), that is, the transition animation page 302 . Finally, the page of the WeChat message application, that is, the second application page 303, is presented, which realizes the smoothness of the transition from the notification bar application to the opening of the WeChat message, and improves the smoothness of the generated transition animation.
作为一种可选的实施方式,在所述根据所述共享元素名执行对应的转场动画之前,还包括:在所述通知栏应用发送通知时,通过调用接口的方式传递所述共享元素名对应的转场动画。As an optional implementation manner, before performing the corresponding transition animation according to the shared element name, the method further includes: when the notification bar application sends a notification, passing the shared element name by calling an interface The corresponding transition animation.
在该可选的实施方式中,对于某些第一应用,例如通知栏应用,可以过调用接口如setExtras()函数,动态传递共享元素名对应的转场动画。In this optional implementation manner, for some first applications, such as notification bar applications, the transition animation corresponding to the shared element name can be dynamically transmitted by calling an interface such as the setExtras() function.
作为一种可选的实施方式,若所述第一应用为负一屏应用且所述第一控件信息包括文本,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息匹配的目标文本,并确定所述目标文本的控件元素名为共享元素名。As an optional implementation manner, if the first application is a negative one-screen application and the first control information includes text, the obtaining the control element name of the matched control is used as the share of the first application The element name includes: acquiring target text matching the first control information from the second control information, and determining the control element name of the target text as a shared element name.
在该可选的实施方式中,若第一应用为负一屏应用且第一控件信息的控件属性为文本,通过对第一控件信息和第二控件信息进行匹配后,可以确定匹配的控件为文本,即目标文本。 将目标文本作为共享元素,目标文本的控件元素名作为共享元素名。接着,从第二控件信息中获取目标文本的位置,从目标文本的位置处执行共享元素名对应的转场动画,实现了负一屏应用的文本平滑得过渡到第二应用上。In this optional embodiment, if the first application is a negative one-screen application and the control attribute of the first control information is text, after matching the first control information and the second control information, it can be determined that the matched control is text, the target text. The target text is used as the shared element, and the control element name of the target text is used as the shared element name. Next, the position of the target text is obtained from the second control information, and the transition animation corresponding to the shared element name is executed from the position of the target text, so as to realize the smooth transition of the text of the negative one-screen application to the second application.
结合参考图4,其示出了又一个场景中应用切换过程中的界面变化过程的示意图,用户点击负一屏卡片打开第二应用(例如天气应用),卡片中的各个元素逐渐过渡到天气应用中。如图4所示,温度慢慢移动到文本显示的位置,城市名称慢慢移动到文本显示的位置。首先,呈现负一屏页面,即第一应用页面401,当接收到对应用进行切换的指令时,例如点击负一屏卡片,然后,天气应用中的各个元素移动到对应位置上(例如,温度、城市名称等慢慢移动到目标文本的位置处),呈现了由负一屏卡片切换到打开天气应用的转场动画,即转场动画页面402(页面可呈现一定的透明度)。最后,呈现了天气应用的页面,即第二应用页面403。实现了从负一屏应用过渡到打开天气的平滑性,提高了生成的转场动画的流畅性。Referring to FIG. 4 , it shows a schematic diagram of the interface change process during the application switching process in another scenario. The user clicks on the negative one-screen card to open the second application (for example, the weather application), and each element in the card gradually transitions to the weather application. middle. As shown in Figure 4, the temperature slowly moves to the position displayed by the text, and the city name slowly moves to the position displayed by the text. First, a negative one-screen page, that is, the first application page 401, is presented. When an instruction to switch applications is received, such as clicking on the negative one-screen card, then each element in the weather application is moved to the corresponding position (for example, the temperature , city name, etc. slowly move to the position of the target text), showing the transition animation of switching from the negative one-screen card to opening the weather application, that is, the transition animation page 402 (the page can present a certain transparency). Finally, the page of the weather application, ie the second application page 403, is presented. The smoothness of transition from negative one-screen application to open weather is realized, and the smoothness of the generated transition animation is improved.
作为一种可选的实施方式,若所述第一应用为文件管理器应用且所述第一控件信息的控件属性为图片,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:从所述第二控件信息中获取与所述第一控件信息匹配的匹配图片,并确定所述匹配图片的控件元素名为共享元素名。As an optional implementation manner, if the first application is a file manager application and the control attribute of the first control information is a picture, the acquired control element name of the matched control is used as the first The shared element name of the application includes: obtaining a matching picture matching the first control information from the second control information, and determining the control element name of the matching picture as a shared element name.
在该可选的实施方式中,若第一应用为文件管理器应用且第一控件信息的控件属性为图片,通过对第一控件信息和第二控件信息进行匹配后,可以确定匹配的控件为图片,即匹配图片。将匹配图片作为共享元素,匹配图片的控件元素名作为共享元素名。接着,从第二控件信息中匹配图片的位置,从匹配图片位置处执行共享元素名对应的转场动画,实现了文件管理器应用的图片平滑得过渡到第二应用上。In this optional embodiment, if the first application is a file manager application and the control attribute of the first control information is a picture, after matching the first control information and the second control information, it can be determined that the matched control is picture, i.e. matching picture. The matching image is used as the shared element, and the control element name of the matching image is used as the shared element name. Next, the position of the picture is matched from the second control information, and the transition animation corresponding to the shared element name is executed from the position of the matched picture, so as to realize the smooth transition of the picture of the file manager application to the second application.
结合参考图5,其示出了再一个场景中应用切换过程中的界面变化过程的示意图,用户点击文件管理器打开第二应用(例如图库),文件管理器的照片慢慢放大到全屏,显示出图库预览图片的界面,实现了从文件管理器应用打开图片的转场动画。如图5所示,首先,呈现文件管理器应用的各个图标,即第一应用页面501,当接收到对应用进行切换的指令时,例如,点击文件管理器中表示图库的图片,然后,图片展示在电子设备的整个显示屏幕上,呈现了由文件管理器应用切换到打开图片的转场动画(页面有一定的透明度),即转场动画页面502(页面可呈现一定的透明度)。最后,呈现了图片页面,即第二应用页面503。实现了从文件管理器应用过渡到打开图片的平滑性,提高了生成的转场动画的流畅性。Referring to FIG. 5, it shows a schematic diagram of the interface change process during the application switching process in another scenario. The user clicks on the file manager to open a second application (such as a gallery), and the photo of the file manager is slowly enlarged to the full screen, displaying The interface of previewing the picture from the gallery is realized, and the transition animation of opening the picture from the file manager application is realized. As shown in FIG. 5 , first, each icon of the file manager application, that is, the first application page 501, is presented. When an instruction to switch applications is received, for example, click the picture representing the gallery in the file manager, and then the picture It is displayed on the entire display screen of the electronic device, and presents a transition animation (the page has a certain degree of transparency) that is switched to an open picture by the file manager application, that is, the transition animation page 502 (the page may have a certain degree of transparency). Finally, the picture page, that is, the second application page 503, is presented. Achieved smooth transition from file manager application to open image, and improved the smoothness of generated transition animation.
参考图6所示,为本申请实施例中电子设备60的结构示意图。电子设备60包括,但不限于:处理器601以及存储器602。上述各器件可以通过一个或多个通信总线603连接。存储器602用于存储一个或多个计算机程序604。一个或多个计算机程序604被配置为被所述处理器601执行。所述一个或多个计算机程序604包括多个指令,所述多个指令被所述处理器601执行时,可实现上述实施例中在电子设备60上执行的应用切换的转场动画生成方法,以实现应用间切换时,不同界面之间的平滑过渡,提高转场动画的流畅性。Referring to FIG. 6 , it is a schematic structural diagram of an electronic device 60 in an embodiment of the present application. The electronic device 60 includes, but is not limited to, a processor 601 and a memory 602 . The aforementioned devices may be connected through one or more communication buses 603 . Memory 602 is used to store one or more computer programs 604 . One or more computer programs 604 are configured to be executed by the processor 601 . The one or more computer programs 604 include multiple instructions, and when the multiple instructions are executed by the processor 601, the method for generating a transition animation for application switching executed on the electronic device 60 in the foregoing embodiment can be implemented, In order to achieve smooth transition between different interfaces when switching between applications, improve the smoothness of transition animations.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施 例中的应用切换的转场动画生成方法。This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned relevant method steps to realize the conversion of the application switching in the above-mentioned embodiment. The animation generation method.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的应用切换的转场动画生成法。This embodiment also provides a computer program product, which when the computer program product runs on the computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the transition animation generation method for application switching in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的应用切换的转场动画生成方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executed instructions stored in the memory, so that the chip executes the method for generating a transition animation for application switching in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined. Or it may be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program is During execution, it may include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disk, or optical disk.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limitations. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present application.

Claims (17)

  1. 一种应用切换的转场动画生成方法,其特征在于,所述方法包括:A transition animation generation method for application switching, characterized in that the method comprises:
    当第一应用切换至第二应用时,获取所述第一应用的第一控件信息和所述第二应用的第二控件信息;When the first application switches to the second application, acquiring first widget information of the first application and second widget information of the second application;
    根据所述第一控件信息中的控件属性及对应的匹配规则,从所述第二控件信息中确定匹配的控件;determining a matched control from the second control information according to the control attribute in the first control information and the corresponding matching rule;
    获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名;Obtain the control element name of the matched control as the shared element name of the first application;
    根据所述共享元素名执行对应的转场动画。A corresponding transition animation is executed according to the shared element name.
  2. 如权利要求1所述的应用切换的转场动画生成方法,其特征在于,所述方法还包括:The method for generating a transition animation for application switching according to claim 1, wherein the method further comprises:
    确定所述匹配的控件的位置;determining the location of the matched control;
    所述根据所述共享元素名执行对应的转场动画包括:The performing the corresponding transition animation according to the shared element name includes:
    根据所述共享元素名以及所述匹配的控件的位置,执行对应的转场动画。According to the shared element name and the position of the matched control, a corresponding transition animation is performed.
  3. 如权利要求1所述的应用切换的转场动画生成方法,其特征在于,所述控件属性包括控件类型、控件尺寸比例或控件颜色中的一种或者多种,其中,与控件属性对应的匹配规则包括以下的一种或者多种:The method for generating a transition animation for application switching according to claim 1, wherein the control properties include one or more of a control type, a control size ratio or a control color, wherein the matching corresponding to the control properties Rules include one or more of the following:
    与所述控件类型对应的匹配规则为控件类型一致;The matching rule corresponding to the control type is the same as the control type;
    与所述控件尺寸比例对应的匹配规则为控件尺寸比例的差值在预设差值范围内;The matching rule corresponding to the size ratio of the control is that the difference of the size ratio of the control is within the preset difference range;
    与所述控件颜色对应的匹配规则为控件颜色的相似度在预设相似度范围内。The matching rule corresponding to the color of the control is that the similarity of the color of the control is within a preset similarity range.
  4. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,若所述第一应用为桌面应用且所述第一控件信息包括应用图标,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein if the first application is a desktop application and the first control information includes an application icon, the obtaining the The control element name of the matched control as the shared element name of the first application includes:
    从所述第二控件信息中获取与所述第一控件信息中的应用图标匹配的目标应用图标,并确定所述目标应用图标的控件元素名为共享元素名。A target application icon matching the application icon in the first control information is obtained from the second control information, and the control element name of the target application icon is determined as a shared element name.
  5. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,若所述第一应用为通知栏应用且所述第一控件信息包括图片和消息,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein if the first application is a notification bar application and the first control information includes pictures and messages, the Obtaining the control element name of the matched control as the shared element name of the first application includes:
    从所述第二控件信息中获取与所述第一控件信息匹配的目标图片和目标消息,并确定所述目标图片的控件元素名及所述目标消息的控件元素名为共享元素名。The target picture and target message matching the first widget information are acquired from the second widget information, and the widget element name of the target image and the widget element name of the target message are determined as shared element names.
  6. 如权利要求5所述的应用切换的转场动画生成方法,其特征在于,所述根据所述共享元素名执行对应的转场动画包括:The method for generating a transition animation for application switching according to claim 5, wherein the executing the corresponding transition animation according to the shared element name comprises:
    根据所述共享元素名、所述目标图片在通知栏的位置和所述目标消息在通知栏的位置执行所述转场动画。The transition animation is performed according to the shared element name, the position of the target picture in the notification bar, and the position of the target message in the notification bar.
  7. 如权利要求5所述的应用切换的转场动画生成方法,其特征在于,在所述根据所述共享元素名执行对应的转场动画之前,所述方法还包括:The method for generating a transition animation for application switching according to claim 5, wherein before executing the corresponding transition animation according to the shared element name, the method further comprises:
    在所述通知栏应用发送通知时,通过调用接口的方式传递所述共享元素名对应的转场动画。When the notification bar application sends a notification, the transition animation corresponding to the shared element name is transmitted by calling an interface.
  8. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,若所 述第一控件信息的控件属性为文本,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein, if the control attribute of the first control information is text, the control element of the matched control is obtained. Name as the shared element name of the first application includes:
    从所述第二控件信息中获取与所述第一控件信息匹配的目标文本,并确定所述目标文本的控件元素名为共享元素名。The target text matching the first control information is acquired from the second control information, and the control element name of the target text is determined as a shared element name.
  9. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,若所述第一控件信息的控件属性为图片,所述获取所述匹配的控件的控件元素名作为所述第一应用的共享元素名包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein, if the control attribute of the first control information is a picture, the control element of the matched control is obtained. Name as the shared element name of the first application includes:
    从所述第二控件信息中获取与所述第一控件信息匹配的匹配图片,并确定所述匹配图片的控件元素名为共享元素名。A matching picture matching the first control information is obtained from the second control information, and the name of the control element of the matching picture is determined to be a shared element name.
  10. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,所述获取所述第一应用的第一控件信息和所述第二应用的第二控件信息包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein the acquiring first control information of the first application and second control information of the second application include:
    获取所述第一应用的第一布局文件,从所述第一布局文件中提取出所述第一控件信息;obtaining the first layout file of the first application, and extracting the first control information from the first layout file;
    获取所述第二应用的第二布局文件,从所述第二布局文件中提取出所述第二控件信息。A second layout file of the second application is acquired, and the second control information is extracted from the second layout file.
  11. 如权利要求10所述的应用切换的转场动画生成方法,其特征在于,所述方法还包括:The method for generating a transition animation for application switching according to claim 10, wherein the method further comprises:
    将所述共享元素名写入所述第一应用的第一布局文件中。Write the shared element name into the first layout file of the first application.
  12. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,所述从所述第二控件信息中确定匹配的控件包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein the determining a matched control from the second control information comprises:
    若所述第二控件信息中的单个控件与所述第一控件信息中的控件匹配,确定所述单个控件为所述匹配的控件。If the single control in the second control information matches the control in the first control information, it is determined that the single control is the matched control.
  13. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,所述从所述第二控件信息中确定匹配的控件包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein the determining a matched control from the second control information comprises:
    若所述第二控件信息中的多个控件与所述第一控件信息中的控件匹配,从所述多个控件中随机选取一个控件或两个控件作为所述匹配的控件。If the plurality of controls in the second control information matches the controls in the first control information, one or two controls are randomly selected from the plurality of controls as the matched controls.
  14. 如权利要求1至3中任一项所述的应用切换的转场动画生成方法,其特征在于,所述方法还包括:The method for generating a transition animation for application switching according to any one of claims 1 to 3, wherein the method further comprises:
    若所述第二控件信息中无控件与所述第一控件信息中的控件匹配,将所述第一控件信息和所述第二控件信息中的控件元素名修改为预设的名称;If no control in the second control information matches the control in the first control information, modify the control element names in the first control information and the second control information to a preset name;
    响应于对所述第一控件信息和所述第二控件信息中的控件元素名的读取操作;In response to the read operation of the control element name in the first control information and the second control information;
    将读取到的所述预设的名称确定为所述共享元素名。The read preset name is determined as the shared element name.
  15. 一种电子设备,其特征在于,所述电子设备包括存储器和处理器:An electronic device, characterized in that the electronic device comprises a memory and a processor:
    所述存储器,用于存储程序指令;the memory for storing program instructions;
    所述处理器,用于读取并执行所述存储器中存储的所述程序指令,当所述程序指令被所述处理器执行时,使得所述电子设备执行如权利要求1至权利要求14中任一项所述的应用切换的转场动画生成方法。The processor is configured to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device is made to perform as in claim 1 to claim 14 The method for generating a transition animation for application switching according to any one of the above.
  16. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有程序指令,当所述程序指令在电子设备上运行时,使得所述电子设备执行如权利要求1至权利要求14中任一项所述的应用切换的转场动画生成方法。A computer storage medium, characterized in that the computer storage medium stores program instructions, when the program instructions are executed on an electronic device, the electronic device is made to execute any one of claims 1 to 14 The described method for generating transition animation of application switching.
  17. 一种芯片,与电子设备中的存储器耦合,其特征在于,所述芯片用于控制所述电子设备执行如权利要求1至权利要求14中任一项所述的应用切换的转场动画生成方法。A chip, which is coupled to a memory in an electronic device, wherein the chip is used to control the electronic device to perform the transition animation generation method for application switching according to any one of claims 1 to 14 .
PCT/CN2021/134089 2020-11-30 2021-11-29 Method for generating transition animation for application switching, and related device WO2022111698A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011385063.5 2020-11-30
CN202011385063.5A CN114579221B (en) 2020-11-30 2020-11-30 Transition animation generation method for application switching and related equipment

Publications (1)

Publication Number Publication Date
WO2022111698A1 true WO2022111698A1 (en) 2022-06-02

Family

ID=81754050

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134089 WO2022111698A1 (en) 2020-11-30 2021-11-29 Method for generating transition animation for application switching, and related device

Country Status (2)

Country Link
CN (1) CN114579221B (en)
WO (1) WO2022111698A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118550617A (en) * 2023-02-27 2024-08-27 华为技术有限公司 Display method of electronic equipment, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8937620B1 (en) * 2011-04-07 2015-01-20 Google Inc. System and methods for generation and control of story animation
CN106775379A (en) * 2016-11-22 2017-05-31 腾讯音乐娱乐(深圳)有限公司 A kind of picture folds the implementation method and device of interactive animation
CN110209452A (en) * 2019-05-29 2019-09-06 维沃移动通信有限公司 The page display method and mobile terminal of mobile terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060259868A1 (en) * 2005-04-25 2006-11-16 Hirschberg Peter D Providing a user interface
CN109286984B (en) * 2018-09-21 2023-04-18 希诺麦田技术(深圳)有限公司 Multi-waveform ad hoc network transceiving method and device and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8937620B1 (en) * 2011-04-07 2015-01-20 Google Inc. System and methods for generation and control of story animation
CN106775379A (en) * 2016-11-22 2017-05-31 腾讯音乐娱乐(深圳)有限公司 A kind of picture folds the implementation method and device of interactive animation
CN110209452A (en) * 2019-05-29 2019-09-06 维沃移动通信有限公司 The page display method and mobile terminal of mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IFORESTS: "Animate ImageView between Two Activities Using Shared Element Transitions with ChangeImageTransform", WEBPAGE VOIDCC.COM, VOIDCC.COM, CN, 28 October 2014 (2014-10-28), CN, pages 1 - 2, XP055934240, Retrieved from the Internet <URL:http://cn.voidcc.com/question/p-wnrridxs-cv.html> [retrieved on 20220622] *
ROCKY Z.J.: "Animation Frameworks (4): Shared Element Transition and Scene Transition", WEBPAGE JIANSHU.COM, JIANSHU.COM, CN, 28 September 2017 (2017-09-28), CN, pages 1 - 6, XP055934224, Retrieved from the Internet <URL:https://www.jianshu.com/p/26f6b212540b> [retrieved on 20220622] *

Also Published As

Publication number Publication date
CN114579221B (en) 2024-07-30
CN114579221A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
US11789603B2 (en) File processing method, terminal, and storage medium
EP4087258A1 (en) Method and apparatus for displaying live broadcast data, and device and storage medium
CN106201171B (en) Split-screen display method and electronic equipment
CN107111496B (en) Customizable blade application
US10705671B2 (en) Information sharing method, terminal, and storage medium
US20160004425A1 (en) Method of displaying graphic user interface and electronic device implementing same
CN109618177A (en) Method for processing video frequency, device, electronic equipment and computer readable storage medium
CN110070496B (en) Method and device for generating image special effect and hardware device
US20100045567A1 (en) Systems and methods for facilitating presentation
US9495064B2 (en) Information processing method and electronic device
US20230325053A1 (en) Unread message display method, electronic device, and storage medium
US20200278823A1 (en) Screen sharing system, and information processing apparatus
CN112307375A (en) Page display method and device, electronic equipment and computer readable medium
US20230004673A1 (en) Information management system and method for communication application, and display terminal
WO2022111698A1 (en) Method for generating transition animation for application switching, and related device
EP3832460A1 (en) Method and apparatus for displaying application program, and terminal device
CN112015309B (en) Display switching method and device and mobile terminal
CN113419649A (en) Method for operating electronic device and device thereof
US20240114594A1 (en) Interaction control method and apparatus, terminal, and storage medium
CN113836455B (en) Special effect rendering method, device, equipment, storage medium and computer program product
WO2022127524A1 (en) Video conference presentation method and apparatus, and terminal device and storage medium
CN114968464A (en) Recent content display method, device, terminal and storage medium
CN115460448A (en) Media resource editing method and device, electronic equipment and storage medium
US11303595B2 (en) Method and device for displaying text and video in two threads
US11303464B2 (en) Associating content items with images captured of meeting content

Legal Events

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

Ref document number: 21897198

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21897198

Country of ref document: EP

Kind code of ref document: A1