WO2022268085A1 - 一种快速返回界面的方法及电子设备 - Google Patents

一种快速返回界面的方法及电子设备 Download PDF

Info

Publication number
WO2022268085A1
WO2022268085A1 PCT/CN2022/100212 CN2022100212W WO2022268085A1 WO 2022268085 A1 WO2022268085 A1 WO 2022268085A1 CN 2022100212 W CN2022100212 W CN 2022100212W WO 2022268085 A1 WO2022268085 A1 WO 2022268085A1
Authority
WO
WIPO (PCT)
Prior art keywords
activity
interface
user
user operation
stack
Prior art date
Application number
PCT/CN2022/100212
Other languages
English (en)
French (fr)
Inventor
沈泽洋
倪银堂
赵绍华
邓华昌
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to US18/573,896 priority Critical patent/US20240211280A1/en
Priority to EP22827578.0A priority patent/EP4350513A4/en
Publication of WO2022268085A1 publication Critical patent/WO2022268085A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2200/00Indexing scheme relating to G06F1/04 - G06F1/32
    • G06F2200/16Indexing scheme relating to G06F1/16 - G06F1/18
    • G06F2200/161Indexing scheme relating to constructional details of the monitor
    • G06F2200/1614Image rotation following screen orientation, e.g. switching from landscape to portrait mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas

Definitions

  • the present application relates to the technical field of electronic equipment, in particular to a method for quickly returning to an interface and electronic equipment.
  • An application can include multiple application activities (Activity).
  • Activity When the user is using the application, the application will generate multiple activities according to the user's operations, and the multiple activities will enter the stack in sequence according to the access sequence.
  • the number of activities in the stack is large, if the user wants to return to a previously opened interface (such as the main interface of the application), it is necessary to trigger the return key multiple times to return step by step, and the activities will also follow the reverse order of the access order. Popping the stack, the user operation is cumbersome. Alternatively, the user can directly exit the application and reopen the application, but the previous operation records will be lost, and the user may need to re-operate. The operation is cumbersome and violates normal perception, and the user experience is poor.
  • the embodiment of the present application discloses a method for quickly returning to an interface and an electronic device, which can quickly return to an interface that was opened before the upper-level interface, and the operation is simple and convenient.
  • an embodiment of the present application provides a method for quickly returning to an interface, which is applied to an electronic device, and the method includes: displaying a first interface of a first application program, the first interface is associated with a first activity, and the The first activity is the top activity of the first activity stack, and the first activity stack includes the first activity, the second activity and the third activity; receiving a first user operation; in response to the first user operation, popping At least two activities of the first activity stack display a second interface of the first application program, and the second interface is associated with the second activity; or, in response to the first user operation, pop up the At least two activities of the first activity stack are used to display a third interface of the second application program, and the third interface is associated with the third activity.
  • the electronic device can be applied to a first user operation to quickly return to an interface that was opened before the upper-level interface.
  • This interface can belong to the same application program as the currently displayed first interface, such as the first application
  • the user interface opened by the program for the first time may also belong to a different application program from the current display interface, such as the main interface of the second application program, which is simple and convenient for users to operate, and the return interface is diversified, and the interactive experience is more friendly.
  • the method before displaying the first interface of the first application, further includes: displaying the third interface of the second application; displaying the third interface of the first application In the second interface, the second activity is entered before the first activity enters the first activity stack, and the third activity is entered before the second activity enters the first activity stack of.
  • the method before receiving the first user operation, further includes: receiving a first number of second user operations, where the second user operations are used to return to the previous level of the current display interface Interface: popping up at least two activities of the first activity stack in response to the first user operation, comprising: when the first number of the second user operations and the first user operations satisfy the first When a preset condition is met, at least two activities of the first activity stack are popped up in response to the first user operation, and the preset condition is the difference between the first receiving moment and the receiving moment of the first user operation The value is less than or equal to a first duration, and the first receiving moment is the receiving moment of the second user operation received earliest among the first number of second user operations.
  • the electronic device may receive 3 consecutive return operations within 2 seconds (such as sliding inward from the left edge of the screen), and the electronic device may respond to the third return operation by popping up at least two activities of the first activity stack and displaying the previous one.
  • An interface opened before the level interface when multiple user operations (the first number of second user operations and one first user operation) are continuously received for a short period of time, it is possible to quickly return to an interface that was opened before the upper-level interface, such as the electronic
  • the device may receive 3 consecutive return operations within 2 seconds (such as sliding inward from the left edge of the screen), and the electronic device may respond to the third return operation by popping up at least two activities of the first activity stack and displaying the previous one.
  • An interface opened before the level interface when multiple user operations (the first number of second user operations and one first user operation) are continuously received for a short period of time, it is possible to quickly return to an interface that was opened before the upper-level interface, such as the electronic
  • the device may receive 3 consecutive return operations within 2 seconds (such as sliding inward
  • the method before receiving the first user operation, further includes: receiving a second number of second user operations, where the second user operations are used to return to the previous level of the current display interface interface; when the second quantity of the second user operations satisfies a second preset condition, the first control is displayed, and the second preset condition is that the difference between the second receiving moment and the third receiving moment is less than or is equal to the second duration, the second receiving moment is the receiving moment of the second user operation received earliest among the second number of second user operations, and the third receiving moment is the second number of second user operations
  • the receiving time of the second user operation received latest among the second user operations; the receiving the first user operation includes: receiving the first user operation acting on the first control.
  • the electronic device may display a first control, and the first control is used to indicate that the user performs a quick return operation.
  • the quick return operation is the first user operation acting on the first control.
  • the electronic device may pop up at least two activities of the first activity stack in response to the fast return operation, and display an interface opened before the upper level interface, that is, the user interface indicated by the first control.
  • the first control indicates the user interface through included text, and in other embodiments, the first control is an icon of an application program of the indicated user interface.
  • the receiving the first user operation includes: receiving the first user operation acting on the first area, the first area is different from the second area, and the second area is The area where the second user operation is applied, and the second user operation is used to return to the previous interface of the current display interface.
  • both the first area and the second area are located on the left side of the screen, and the second area is located on the upper side of the first area.
  • the first user operation and the second user operation have the same effective area and different operation directions, and the second user operation is used to return to the upper-level interface of the current display interface.
  • the second user operation is an operation of sliding inward from the left edge of the screen horizontally
  • the first user operation is an operation of sliding inward from the left edge of the screen and the sliding direction is diagonally upward.
  • the first interface includes a second control and a third control
  • the second control is used to indicate the first application program
  • the third control is used to indicate the second The application program
  • the second control is an icon of the first application program
  • the third control is an icon of the second application program
  • the method further includes: when the first interface is displayed, displaying the second control and the third control in response to a sliding operation acting on the first area. In some other embodiments, the method further includes: when the first interface is displayed, displaying the second control and the third control in response to a sliding operation acting on the first area and the sliding distance being a preset distance .
  • the first area is different from the second area, and the second area is an area on which a second user operation is performed, and the second user operation is used to return to a previous interface of the current display interface.
  • the popping up at least two activities of the first activity stack and displaying the second interface of the first application in response to the first user operation includes: responding to the first A type of first user operation, popping up at least two activities entered after the second activity in the first activity stack, and displaying the second interface; or, in response to the first user operation, popping up
  • the at least two activities of the first activity stack displaying the third interface of the second application program include: responding to the first user operation of the second type, popping up the third activity in the first activity stack and then entering at least two activities to display the third interface.
  • the action area of the first type of first user operation and the second type of first user operation are the same, and the operation directions are different.
  • the first type of first user operation is from the left side of the screen The edge slides inward and the sliding direction is diagonally upward
  • the second type of first user operation is an operation of sliding inward from the left edge of the screen and the sliding direction is diagonally downward.
  • the user can perform different types of first user operations based on the information prompted by the interface, so as to quickly return to different user interfaces, diversify usage scenarios, and provide better user experience.
  • the names of the first activity and the second activity include the name of the first application, and before the display of the second interface of the first application, the The method further includes: displaying a fourth interface of the second application, the fourth interface is associated with a fourth activity, the name of the fourth activity includes the name of the second application, and the fourth activity It is entered before the second activity enters the first activity stack and after the third activity enters the first activity stack; the displaying the second interface of the first application program includes : when switching from the fourth interface to the second interface, determining that the second activity is an activity associated with the displayed user interface in response to the first user operation acting on the second control; When the fourth interface is switched to the second interface, the top activity of the first activity stack changes from the fourth activity to the second activity, and the name of the fourth activity includes the name of the application program The name of the application included in the name of the second activity is different.
  • the fourth interface is displayed after the third interface, and is the last displayed interface in the user interface of the second application program, and the fourth interface of the second application program displayed on the electronic device jumps to display as the first interface.
  • the electronic device may record the first activity after the package name (ie, the name of the application program) is changed, that is, the second activity associated with the second interface of the first application program.
  • the recorded second activity may be the top activity of the first activity stack after executing the fast return method, that is, the electronic device may respond to the first user operation and pop up at least two activities entered after the second activity in the first activity stack. an activity to display the second interface.
  • the electronic device can quickly return to the user interface of the jumping first application program, and the first opened user interface conforms to the user's usage habits, and the user experience is better.
  • the displaying the second interface of the first application program includes: when switching from the fourth interface to the second interface, determining that the third activity is a response When acting on the first user operation of the third control, an activity associated with the displayed user interface, the third activity is the earliest activity among the activities whose name includes the name of the second application program. The activity of the first activity stack.
  • the fourth interface is displayed after the third interface, and is the last displayed interface in the user interface of the second application program, and the fourth interface of the second application program displayed on the electronic device jumps to display as the first interface.
  • the electronic device may record the first activity that enters the first activity stack before the package name is changed, that is, the third activity associated with the third interface of the second application program.
  • the recorded third activity may be the top activity of the first activity stack after executing the fast return method, that is, the electronic device may respond to the first user operation and pop up at least two activities entered after the third activity in the first activity stack. an activity to display the third interface.
  • the third interface is the main interface of the second application program.
  • the electronic device can quickly return to the main interface of the second application program, which conforms to the user's usage habits and provides a better user experience.
  • the method further includes: in response to a third user operation acting on the second control, displaying the first interface and the second interface in split screens; or, the method The method further includes: displaying the first interface and the third interface in split screens in response to a fourth user operation acting on the third control.
  • the electronic device in response to user operations, can split-screen display the first currently displayed interface and a user interface displayed before the upper-level interface, which is more flexible to use.
  • the popping up at least two activities of the first activity stack in response to the first user operation includes: popping up all activities after the fifth activity in response to the first user operation Enter at least two activities in the first activity stack before the first activity, the fifth activity is associated with the fifth interface, and the fifth interface is the second interface or the third interface; the first activity, and display the fifth interface.
  • the electronic device pops up at least two activities of the first activity stack
  • the activity between the top activity of the first activity stack that is, the first activity
  • the fifth activity of the target can be popped first.
  • the activity remains unchanged, and the displayed user interface also remains as the first interface, and then the first activity pops up.
  • the activity on the top of the stack is the fifth activity, and the electronic device displays the fifth interface. That is to say, the user interface visible to the user is directly returned from the first interface to the fifth interface, avoiding flickering, white screen, freeze, etc. caused by multiple switching of the displayed user interface when there are at least two pop-up activities. Problems, smooth performance, better user experience.
  • popping up at least two activities that enter the first activity stack after the fifth activity and before the first activity includes: responding to the The first user operation, respectively execute the destruction method on at least two activities that enter the first activity stack after the fifth activity and before the first activity, and enter after the fifth activity before the first activity
  • At least two activities in the first activity stack are in a destroyed state, the first activity is in a recovery state, and the fifth activity is in a stopped state
  • the first activity is popped up to display the fifth interface, It includes: executing a suspend method on the first activity, where the first activity is in a paused state; executing a start method and a restart method on the fifth activity, where the fifth activity is in a start state; executing the fifth activity
  • a resume method the fifth activity is in a resume state; a stop method is executed on the first activity, and the first activity is in a stop state; a destroy method is executed on the first activity, and the first activity is in a destroy state.
  • the electronic device only needs to execute the destruction method on at least two activities that enter the first activity stack after the fifth activity and before the first activity, instead of popping the top activity every time, displaying
  • execute the following multiple methods implement the pause method for the activity at the top of the stack, execute the start method, restart method, and restore method for the activities associated with the upper-level interface, and execute the stop method and destroy method for the activity at the top of the stack.
  • the amount of processing is greatly reduced and the power consumption of the device is reduced.
  • the method further includes: in response to a fifth user operation, enabling a first function; when the first function has different action areas of the first user operation, responding to the first function Different user interfaces are displayed for a user operation, or, when the first function is that the operation direction of the first user operation is different, the user interfaces displayed in response to the first user operation are different.
  • the user can choose the implementation method of the quick return function. For example, according to the usage habits, the user interface of the first user operation is different when the action area of the first user operation is different, or the operation direction of the first user operation can be selected according to the usage habits. At the same time, the user interface for quick return is different, and the use is more flexible.
  • the method before popping at least two activities of the first activity stack in response to the first user operation, the method further includes: determining the activities included in the first activity stack The number of is greater than or equal to the preset number threshold.
  • the method before popping at least two activities of the first activity stack in response to the first user operation, the method further includes: determining the activities included in the first activity stack
  • the application program of the associated user interface is a default application.
  • the method further includes: in response to a sixth user operation, determining the first application program and the second application program as preset applications.
  • the user can choose the preset application that applies the quick return function by himself, which is more flexible to use.
  • the embodiment of the present application provides another method for quickly returning to an interface, which is applied to an electronic device, and the method includes: displaying a first interface of a first application program, the first interface is associated with the first activity, and the The first activity is the top activity of the first activity stack, the first activity stack includes the first activity and the second activity; receiving a first user operation; in response to the first user operation, popping up the first activity At least two activities of an activity stack display a second interface of the first application program, and the second interface is associated with the second activity.
  • the electronic device can be applied to a first user operation to quickly return to an interface that was opened before the upper-level interface.
  • the user operation is simple and convenient, and the user experience is better.
  • the method before displaying the first interface of the first application program, the method further includes: displaying the second interface of the first application program, and the second activity is in the The first activity entered before entering the first activity stack.
  • the second activity is a bottom activity of the first activity stack.
  • the second interface is the main interface of the first application.
  • the electronic device can quickly return to the main interface of the first application program, which conforms to the user's usage habits and provides a better user experience.
  • the method before receiving the first user operation, further includes: receiving a first number of second user operations, where the second user operations are used to return to the previous level of the current display interface Interface: popping up at least two activities of the first activity stack in response to the first user operation, comprising: when the first number of the second user operations and the first user operations satisfy the first When a preset condition is met, at least two activities of the first activity stack are popped up in response to the first user operation, and the preset condition is the difference between the first receiving moment and the receiving moment of the first user operation The value is less than or equal to a first duration, and the first receiving moment is the receiving moment of the second user operation received earliest among the first number of second user operations.
  • the electronic device may receive 3 consecutive return operations within 2 seconds (such as sliding inward from the left edge of the screen), and the electronic device may respond to the third return operation by popping up at least two activities of the first activity stack and displaying the previous one.
  • An interface opened before the level interface when multiple user operations (the first number of second user operations and one first user operation) are continuously received for a short period of time, it is possible to quickly return to an interface that was opened before the upper-level interface, such as the electronic
  • the device may receive 3 consecutive return operations within 2 seconds (such as sliding inward from the left edge of the screen), and the electronic device may respond to the third return operation by popping up at least two activities of the first activity stack and displaying the previous one.
  • An interface opened before the level interface when multiple user operations (the first number of second user operations and one first user operation) are continuously received for a short period of time, it is possible to quickly return to an interface that was opened before the upper-level interface, such as the electronic
  • the device may receive 3 consecutive return operations within 2 seconds (such as sliding inward
  • the method before receiving the first user operation, further includes: receiving a second number of second user operations, where the second user operations are used to return to the previous level of the current display interface interface; when the second quantity of the second user operations satisfies a second preset condition, the first control is displayed, and the second preset condition is that the difference between the second receiving moment and the third receiving moment is less than or is equal to the second duration, the second receiving moment is the receiving moment of the second user operation received earliest among the second number of second user operations, and the third receiving moment is the second number of second user operations
  • the receiving time of the second user operation received latest among the second user operations; the receiving the first user operation includes: receiving the first user operation acting on the first control.
  • the electronic device may display a first control, and the first control is used to indicate that the user performs a quick return operation.
  • the quick return operation is the first user operation acting on the first control.
  • the electronic device may pop up at least two activities of the first activity stack in response to the quick return operation, and display an interface opened before the upper level interface, that is, the user interface indicated by the first control.
  • the first control indicates the user interface through included text, and in other embodiments, the first control is an icon of an application program of the indicated user interface.
  • the receiving the first user operation includes: receiving the first user operation acting on the first area, the first area is different from the second area, and the second area is The area where the second user operation is applied, and the second user operation is used to return to the previous interface of the current display interface.
  • both the first area and the second area are located on the left side of the screen, and the second area is located on the upper side of the first area.
  • the first user operation and the second user operation have the same effective area and different operation directions, and the second user operation is used to return to the upper-level interface of the current display interface.
  • the second user operation is an operation of sliding inward from the left edge of the screen horizontally
  • the first user operation is an operation of sliding inward from the left edge of the screen and the sliding direction is diagonally upward.
  • the first interface includes a second control, and the second control is used to indicate the first application program; in response to the first user operation, popping up the first
  • the at least two activities of the activity stack displaying the second interface of the first application program, include: popping up the first activity stack in the first activity stack in response to the first user operation acting on the second control For at least two activities entered after the second activity, the second interface is displayed.
  • the second control is an icon of the first application.
  • the method further includes: when the first interface is displayed, displaying the second control in response to a sliding operation acting on the first area. In some other embodiments, the method further includes: when the first interface is displayed, displaying part of the content of the second control in response to a sliding operation that acts on the first area and whose sliding distance is the first distance; A sliding operation that acts on the first area and whose sliding distance is a second distance displays all content of the second control, and the second distance is greater than the first distance.
  • the content displayed by the second control is more or less determined according to the sliding distance of the sliding operation.
  • the method further includes: when the first interface is displayed, displaying the second control in response to a sliding operation acting on the first area with a sliding distance of a preset distance.
  • the first area is different from the second area
  • the second area is an area affected by the second user operation
  • the second user operation is used to return to the upper-level interface of the current display interface.
  • the second interface includes a fourth control
  • the method further includes: in response to a seventh user operation acting on the fourth control, determining that the second interface is The user interface displayed when the first user operates, the first activity stack further includes at least one activity entered before the second activity.
  • the first control is a newly added control on the second interface, and in other embodiments, the first control is an existing control in the first application program.
  • the user can select the browsed user interface as the user interface displayed in response to the operation of the first user, and the operation is more flexible.
  • the method further includes: in response to an eighth user operation, displaying the first interface and the second interface in split screens.
  • the electronic device in response to user operations, can split-screen display the first currently displayed interface and a user interface displayed before the upper-level interface, which is more flexible to use.
  • the popping up at least two activities of the first activity stack and displaying the second interface of the first application in response to the first user operation includes: responding to the The first user operation pops up at least two activities that enter the first activity stack after the second activity and before the first activity; pops up the first activity to display the second interface.
  • the electronic device pops up at least two activities of the first activity stack
  • the activity between the top activity of the first activity stack that is, the first activity
  • the second activity of the target can be popped first.
  • the activity remains unchanged, and the displayed user interface also remains as the first interface, and then the first activity pops up, at this time, the activity on the top of the stack is the second activity, and the electronic device displays the second interface. That is to say, the user interface visible to the user returns directly from the first interface to the second interface, avoiding flickering, white screen, freeze, etc. caused by multiple switching of the displayed user interface when there are at least two pop-up activities Problems, smooth performance, better user experience.
  • popping up at least two activities that enter the first activity stack after the second activity and before the first activity include: responding After the first user operation, respectively execute the destruction method on at least two activities that enter the first activity stack after the second activity and before the first activity, and the first activity after the second activity At least two activities that entered the first activity stack before are in a destroyed state, the first activity is in a recovery state, and the second activity is in a stopped state; the pop-up of the first activity displays the second
  • the interface includes: executing a suspend method on the first activity, the first activity is in a suspended state; executing a start method and a restart method on the second activity, and the second activity is in a start state;
  • the activity executes the restore method, the second activity is in the resume state;
  • the stop method is executed on the first activity, the first activity is in the stop state;
  • the destroy method is executed on the first activity, and the first activity is in the destroy state state.
  • the electronic device only needs to execute the destruction method on at least two activities that enter the first activity stack after the second activity and before the first activity, instead of popping the top activity every time, displaying
  • execute the following multiple methods implement the pause method for the activity at the top of the stack, execute the start method, restart method, and restore method for the activities associated with the upper-level interface, and execute the stop method and destroy method for the activity at the top of the stack.
  • the amount of processing is greatly reduced and the power consumption of the device is reduced.
  • the method further includes: in response to a fifth user operation, enabling a first function; when the first function has different action areas of the first user operation, responding to the first function Different user interfaces are displayed for a user operation, or, when the first function is that the operation direction of the first user operation is different, the user interfaces displayed in response to the first user operation are different.
  • the user can choose the implementation method of the quick return function. For example, according to the usage habits, the user interface of the first user operation is different when the action area of the first user operation is different, or the operation direction of the first user operation can be selected according to the usage habits. At the same time, the user interface for quick return is different, and the use is more flexible.
  • the method before popping up at least two activities of the first activity stack in response to the first user operation and displaying the second interface of the first application program, the method further The method includes: determining that the number of activities included in the first activity stack is greater than or equal to a preset number threshold.
  • the method before popping up at least two activities of the first activity stack in response to the first user operation and displaying the second interface of the first application program, the method further The method includes: determining that an application program of a user interface associated with an activity included in the first activity stack is a preset application.
  • the method further includes: the method further includes: in response to a ninth user operation, determining that the first application program is a preset application.
  • the user can choose the preset application that applies the quick return function by himself, which is more flexible to use.
  • an embodiment of the present application provides an electronic device, including a transceiver, a processor, and a memory, the memory is used to store a computer program, and the processor invokes the computer program to execute the first aspect of the embodiment of the application to the second aspect, and the method for quickly returning to the interface provided by any implementation manner from the first aspect to the second aspect.
  • the embodiment of the present application provides a computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by a processor, the first aspect to the second aspect of the embodiment of the present application, and the first A method for quickly returning to the interface provided by any implementation manner from the aspect to the second aspect.
  • the embodiment of the present application provides a computer program product, which, when the computer program product is run on the electronic device, causes the electronic device to execute the first aspect to the second aspect, and the first aspect to the second aspect of the embodiment of the present application.
  • the method for quickly returning to the interface provided by any implementation of the second aspect.
  • the embodiments of the present application provide an electronic device, where the electronic device includes executing the method or apparatus introduced in any embodiment of the present application.
  • the aforementioned electronic device is, for example, a chip.
  • Fig. 1 is a schematic diagram of stacking and unstacking of an activity Activity provided by the embodiment of the present application;
  • FIG. 2A is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
  • FIG. 2B is a schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application.
  • FIGS 3-25 are schematic diagrams of some user interface embodiments provided by the embodiments of the present application.
  • Fig. 26 is a schematic flowchart of some methods for quickly returning to the interface provided by the embodiment of the present application.
  • Figure 27- Figure 28 is a schematic diagram of popping some activities provided by the embodiment of the present application.
  • FIG. 29 exemplarily shows a schematic diagram of an Activity life cycle.
  • the embodiment of the present application provides a method for quickly returning to an interface, which is applied to an electronic device.
  • the electronic device can pop multiple activities in the activity task stack (referred to as the activity stack) (Activity Stack) to perform the operation of returning to multiple user interfaces, that is, to achieve the effect of quickly returning to the interface , to prevent the user from repeatedly performing the return operation, making the operation more convenient and improving the user experience.
  • Activity stack activity task stack
  • the return operation is, for example but not limited to: the operation acting on the built-in return key of the application, the operation acting on the return key in the three-key navigation, the return operation in the gesture navigation (such as from the left or right edge of the screen Swipe inwards), speech (like making a sound: "Back"), gestures (like spreading your fingers and swiping from left to right).
  • the above return key may be a virtual key or a physical key.
  • an electronic device may run at least one application, and one application may include at least one application program activity.
  • an application program activity may correspond to a user interface.
  • this embodiment of the present application simply refers to an application program activity as an activity, or an application activity.
  • the application activity may be an activity in the Android system, or an application activity in other operating systems such as IOS, which is not limited in this application.
  • the application program activity is an Activity in the Android system as an example for illustration.
  • Activity is an interface for interaction between users and application programs in the Android system.
  • Activity is where the application draws the interface. Activities usually fill the screen, but can also be smaller than the screen and float on top of other activities.
  • An Activity is something that users can interact with intuitively, and can be represented as a user interface. It can be understood that an Activity corresponds to a user interface.
  • An application can contain multiple user interfaces, and it can also be understood that an application can contain multiple activities. When operating an application, it is occasionally necessary to call multiple Activities to fulfill the requirements.
  • Each Activity can start another Activity to perform different operations. For example, after starting an email application, the user can first enter the application's main interface, and the activity corresponding to the main interface can start other activities to provide a user interface for performing tasks such as writing and opening emails.
  • the Andord system can use the stack to manage the Activity, which can be called the Activity Stack (Activity Stack), or Task, which is convenient for linearly recording Activity examples.
  • Task is actually a dynamic array (array list) in the Android open source project.
  • the characteristics of the stack are push (also called entry) and pop, and the principle of first in last out is adopted, that is, the activity that is pushed into the stack first (also called into the stack) pops out of the stack before the activity that is pushed into the stack later.
  • a Task can include at least one Activity.
  • the multiple activities in a task can be activities included in the same application, or activities included in different applications.
  • the first activity that is pushed into a task and the last that pops up a task can be understood as the activity at the bottom of the task, which can be called the root activity, and the activity that is the last to be pushed into a task and the first to pop up a task can be understood as The activity at the top of the task can be called the top activity.
  • the root Activity usually corresponds to the main interface of the application.
  • the top activity is usually the activity that is running and the user is interacting with. It can also be called the foreground activity.
  • the user interface corresponding to the foreground activity is visible to the user.
  • Task can also be called a rollback stack (back stack).
  • back stack A specific example is shown in Figure 1 below.
  • FIG. 1 exemplarily shows a schematic diagram of an Activity being pushed into a stack and popped out of a stack.
  • the user may open the first interface corresponding to Activity1 based on the electronic device. For example, when the user clicks an application icon on the desktop of the electronic device, the electronic device displays the main interface of the application corresponding to the application icon. At this point, Activity1 is pushed into the rollback stack and becomes the top Activity of the rollback stack. The first interface is visible and interactive to the user, and Activity1 is the foreground activity. The user may continue to open the second interface corresponding to Activity2 based on the electronic device. For example, when the user clicks on the category option on the main interface, the electronic device displays the application interface corresponding to the category option. At this point, Activity2 is pushed into the rollback stack and becomes the top Activity of the rollback stack. Users of the first interface cannot interact, users of the second interface are visible and interactive, and Activity2 is the foreground activity.
  • the user may perform a return operation based on the electronic device. For example, when the user clicks a virtual return key on the second interface, the electronic device returns to display the first interface. At this point, Activity2 is popped out of the rollback stack, and Activity1 becomes the top Activity of the rollback stack again. The first interface becomes visible and interactive to the user again, and Activity1 becomes the foreground activity again.
  • the electronic devices involved in the embodiments of the present application may be user terminal devices such as mobile phones, tablet computers, handheld computers, personal digital assistants (Personal Digital Assistant, PDA), smart home devices such as smart TVs and smart cameras, smart bracelets, smart watches, etc. , smart glasses and other wearable devices, or other desktops, laptops, notebooks, ultra-mobile personal computers (Ultra-mobile Personal Computer, UMPC), netbooks, smart screens and other devices.
  • PDA Personal Digital Assistant
  • smart home devices such as smart TVs and smart cameras, smart bracelets, smart watches, etc.
  • smart glasses and other wearable devices or other desktops, laptops, notebooks, ultra-mobile personal computers (Ultra-mobile Personal Computer, UMPC), netbooks, smart screens and other devices.
  • FIG. 2A schematically shows a schematic diagram of a hardware structure of the electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the touch sensor 180K is also called “touch device”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • a software system with a layered architecture may be an Android system or an HMS system.
  • the embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal.
  • FIG. 2B is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package may include applications such as camera, gallery, music, browser, email, shopping application, video application, social networking application, and information.
  • applications such as camera, gallery, music, browser, email, shopping application, video application, social networking application, and information.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • the application framework layer can also include an activity manager service (AMS).
  • AMS is a system service of the Android system, which is used to control the reasonable scheduling and operation of different applications in the system.
  • the main responsibilities of AMS include uniformly scheduling the activities of each application, managing the process of the application, managing memory, scheduling tasks, querying the current running status of the system, and so on.
  • AMS can also be used to implement the method of quickly returning to the interface provided by this application, for example, execute the processes shown in Figure 26- Figure 28 below.
  • the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the display screen 194 displays the main interface of the shopping application
  • the pressure sensor 180A and/or the touch sensor 180K receive an operation of sliding inward from the left edge of the screen (ie, the return operation of gesture navigation)
  • the corresponding hardware interrupt is sent to the kernel layer .
  • the kernel layer processes the sliding operation into an original input event (including sliding track, sliding coordinates, time stamp and other information).
  • Raw input events are stored at the kernel level.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event.
  • the shopping application can call the interface of the application framework layer, and then display the desktop of the electronic device 100 through the display screen 194 by calling the display driver of the kernel layer.
  • FIG. 3 exemplarily shows a schematic diagram of a user interface.
  • the electronic device may display a user interface 200, and the user interface 200 may be a desktop of the electronic device.
  • User interface 200 may include application icons 220, which may include, for example, video application 220A, shopping application 220B, social application 220C, gallery 220D, browser 220E, music 220F, email 220G, phone 220H, messaging 220I, and camera. 220J, etc., may also include icons of other applications, which is not limited in this application.
  • the electronic device may respond to a user operation (such as a touch operation) on an icon of any application, start the application corresponding to the icon, and display the main interface of the application corresponding to the icon.
  • the electronic device may receive a user operation (such as a touch operation) acting on the shopping application 220B, and in response to the user operation, start the shopping application, and display the information shown in (A) of FIG. 4 .
  • the user interface 300 shown.
  • FIG. 4 exemplarily shows a schematic diagram of a user interface for interface jumping.
  • the electronic device may display a user interface 300 .
  • User interface 300 may include a search bar 310, shopping options icons 320, and page options 330, wherein:
  • the search bar 310 can be used to search for items that the user wants to view in the shopping application.
  • the search bar 310 may include an input box 310A and a search control 310B.
  • the input box 310A may be used for the user to input the product name to be viewed. Find the product name entered by the user in the product, and display the corresponding search result. For example, when the content entered in the input box 310A is "pants", the electronic device may display the products whose product information includes "pants" on the shopping application, such as displaying the user interface 420 shown in (C) of FIG. 4 below.
  • the shopping option icon 320 may include, for example, summer clothing 320A, fresh fruit 320B, travel service 320C, life service 320D, electrical product 320E, medicine and health care 320F, etc., which is not limited in this application.
  • the electronic device may display a user interface of a shopping option corresponding to the icon in response to a user operation (such as a touch operation) on an icon of any shopping option.
  • Page options 330 may include, for example, home page options 330A, category options 330B, shopping cart options 330C, and my options 330D, etc., which are not limited in this application.
  • the homepage option 330A in the user interface 300 is selected, which means that the user interface 300 is the homepage of the shopping application, that is, the main interface of the shopping application.
  • the electronic device may display a shopping interface of the option corresponding to the icon.
  • the electronic device may receive a user operation (such as a touch operation) acting on summer clothing 320A, and in response to the user operation, display a shopping interface corresponding to "summer clothing", For example, the user interface 410 shown in (B) of FIG. 4 .
  • the electronic device may display a user interface 410 .
  • User interface 410 may include a back key 411, a page theme 412 (ie, "Summer Clothing"), a shopping options icon 413, and page options 414, wherein:
  • the return key 411 can be used to return to the previous interface of the current interface.
  • the electronic device may receive a user operation (such as a touch operation) acting on the return key 411 , and in response to the user operation, display an upper-level interface of the user interface 410 .
  • Shopping option icons 413 may include, for example, tops 413A, trousers 413B, skirts 413C, cosmetics 413D, shoes 413E, bags 413F, etc., which are not limited in this application.
  • the electronic device may display a user interface of the shopping option corresponding to the icon in response to a user operation (for example, a touch operation) on the icon of any option.
  • the page options 414 may include, for example, a home page option 414A, a classification option 414B, and an activity option 414C, etc., which are not limited in this application.
  • the classification option 414B in the user interface 410 is selected, indicating that the user interface 410 is a classification interface for summer clothing.
  • the electronic device may display a shopping interface of the option corresponding to the icon.
  • the electronic device may receive a user operation (such as a touch operation) acting on the pants 413B, and in response to the user operation, display a shopping interface corresponding to "pants", For example, the user interface 420 shown in (C) of FIG. 4 .
  • a user operation such as a touch operation
  • the electronic device may display a user interface 420 .
  • the user interface 420 may include a return key 421 , a search bar 422 and a product list 423 , wherein: the return key 421 is similar to the return key 411 shown in the user interface 410 , and will not be repeated here.
  • the search bar 422 can be used to search for items that the user wants to view in the shopping application. “Trousers” has been entered in the search bar 422 in the user interface 420 , which means that the user interface 420 includes a product list on the shopping application whose product information includes “pants”, that is, the product list 423 .
  • Commodity list 423 may include information of a plurality of commodities, for example commodity names: trousers A (not shown), trousers B (not shown), trousers C (not shown), trousers D (not shown) , trousers E, trousers F, trousers G, trousers H.
  • the electronic device may receive a user operation (such as a touch operation) acting on an option of any commodity, and in response to the user operation, display detailed information of the commodity corresponding to the option.
  • the electronic device may receive a user operation (such as a touch operation) acting on the option 423A of "pants G), and in response to the user operation, display "pants G".
  • a user operation such as a touch operation
  • G for example, the user interface 430 shown in (D) of FIG. 4 .
  • the electronic device may display a user interface 430 .
  • the user interface 430 may include a return key 431 , a recommended product 432 , detailed information 433 of the product “pants G” and shopping options, wherein: the return key 431 is similar to the return key 411 shown in the user interface 410 , and will not be repeated here.
  • the recommended product 432 is used to display pictures and prices of other products recommended according to “pants G”, and may include options of these other products, such as product options 432A, 432B, 432C and 432D.
  • the electronic device may display detailed information of a commodity corresponding to the option.
  • the detailed information 433 of the commodity "pants G" is not shown in the user interface 430, for example but not limited to include: price information, courier fee, monthly sales volume, delivery city, commodity service, commodity size and color, commodity parameters , pictures from multiple angles and size information, etc.
  • Shopping options may include, but are not limited to, options such as Shop, Save, Add to Cart, and Buy Now.
  • the electronic device may receive a user operation (such as a touch operation) acting on the product option 432D, and in response to the user operation, display the details of the product corresponding to the option. information, such as the user interface 510 shown in (E) of FIG. 4 .
  • a user operation such as a touch operation
  • the electronic device can display a user interface 510, which is similar to the user interface 430 and can include a return key, detailed information of the product "dress A", shopping options and recommended products (not shown). ) etc., no more details.
  • the user interface displayed by the electronic device can jump from the user interface 430 shown in (D) of FIG. 4 to the user interface 510 shown in (E) of FIG. Jump to another item's user interface.
  • the user may jump to the user interface of the commodity multiple times, for example, from the user interface 510 of "dress A" shown in (E) of Figure 4, jump to the (F) of Figure 4 ) of the user interface 520 for "Dress B".
  • the user interface 520 is similar to the user interface 510 and the user interface 430 and will not be repeated here.
  • the user after the user has browsed through multiple user interfaces, he wants to return to a previously browsed user interface. For example, when the electronic device displays the user interface 520 shown in (F) of FIG. 4 , the user wants to return to The main interface of the shopping application: the user interface 300 shown in (A) of FIG. 4 . Users usually need to perform multiple return operations, returning and jumping to each browsed user interface to achieve the goal, such as clicking the return button in the user interface of the shopping application multiple times, such as performing the return operation in gesture navigation multiple times, specifically An example is shown in Figure 5 below.
  • FIG. 5 exemplarily shows a schematic diagram of a user interface of a return interface.
  • the electronic device when the electronic device displays the user interface 520, it may receive a return operation (such as a sliding operation from the left edge of the screen inwardly), and in response to the return operation, display the upper level of the user interface 520 Interface: the user interface 510 shown in (B) of FIG. 5 .
  • a return operation such as a sliding operation from the left edge of the screen inwardly
  • display the upper level of the user interface 520 Interface the user interface 510 shown in (B) of FIG. 5 .
  • the above process can be understood as that the user performs a return operation, and the electronic device returns a user interface.
  • the electronic device displays the user interface 520, the user can continuously perform 5 return operations, and the electronic device can respond to the 5 return operations and return to display in turn: the user interface 510 shown in (B) of FIG. ), the user interface 430 shown in FIG. 5(D), the user interface 410 shown in FIG.
  • the electronic device can return to multiple user interfaces in response to one return operation, reducing the number of return operations performed by the user and making the operation more convenient.
  • the electronic device may return to multiple user interfaces.
  • the electronic device when the electronic device displays the user interface 520 shown in (A) of FIG. 5 above, the user may perform 2 consecutive return operations within 1 second, and the electronic device may return to display the : the user interface 510 shown in (B) of FIG. 5 , and the user interface 430 shown in (C) of FIG. 5 .
  • the electronic device displays the user interface 430, the user can perform another return operation within 1 second, and the electronic device can directly return to display the main interface of the shopping application in response to the return operation: the user shown in (F) of FIG. 5 Interface 300. That is to say, the electronic device may return three user interfaces in response to the returning operation: the user interface 420 shown in (D) of FIG. 5 , the user interface 410 shown in (E) of FIG. 5 , and the ( F) shows the user interface 300, but the electronic device only displays the user interface 300.
  • the above example is described by taking the first preset number of times as 3 times and the first preset duration as 2 seconds as an example.
  • the electronic device may return to multiple user interfaces in response to the third return operation performed within 2 seconds.
  • the user only needs to perform 3 return operations to reach the interface shown in Figure 5 above which requires 5 return operations: user interface 300 , which reduces the steps of user operations.
  • the electronic device actually returns 5 user interfaces, but only returns and displays 3 user interfaces, so as to avoid problems such as flickering, white screen, and freeze caused by multiple rapid return operations, and improve user experience. feel better.
  • the electronic device may return to multiple user interfaces when the number of return operations received within the first preset time period is greater than or equal to the first preset number of times.
  • the values of the first preset duration and the first preset times may also be other values, which are not limited in this application.
  • the electronic device may display prompt information, and the user may perform a quick return operation based on the prompt information, wherein the normal return operation It is used to return to the upper-level interface of the current interface (also referred to as returning to a user interface), and the quick return operation is used to return to multiple user interfaces, as shown in Figure 6 below for a specific example.
  • FIG. 6 exemplarily shows a schematic diagram of another user interface of a return interface.
  • the electronic device when the electronic device displays the user interface 520, the user may perform two consecutive return operations within 1 second, and the electronic device may return to the display sequentially in response to the two return operations: The user interface 510 shown in (B) and the user interface 430 shown in (C) of FIG. 6 .
  • the electronic device may display the first prompt information 434 on the returned user interface 430 in response to the second returning operation performed within 1 second.
  • the first prompt information 434 may include the text: "return to the main interface".
  • the first prompt information 434 is used to indicate the user interface displayed after the user performs the fast return operation: the current application (that is, the shopping application) Main interface.
  • the electronic device can receive a click operation acting on the first prompt information 434, that is, it can receive a quick return operation, and in response to the quick return operation, directly return to display the main interface of the shopping application: the user interface 300 shown in (F) of FIG. 6 . That is to say, the electronic device may return three user interfaces in response to the quick return operation: the user interface 420 shown in (D) of FIG. 6 , the user interface 410 shown in (E) of FIG. ) shows the user interface 300, but the electronic device only displays the user interface 300.
  • the user only needs to perform 2 normal return operations and 1 quick return operation to reach the interface in Figure 5 above that requires 5 normal return operations to return: user interface 300, which reduces the time required for user operations. step.
  • the electronic device actually returns 5 user interfaces, but only returns and displays 3 user interfaces, so as to avoid problems such as flickering, white screen, and freeze caused by multiple rapid return operations, and improve user experience. feel better.
  • the electronic device displays prompt information for a quick return operation.
  • Fig. 6 is illustrated by taking the second preset number of times as 2 times and the second preset duration as 1 second as an example.
  • the values of the second preset duration and the second preset times can also be other values , which is not limited in this application.
  • the quick return operation can also be other user operations that are different from the normal return operation.
  • the quick return operation and the normal return operation have different functional areas, different functional controls, and different operation methods, etc. , specific examples are shown in Figure 7 and Figure 9 below.
  • FIG. 7 exemplarily shows a schematic diagram of a return operation.
  • A) of FIG. 7 shows a schematic diagram of a normal return operation
  • B) of FIG. 7 shows a schematic diagram of a quick return operation.
  • the action areas of the fast return operation and the normal return operation may be different, the action area of the normal return operation may be return area 1 , and the action area of the fast return operation may be return area 2 .
  • Both return area 1 and return area 2 are located on the left side of the screen, and return area 1 is located on the upper side of return area 2, but it is not limited to this.
  • return area 1 may also be located on the left side of the screen, and return area 2 may be located on the right side of the screen , the application does not limit the specific location of the action area.
  • An example of a quick return operation is shown in Figure 8 below.
  • FIG. 8 exemplarily shows a schematic diagram of another user interface of a return interface.
  • FIG. 8(F) shows the user interface 300. That is to say, the electronic device may return five user interfaces in response to the quick return operation: the user interface 510 shown in (B) of FIG. 8 , the user interface 430 shown in (C) of FIG. ), the user interface 410 shown in FIG. 8(E), and the user interface 300 shown in FIG. 8(F), but the electronic device only displays the user interface 300.
  • the user only needs to perform one quick return operation to reach the interface shown in FIG. 5 that requires five normal return operations: the user interface 300 , which reduces the steps of user operations.
  • the electronic device actually returns 5 user interfaces, but only returns and displays 1 user interface, so as to avoid problems such as flickering, white screen, and freezing caused by multiple rapid return operations, and improve user experience. feel better.
  • FIG. 9 exemplarily shows a schematic diagram of another returning operation.
  • (A) of FIG. 9 shows a schematic diagram of a normal return operation
  • FIG. 9(B) shows a schematic diagram of a quick return operation.
  • the quick return operation and the normal return operation can have the same action area (both return areas), but the operation methods can be different.
  • the normal return operation can be an operation of sliding horizontally from the left edge of the screen inward
  • the quick return operation It can be an operation of sliding inward from the left edge of the screen and the sliding direction is diagonally upward. It is not limited thereto, and the sliding distances of the normal return operation and the fast return operation may also be different, and the present application does not limit the specific operation mode.
  • the example of the quick return operation is similar to Figure 8 above, except that the quick return operation is replaced by an inward slide from the left edge of the screen, and the sliding direction is diagonally upward.
  • the electronic device may display prompt information, and the user may perform a quick return operation based on the prompt information.
  • the prompt information is used to indicate at least one of the following: the action area of the quick return operation, the action control, the operation mode, the return interface, and the application corresponding to the return interface. Specific examples are shown in Figures 10-11, 15-16 shown.
  • FIG. 10 exemplarily shows a schematic diagram of another returning operation.
  • the electronic device when the electronic device displays the user interface 520, it can receive a sliding operation acting on the return area 2 and the sliding distance is the first distance, and in response to the sliding operation, the electronic device can display the user interface 520 Part of the content of the second prompt information 521 is displayed.
  • the second prompt information 521 is used to instruct the user to return to the displayed user interface after performing the quick return operation: the main interface of the shopping application, for example, the second prompt information 521 is an icon of the shopping application.
  • the displayed content of the second prompt information 521 is determined according to the sliding distance of the sliding operation.
  • the electronic device may continue to receive the aforementioned sliding operation on the return area 2 , but at this time the sliding distance is changed to a second distance, and the second distance is greater than the first distance.
  • the electronic device may display all content of the second prompt information 521 on the user interface 520 , for details, refer to the user interface 520 shown in (B) of FIG. 10 .
  • the electronic device can receive a user operation (such as a touch operation, a sliding operation, etc.) acting on the second prompt information 521, that is, it can receive a quick return operation, and directly return to the display in response to the quick return operation.
  • a user operation such as a touch operation, a sliding operation, etc.
  • the main interface of the shopping application the user interface 300 shown in (F) of FIG. 8 .
  • FIG. 11 exemplarily shows a schematic diagram of another returning operation.
  • the electronic device when the electronic device displays the user interface 520, it may receive a sliding operation acting on the return area 2 and the sliding distance is the first distance, and the user interface 520 remains unchanged at this time. The electronic device may continue to receive the aforementioned sliding operation on the return area 2 , but at this time the sliding distance is changed to a second distance, and the second distance is greater than the first distance. In response to the sliding operation, the electronic device may display second prompt information 521 on the user interface 520 , as specifically shown in (B) of FIG. 11 .
  • the electronic device can continue to receive the above-mentioned sliding operation acting on the return area 2, but at this time the sliding distance is changed to the third distance, and the third distance is greater than the second distance, that is, it can receive the fast return operation, as shown in (C) of Figure 11 Show.
  • the electronic device may directly return to display the main interface of the shopping application: the user interface 300 shown in (F) of FIG. 8 .
  • the user can perform specific operations on the user interface during the process of browsing the user interface (which can be called a favorite user interface), and the favorite user interface is used to return to the display in response to the quick return operation, and specific examples are as follows Figure 12 shows.
  • FIG. 12 exemplarily shows a schematic diagram of a specific operation.
  • the user interface 420 displayed by the electronic device may further include a newly added favorite option 424 .
  • the electronic device may, in response to a user operation (such as a touch operation) acting on the favorite option 424, determine that the currently displayed user interface 420 is the user interface returned to display in response to the fast return operation. It can be understood that the electronic device may display the favorite option 424 on the user interface of all or part of the installed applications, and the electronic device may display the favorite option 424 on the entire user interface or part of the user interface of an application.
  • the user interface can also be collected through the existing controls in the application program, for example, in the user interface 510 shown in (B) of FIG. For example, a touch operation), and determine that the currently displayed user interface 510 is a return interface.
  • any user interface displayed by the electronic device can be favorited.
  • the number of bookmarkable user interfaces may be less than or equal to a preset maximum number.
  • the electronic device may determine the first number of user interfaces most recently favorited by the user as user interfaces corresponding to returning to the display for the first number of types of fast return operations, and the first number is equal to the maximum number. For example, assuming that the user has favorited user interfaces A, B, and C in sequence during the process of using application A, and assuming that the maximum number is 2, the electronic device may determine user interface B and user interface C as two types The quick return operation of corresponds to return to the displayed user interface.
  • the user can also collect the user interface through gesture operations such as a fist gesture. This application does not limit the specific implementation of the collection operation.
  • the electronic device may also preset the return interface, for example, the preset return interface is the user interface (such as the application main interface) opened for the first time by the current application.
  • the electronic device can also determine the return interface according to preset rules, such as recording the browsing time of the user interface, and the user interface whose browsing time is greater than or equal to the preset browsing time is the user interface corresponding to the quick return operation.
  • the fast return operation may include multiple types. Different types of fast return operations correspond to different user interfaces for returning. Different, etc., specific examples are shown in Figure 13- Figure 16 below.
  • the fast return operation includes two types: a first fast return operation and a second fast return operation as an example for illustration.
  • FIG. 13 exemplarily shows a schematic diagram of another return operation.
  • the quick return operation may include two types: a first quick return operation and a second quick return operation, and the operating areas of these two types of operations may be different, as shown in (A) of Figure 13, the first quick return operation
  • the action area of a quick return operation may be the return area 3, as shown in (B) of FIG. 13
  • the action area of the second quick return operation may be the return area 4 .
  • the effective area of the normal return operation can be the return area 1, wherein the return area 1 is located on the upper side of the return area 3 and the return area 4, and the return area 3 is located on the upper side of the return area 4. It is not limited thereto. In specific implementation, It may also be that the return area 3 is located at the lower left side of the screen, and the return area 4 is located at the lower right side of the screen. This application does not limit the specific positions of the active areas.
  • FIG. 14 exemplarily shows a schematic diagram of another return operation.
  • the fast return operation may include two types: a first fast return operation and a second fast return operation.
  • the common return operation, the first quick return operation and the second quick return operation can have the same action areas (both return areas), but the operation modes can be different, as shown in (A) of Figure 14, the first quick return operation can be Swipe inward from the left edge of the screen and the sliding direction is diagonally upward, as shown in (B) of Figure 14, the second quick return operation can be sliding inward from the left edge of the screen and the sliding direction is diagonally downward operation, and the normal return operation can be an operation of sliding horizontally inward from the left edge of the screen.
  • FIG. 15 exemplarily shows a schematic diagram of another return operation.
  • the electronic device when the electronic device displays the user interface 520, it may receive a sliding operation acting on the return area 2 and the sliding distance is the first distance, and the user interface 520 remains unchanged at this time. The electronic device may continue to receive the aforementioned sliding operation on the return area 2 , but at this time the sliding distance is changed to a second distance, and the second distance is greater than the first distance. In response to the sliding operation, the electronic device may display third prompt information 522A, fourth prompt information 522B, and fifth prompt information 522C on the user interface 520 , as shown in (B) of FIG. 15 .
  • the three prompt messages may respectively correspond to three types of quick return operations, and may include icons and text corresponding to the return interface.
  • the return interface indicated by the third prompt information 522A is the main interface of the shopping application: the user interface 300, and the return interface indicated by the fourth prompt information 522B is: the user interface 420 collected by the newly added favorite option 424 in FIG. 12 , the fifth prompt The return interface indicated by the information 522C is: the user interface 510 collected through the existing collection option 511 of the shopping application.
  • the electronic device can continue to receive the above-mentioned sliding operation.
  • the sliding direction of the sliding operation is changed from horizontal to diagonal upward, and acts on the third prompt information 522A, that is, it can receive the first quick return operation, in response to the first quick return operation, directly return to display the user interface 300 .
  • the electronic device may also receive a sliding operation on the fourth prompt information 522B or the fifth prompt information 522C to return to the corresponding return interface.
  • FIG. 16 exemplarily shows a schematic diagram of another return operation.
  • the electronic device when the electronic device displays the user interface 520, it can respond to the sliding operation acting on the return area 2, and display the third prompt information 522A, the fourth prompt information 522B, the fifth prompt information on the user interface 520.
  • the specific description of the prompt information 522C is consistent with the prompt information in FIG. 15 .
  • the electronic device can receive a user operation acting on any prompt information, that is, it can receive a quick return operation, and in response to the quick return operation, directly return to the return interface corresponding to the displayed and active prompt information.
  • the electronic device may receive a click operation acting on the third prompt information 522A, that is, it may receive the first fast return operation, and directly return to display the user interface 300 in response to the first fast return operation.
  • a click operation acting on the third prompt information 522A that is, it may receive the first fast return operation, and directly return to display the user interface 300 in response to the first fast return operation.
  • the electronic device may display the current interface and the user interface opened before the previous interface in split screens in response to user operations, specific examples are shown in FIGS. 17-18 below.
  • FIG. 17 exemplarily shows a schematic diagram of an embodiment of a user interface for split-screen display.
  • the electronic device can display a user interface 520, and the user interface 520 can include third prompt information 522A, fourth prompt information 522B, and fifth prompt information 522C.
  • the method of triggering the display of prompt information can be referred to above.
  • Figure 16 the description of the prompt information can refer to Figure 15 above.
  • the electronic device may receive a drag operation acting on the fifth prompt information 522C, the drag operation is used to drag the fifth prompt information 522C to the top of the screen, and in response to the drag operation, the electronic device may display a split-screen interface, specifically An example is shown in (B) of FIG. 17 .
  • the split-screen interface displayed by the electronic device may include two upper and lower windows: a first window 1810 and a second window 1820 , and a moving control 1830 between the two windows.
  • the first window 1810 is used to display the fifth prompt message 522C
  • the second window 1820 is used to display the user interface 520 (only part is shown)
  • the mobile control 1830 is used to adjust the relative size of the first window 1810 and the second window 1820, for example When the mobile control 1830 is moved up, the first window 1810 becomes smaller and the second window 1820 becomes larger.
  • the electronic device When the electronic device detects that the touch operation (which can also be understood as the above-mentioned drag operation) acting on the fifth prompt information 522C is canceled, it may display the return interface corresponding to the fifth prompt information 522C in the first window 1810: the user interface 510, specifically See (C) of FIG. 17 . That is, the electronic device detects the quick return operation corresponding to the fifth prompt information 522C in the first window 1810 , so it can directly return to display the return interface corresponding to the fifth prompt information 522C in the first window 1810 .
  • the user can also drag the third prompt information 522A or the fourth prompt information 522B to the first window 1810 under the user interface 520 shown in (C) of FIG.
  • a window 1810 displays a return interface corresponding to the dragged prompt information
  • fifth prompt information 522C is displayed on the first window 1810 or the second window 1820 .
  • the user can also click on the third prompt information 522A or the fourth prompt information 522B under the user interface 520 shown in (C) of FIG.
  • the return interface corresponding to the information.
  • the electronic device may receive a quick return operation acting on the second window 1820, for example, a touch operation acting on the third prompt information 522A, and in response to the touch operation, return to display the return interface corresponding to the third prompt information 522A , or a touch operation acting on the fourth prompt information 522B, and in response to the touch operation, return to display the return interface corresponding to the fourth prompt information 522B.
  • a quick return operation acting on the second window 1820 for example, a touch operation acting on the third prompt information 522A, and in response to the touch operation, return to display the return interface corresponding to the third prompt information 522A , or a touch operation acting on the fourth prompt information 522B, and in response to the touch operation, return to display the return interface corresponding to the fourth prompt information 522B.
  • FIG. 18 exemplarily shows a schematic diagram of another user interface embodiment for split-screen display.
  • FIG. 18 is illustrated by taking an electronic device configured with a foldable display screen (referred to as a foldable screen for short) as an example.
  • a foldable screen referred to as a foldable screen for short
  • the folding screen may be a flexible folding screen, and may include a first display area and a second display area on both sides of the bending line, and the folding screen may be bent along the bending line.
  • the folding screen can be in an unfolded state or a bent state.
  • the folding screen is in the unfolded state when the bending angle is 180 degrees, and is in the bent state when the bending angle of the folding screen is greater than or equal to 0 degrees and less than 180 degrees. It is not limited thereto, and may also include other physical states and corresponding angles, and the present application does not limit the specific physical states and corresponding angles.
  • FIG. 18 is illustrated by taking the bending angle of the folding screen as 180 degrees as an example.
  • the electronic device can display the user interface 520 shown in (A) of FIG. 17 on the folding screen, wherein the third prompt information 522A, the fourth prompt information 522B, and the fifth prompt information 522C are located in the first display area.
  • the process from (A) to (C) in Figure 18 is similar to the process from (A) to (C) in Figure 17 above, except for the dragging operation of the fifth prompt message 522C
  • the directions are different.
  • the drag operation is used to drag the fifth prompt information 522C from the first display area to the second display area.
  • the display windows of the split screens are also different. In FIG.
  • the display window used to display the original user interface 520 is the first display area
  • the display window used to display the fifth prompt message 522C and the corresponding return interface is the second display area.
  • the movement control 1910 is located on the bending line, but the specific function is the same as that of the movement control 1830 shown in FIG. 17 . For the specific process, refer to the description shown in FIG. 17 , and details are not repeated here.
  • the electronic device may receive a quick return operation acting on the first display area, for example, a touch operation acting on the third prompt information 522A, and in response to the touch operation, return to display the return interface corresponding to the third prompt information 522A , or a touch operation acting on the fourth prompt information 522B, and in response to the touch operation, return to display the return interface corresponding to the fourth prompt information 522B.
  • a quick return operation acting on the first display area for example, a touch operation acting on the third prompt information 522A, and in response to the touch operation, return to display the return interface corresponding to the third prompt information 522A , or a touch operation acting on the fourth prompt information 522B, and in response to the touch operation, return to display the return interface corresponding to the fourth prompt information 522B.
  • Figures 17-18 illustrate that the interface that the user wants to return to is the return interface corresponding to the fifth prompt information 522C as an example.
  • the interface that the user wants to return to can also be the third prompt information 522A or the fourth prompt
  • the specific process of the return interface corresponding to information 522B is similar to that in Figures 17-18 above, and will not be repeated here.
  • the split screen of the folding screen may also be split screen up and down, and the present application does not limit the specific display mode of the split screen.
  • the folding screen can also be a display screen spliced by connecting components such as a rigid screen, a flexible screen, and a chain. Both sides of an electronic device can be equipped with a display screen. This application does not limit the specific structure of the display screen.
  • the user may jump from the user interface of the current application to the user interface of other applications.
  • a specific example is shown in FIG. 19 below.
  • FIG. 19 exemplarily shows a schematic diagram of another user interface for interface jumping.
  • the electronic device may display a user interface 2510 .
  • the user interface 2510 may be the main interface of the video application displayed by the electronic device in response to a user operation (such as a touch operation) acting on the icon of the video application.
  • the icon of the video application is an icon of the electronic device.
  • the user interface 2510 may include, for example, a search bar, a recommended video 2511 , a recommended video list and page options, etc., and the recommended video list may include, for example, names and cover pictures of multiple videos.
  • the electronic device may receive a user operation (such as a touch operation) acting on the recommended video 2511, and in response to the user operation, display the video corresponding to the recommended video 2511.
  • a user operation such as a touch operation
  • the content of "Video E” in the video for example, the user interface 2520 shown in (B) of FIG. 19 .
  • the user interface 2520 may include video content of "Video E", and detailed information (eg, name, description, publisher, etc.).
  • the user interface 2520 may also include related information of "Video E", such as information of other videos recommended according to "Video E".
  • the video option 2521 includes the name, publisher, and cover image of "Video F”.
  • the electronic device may receive a user operation (such as a touch operation) acting on the video option 2521, and in response to the user operation, display the video corresponding to the video option 2521.
  • a user operation such as a touch operation
  • the content of "Video F” in the “Video F” is, for example, the user interface 2530 shown in (C) of FIG. 19 below.
  • the user interface 2530 may include video content of "Video F", and detailed information (eg, name, description, publisher, etc.).
  • the user interface 2530 may also include information related to "Video F", such as information (such as name, publisher, cover image, etc.)
  • Option 2531 may include an icon and description of the shopping application (including the text: "Click to buy the same item as the video").
  • the electronic device may receive a user operation (such as a touch operation) acting on the shopping option 2531, and in response to the user operation, display the user interface of the shopping application associated with "Video F", such as the user interface that appears in the video content.
  • a user operation such as a touch operation
  • the user interface 430 shown in (D) of FIG. 19 that is, the user interface 430 shown in (D) of FIG. 4 .
  • the user interface 430 shown in (D) of FIG. 19 can continue to jump to the user interface 510 shown in (E) of FIG. 19 and the user interface 520 shown in (F) of FIG. 19 . This process is the same as that of FIG. 4
  • the user interface 430 shown in (D) jumps to the user interface 510 shown in FIG. 4(E) and the jumping process of the user interface 520 shown in FIG. 4(F) is the same, and will not be repeated.
  • the electronic device may return to display user interfaces of different applications in response to receiving different types of fast return operations.
  • the electronic device may directly return to display the shopping application in response to the first fast return operation received.
  • the first opened user interface that is, the user interface 430 shown in (D) of FIG. ) shows the user interface 2510, for a specific example, please refer to FIG. 20 below.
  • FIG. 20 exemplarily shows a schematic diagram of another return operation.
  • the electronic device when the electronic device displays the user interface 520, it may receive a sliding operation acting on the return area 2 and the sliding distance is the first distance, and the user interface 520 remains unchanged at this time. The electronic device may continue to receive the aforementioned sliding operation on the return area 2 , but at this time the sliding distance is changed to a second distance, and the second distance is greater than the first distance. In response to the sliding operation, the electronic device may display sixth prompt information 523A and seventh prompt information 523B on the user interface 520 , as specifically shown in (B) of FIG. 20 . The two prompts may be located near the touch position of the user's finger, for example, on the right side of the touch position.
  • the two prompt messages may respectively correspond to two types of return operations for returning to user interfaces of different applications respectively, and the two prompt messages may include icons of applications returning to the interfaces.
  • the sixth prompt information 523A includes an icon of a shopping application
  • the seventh prompt information 523B includes an icon of a video application.
  • the electronic device can receive a touch operation acting on the sixth prompt information 523A, specifically as shown in (C) of FIG.
  • the touch operation of the seventh prompt information 523B is similar.
  • the electronic device returns to display the first opened user interface in the shopping application, that is, the user interface 430 shown in (D) of FIG. 19 .
  • the electronic device may return to display the main interface of the video application, that is, the user interface 2510 shown in (A) of FIG. 19 , in response to the touch operation on the seventh prompt information 523B.
  • the above prompt information can be obtained based on the analysis of the return interface, for example, the identification name of the return interface (as in the user interface 430 shown in (C) of Figure 6 above, the first prompt information 434 is "return to the main interface" , the corresponding return interface is the main interface of the shopping application), for example, obtained by semantic analysis of the return interface (if the return interface is the user interface 520 shown in (A) of Figure 6 above, the prompt information may include the product name: "Dress B"), for example, obtained by analyzing the image of the return interface (if the return interface is the user interface 520, 530 shown in FIG. 6 above, the prompt information may include a product picture).
  • the prompt information may also be an icon determined by the electronic device according to the application type of the returned interface, for example, the icon of the application program determined from the application program icon library (as in the above Figures 10-11, the second prompt Information 521 is the icon of the shopping application, and the corresponding return interface is the main interface of the shopping application). This application does not limit the specific expression of the prompt information.
  • the electronic device may also display prompt information in response to the received trigger operation, such as an operation of horizontally sliding inward from the right edge of the screen, a long sliding operation inward from the left edge of the screen, etc.
  • prompt information such as an operation of horizontally sliding inward from the right edge of the screen, a long sliding operation inward from the left edge of the screen, etc.
  • the specific manner of triggering the display of the prompt information is not limited.
  • the fast return operation may also be a long slide operation with a relatively long sliding distance, and the present application does not limit the specific type of the fast return operation.
  • more user interfaces can also be displayed by jumping, for example, there are multiple user interfaces between (A) in Figure 4 and (D) in Figure 4, and the There are also multiple user interfaces between (D) and (F) in FIG. 4 . Therefore, in the embodiment shown in FIG. 5 , the user needs to perform more return operations and return to display more user interfaces before returning to the user interface 300 shown in (F) of FIG. 5 . In the embodiments shown in Fig. 6 and Fig. 8, the electronic device can return more user interfaces in response to the quick return operation. Similar to the embodiment shown in FIG. 19 , the present application does not limit the number of displayed user interfaces after jumping and the number of returned user interfaces.
  • the function of the electronic device to return to multiple interfaces (referred to as the quick return function for short) in response to a return operation may be enabled or disabled by default.
  • the electronic device may also enable or disable the quick return function in response to user operations, specific examples are shown in FIGS. 21-25 below.
  • FIG. 21 exemplarily shows a schematic diagram of another user interface.
  • the electronic device may display a user interface 3000 .
  • the user interface 3000 may include a page theme 3010 (ie "quickly return to settings"), a general function option 3020, a first function option 3030, a second function option 3040 and a third function option 3050, wherein:
  • the total function option 3020 may include the corresponding function name (ie "quick return function"), function description (ie "execute a return operation to return to multiple interfaces") and a switch control 3020A, which is used to enable or disable the quick return function , the electronic device may receive a user operation (such as a touch operation) acting on the switch control 3020A, and in response to the user operation, enable or disable the quick return function.
  • a user operation such as a touch operation
  • the quick return function may include N types, such as functions corresponding to the first function option 3030 , the second function option 3040 , and the third function option 3050 .
  • M of the N types of fast return functions can be effective at the same time, or only one can be effective, M and N are positive integers, and N is greater than or equal to M.
  • the first function option 3030 may include the corresponding function name (that is, “multiple normal returns trigger quick return”), function description (that is, "when the number of return operations performed in a short period of time is large, the next return operation can return to multiple interfaces ”) and switch control 3030A.
  • the second function option 3040 may include the corresponding function name (that is, "return area determines the return interface”), function description (that is, "the user interface that triggers the return is different when the return operation acts on different areas”) and switch control 3040A.
  • the third function option 3050 may include the corresponding function name (that is, "the sliding direction determines the return interface"), function description (that is, "when the sliding direction of the return operation is different, the user interface that triggers the return is different”) and the switch control 3050A.
  • the electronic device may receive a user operation (such as a touch operation) acting on any switch control of the three function options, and in response to the user operation, enable or disable the corresponding fast return function.
  • a user operation such as a touch operation
  • the electronic device may display a detailed description of the function. For details, refer to the embodiment shown in FIG. 22 .
  • the second function option 3040 may further include a guide example 3040B and a return setting 3040C.
  • the example of the quick return operation can be referred to in Figure 7, Figure 8, and Figure 13 above, and the guidance example 3040B is similar to Figure 7 above.
  • the return setting 3040C can be used to set the size of different return areas and return interfaces corresponding to different return areas.
  • the electronic device may display a detailed description of the function. For details, refer to the embodiment shown in FIG. 23 .
  • the third function option 3050 may further include a guide example 3050B and a return setting 3050C.
  • the example of the quick return operation can be seen in the above Figure 9, Figure 14- Figure 16, and Figure 20, and the guidance example 3050B is similar to the above Figure 14.
  • the return setting 3050C can be used to set the size of the return area, and different sliding directions correspond to the return user interface.
  • the electronic device may display a user interface for returning to setting in response to a user operation (such as a touch operation) acting on the returning setting 3040C shown in FIG. 22 .
  • a user operation such as a touch operation
  • FIG. 24 for a specific example.
  • FIG. 24 exemplarily shows a schematic diagram of another user interface.
  • user interface 3100 may include page theme 3110 (i.e., "Back Settings”), left back area settings 3120, and right return area settings 3130, wherein:
  • page theme 3110 i.e., "Back Settings”
  • left back area settings 3120 i.e., "Back Settings”
  • right return area settings 3130 wherein:
  • the left back area setting 3120 may include a toggle control 3120A, which may be used to enable or disable the back area at the left edge of the screen.
  • the switch control 3120A in the user interface 3100 When the switch control 3120A in the user interface 3100 is turned on, the left edge of the screen shows the return area 1 and the return area 2, and the left return area setting 3120 also includes the area size setting and the return interface setting.
  • the area size setting can include a horizontal size setting bar 3120B and a vertical size setting bar 3120C.
  • the horizontal size setting bar 3120B and the vertical size setting bar 3120C can be used to adjust the horizontal width and the vertical width of the return area 1 and the return area 2 respectively.
  • the return interface setting may include the setting option 3120D corresponding to the return interface of the return area 1, and the setting option 3120E corresponding to the return interface of the return area 2.
  • the switch control 3130A included in the right return area setting 3130 can be used to activate or cancel the return area on the right edge of the screen, and the specific setting is similar to the left return area setting 3120, and will not be repeated here.
  • the settings corresponding to the return setting 3050C shown in FIG. 23 are similar to the settings shown in FIG. 24 , and will not be repeated here.
  • the electronic device may also enable other functions such as a manual bookmark return interface in response to user operations, and a specific example may refer to FIG. 25 .
  • FIG. 25 exemplarily shows a schematic diagram of another user interface.
  • the user interface 3000 may be a user interface displayed by the electronic device in response to a sliding operation (for example, a sliding operation from bottom to top) acting on the user interface 3000 shown in FIG. 21 .
  • User interface 3000 may also include a fourth function option 3060, a fifth function option 3070, and an application option 3080, wherein:
  • the fourth function option 3060 may include the corresponding function name (that is, "cross-application return”), function description (that is, "quick return operation can quickly return to the main interface of the background application that pulls up the foreground application”) and switch control 3060A, wherein, The foreground application is an application that is visible and interactive to the user, and the background application is an application that the user cannot interact with.
  • the fifth function option 3070 may include the corresponding function name (namely "return interface for manual collection”), function description (namely "quick return operation can quickly return to the user interface for manual collection by the user") and switch control 3070A.
  • the electronic device may receive a user operation (such as a touch operation) acting on any switch control of the two function options, and in response to the user operation, enable or disable the corresponding fast return function.
  • a user operation such as a touch operation
  • the function corresponding to the fourth function option 3060 is enabled, an example of the quick return operation can be referred to in FIG. 20 above.
  • the function corresponding to the fifth function option 3070 is turned on, examples of the collection operation and the quick return operation can be found in Figure 12, Figure 15-16 above.
  • the application option 3080 may include a function switch of a quick return function of multiple applications, such as a function switch 3080A of a video application, a function switch 3080B of a shopping application, and a function switch 3080C of a social application.
  • the function switch of any application is used for the user to enable or disable the quick return function for this application.
  • the applications in the application option 3080 may be default settings of the electronic device, for example, the shopping application and the video application shown in Figs. 3-20 above are applications that can enable the quick return function.
  • the user can start from one user interface A, jump to multiple user interfaces in the middle to another user interface B, and return to the user interface by performing normal return operations multiple times to return to the user interface.
  • Interface A or the displayed UI between UIA and UIB.
  • applications that cannot enable the quick return function such as a gallery application, usually jump from one user interface C (such as a picture list) to another user interface D (such as the interface of picture A), and then return to user interface C. Then jump from user interface C to another user interface E (such as the interface of picture B), and for other user interfaces jumped from user interface C, usually only a small amount of return operations are needed to return to user interface C.
  • the user can also set different sliding distances to return to different user interfaces, whether to display prompt information, the specific form of the prompt information, etc.
  • This application does not limit the quick return function that the user can set.
  • the electronic device can also enable the quick return function of some applications (such as shopping applications and video applications) by default, or the electronic device can enable the quick return function of all applications by default.
  • This application does not limit the application of enabling the quick return function.
  • the normal return operation and the fast return operation may also have different sliding distances, and different types of fast return operations may also have different sliding distances. This application does not limit the specific form of user operations. .
  • Fig. 26 is a method for quickly returning to the interface provided by the embodiment of the present application. This method can be applied to the electronic device 100 shown in FIG. 2A. This method can be applied to the electronic device 100 shown in FIG. 2B. The method may include, but is not limited to, the following steps:
  • S101 The electronic device receives a normal return operation.
  • S102 The electronic device receives a quick return operation.
  • the normal return operation and the fast return operation may, but are not limited to, meet at least one of the following: different areas of action, different controls, and different operation methods (such as different operating directions and different touch distances), etc.
  • different areas of action such as different operating directions and different touch distances
  • different operation methods such as different operating directions and different touch distances
  • the electronic device may jump to S103 after receiving the normal return operation (that is, S101).
  • the electronic device receives the quick return operation that is, S102
  • it may jump to S105.
  • S103 The electronic device judges whether a trigger condition for fast return is satisfied.
  • the electronic device may determine whether the time period for receiving the first preset number of normal return operations is less than or equal to the first preset duration, and if so, determine that the trigger condition for fast return is met; otherwise, determine that the trigger for fast return is not satisfied condition. In other embodiments, the electronic device may determine whether the number of normal return operations received within the first preset time period is greater than or equal to the first preset number of times, and if so, determine that the trigger condition for quick return is met; otherwise, determine that the quick return operation is not satisfied trigger conditions.
  • the electronic device when the electronic device determines that the triggering condition of fast return is not satisfied, it may jump to S104. In some other embodiments, when the electronic device determines that the trigger condition of fast return is met, it may jump to S105.
  • K is a positive integer
  • the moment of the earliest received ordinary return operation among the K ordinary return operations is the first moment
  • the moment when the electronic device executes S101 for the second moment may include, but is not limited to: the difference between the first moment and the second moment is less than or equal to the first preset duration, and/or (K+1) is less than or equal to the first preset number of times.
  • S104 The electronic device executes a normal return method.
  • the electronic device may return to the upper-level interface of the current interface (that is, execute the normal return method). For a specific example, refer to FIG. 5 above.
  • S105 The electronic device executes a quick return method.
  • the electronic device may return to multiple user interfaces and directly return to display the preset return interface.
  • the preset return interface may be any user interface displayed by the electronic device before the current interface, except the upper-level interface, such as the first opened application interface, such as the main interface of the application.
  • the preset return interface and the current interface may belong to the user interface of the same application, and in other embodiments, the preset return interface and the current interface belong to user interfaces of different applications.
  • the quick return operation may include multiple types. Different types of quick return operations correspond to returning to different user interfaces. Different types of quick return operations For example, but not limited to, there are different functional areas, different functional controls, and different operation methods (such as different operating directions, different touch distances) and so on. In some embodiments, different types of quick return operations correspond to different user interfaces returned, which can be in the same application. For specific examples, see Figures 6-18 above. In other embodiments, they can also be in different applications. For specific examples, please refer to Figure 19-20 above.
  • the software system of the electronic device may be an Android system, and a user interface displayed by the electronic device may be understood as corresponding to an Activity, and the Activity is managed through a Task.
  • Task can also be called a rollback stack (back stack). Therefore, opening a user interface can be understood as pushing the Activity corresponding to the user interface into a Task (that is, onto the stack).
  • Execute the return operation to return to the previous interface of the current interface which can be understood as popping up the top activity of the task (also called the top activity of the stack) (that is, the activity corresponding to the current interface) (that is, popping the stack).
  • the top activity of the stack also called the top activity of the stack
  • the quick return method shown in Figure 26 is used to return to the preset return interface, which can be understood as: the quick return method is used to pop multiple activities above the Activity corresponding to the preset return interface in the Task, so as to return the preset Set the Activity corresponding to the returned interface as the top Activity of the Task.
  • the electronic device runs a first activity stack
  • the second activity associated with the second interface also referred to as the second activity corresponding to the second interface
  • two activities into (also referred to as entering) the first activity stack
  • the first activity associated with the first interface is pushed into the first activity stack.
  • the electronic device responds to each user operation (for opening/jumping to the next-level interface of the current display interface), and sequentially displays the user interface 300, the user interface 410, the user interface Interface 420, user interface 430, user interface 510, and user interface 520, that is, the activities corresponding to user interface 300, user interface 410, user interface 420, user interface 430, user interface 510, and user interface 520 are pushed into the first activity stack .
  • the user interface 520 is, for example, the first interface (ie, the currently displayed interface), and the top activity of the first activity stack is the first activity associated with the user interface 520 .
  • the user interface 300 is, for example, the second interface, and then the bottom Activity (also called the stack bottom activity) of the first activity stack is the second activity associated with the user interface 300, not limited thereto, the user interface 410, the user interface 420 and the user interface 430 Any one of the interfaces can also be the second interface, and the second activity associated with the second interface can be understood as an activity in the stack (that is, an activity other than the bottom activity and the top activity of the stack), but it can be understood that the second activity An activity that is not associated with the user interface 510 (that is, the upper-level interface of the currently displayed interface).
  • the electronic device when it is determined that the normal return operation is received and the trigger condition for quick return is not met, the electronic device may return to the upper-level interface of the first interface, that is, the electronic The device may pop the top activity of the first activity stack.
  • the electronic device when it displays the user interface 520, it may return to display the user interface 510, the user interface 430, the user interface 420, the user interface 410, and the user interface 300 in sequence in response to each return operation. , that is, the top activities of the first activity stack are popped up sequentially until the top activity is an activity associated with the user interface 300 .
  • the electronic device can execute the common return method shown in S104.
  • the back stack includes more activities, for example, 20 activities, from the bottom to the top (that is, according to the order of entry, also That is, according to the order of opening), they are: Activity1, Activity2, ..., Activity19, Activity20.
  • the electronic device determines to receive the normal return operation and does not meet the triggering conditions of the quick return, it can pop up the top activity of the back stack: Activity20.
  • Activity20 The above situation can be understood as a normal return operation popping an Activity.
  • the electronic device when the electronic device displays the first interface of the first application program, it receives a first user operation, and pops up at least two activities of the first activity stack in response to the first user operation. Specifically, when the electronic device displays the first interface of the first application program, the top activity of the first activity stack is the first activity. In response to the first user operation, the electronic device pops up at least two activities entered after the second activity in the first activity stack, and displays the second interface.
  • the first user operation is a normal return operation
  • the electronic device receives the first user operation, it determines that the trigger condition for quick return is met.
  • the user interface shown in FIG. is the first interface
  • the user interface 300 is the second interface.
  • the electronic device displays the user interface 520 shown in (A) of Figure 5, in response to the 2 normal return operations performed within 1 second, the user interface 520 shown in (B) of Figure 5 is continuously popped out within 1 second.
  • the activity associated with the user interface 510 in response to the normal return operation received again within the next 1 second (determining that the trigger condition for quick return is met, can also be understood as meeting the first preset condition), the second activity associated with the user interface 300 After that, the multiple activities that are pushed onto the stack are popped out, that is, the multiple activities associated with the user interface 430, the user interface 420, and the user interface 410 are popped out of the stack, which can be understood as a return operation (actually the third received normal return operation).
  • Stack 3 Activities can be understood as a return operation (actually the third received normal return operation).
  • the first user operation is a quick return operation.
  • the user interface 520 is the first interface
  • the user interface 300 is the second interface
  • the electronic device responds to 2 normal return operations performed within 1 second (determining that the second number of second user operations satisfy the second preset condition), within 1 second
  • the Activity associated with the user interface 510 and the user interface 520 is continuously popped, and the user interface is displayed
  • the first prompt information 434 is displayed (when the second preset condition is met, the displayed first control is, for example, the first prompt information 434).
  • the electronic device may respond to a user operation (i.e., a quick return operation) acting on the first prompt information 434, and pop a plurality of Activities that are pushed into the stack after the second activity associated with the user interface 300, that is, the user interface 430, the user interface 420 and the user interface 420.
  • a user operation i.e., a quick return operation
  • Multiple Activities associated with the user interface 410 are popped out of the stack, which can be understood as a quick return operation to pop three Activities out of the stack.
  • the electronic device responds to the sliding operation (that is, the quick return operation) acting on the area 2, and pops the multiple activities that have been pushed into the stack after the second activity associated with the user interface 300, that is, The multiple activities associated with the user interface 520, the user interface 410, the user interface 430, the user interface 420, and the user interface 410 are popped out of the stack, which can be understood as a quick return operation to pop five activities out of the stack.
  • the first user operation can be found in Figures 10-11 and 13-16 above.
  • the electronic device may execute the fast return method shown in S105.
  • the first activity is the top activity of the stack: Activity20
  • the second activity is the bottom activity of the stack: Activity20.
  • the electronic device may preset the top activity of the first activity stack (that is, the above-mentioned second activity) after executing the fast return method, for example, preset the stack bottom activity of the first activity stack before executing the fast return method to be the first Two activities.
  • the electronic device may determine the top activity of the first activity stack after executing the fast return method (that is, the above-mentioned second activity) according to the type of Activity. Assuming that the name of the Activity includes the name of the application program (referred to as the package name) and the specific name (abbreviated as the Activity tag), the package names of the Activities belonging to the same application are the same, but the Activity tags are different, and the tags corresponding to different types of Activities are different.
  • the electronic device can record the activity associated with the user interface that receives a specific operation. For example, in the embodiment shown in FIG. The user operation records the activity associated with the user interface 420 .
  • the recorded Activity may be the top activity of the first activity stack after the fast return method is executed.
  • the electronic device may record the activity associated with the main interface of the application program, and record the activity associated with the user interface receiving a specific operation.
  • the electronic device can determine the Activity corresponding to the return interface according to the type of the fast return operation.
  • the electronic device can respond to the first fast return operation and pop the activity above the activity associated with the main interface of the application program in the first activity stack. to return to the main interface of the application.
  • the electronic device may pop the activity above the activity associated with the user interface receiving the specific operation in the first activity stack, that is, return to the user interface receiving the specific operation.
  • the electronic device runs a first activity stack
  • the third activity associated with the third interface is pushed into the first activity stack
  • the electronic device When the second interface of the first application is displayed, the second activity associated with the second interface is pushed into the first activity stack, and then, when the electronic device displays the first interface of the first application, the first activity associated with the first interface The activity is pushed onto the first activity stack.
  • the electronic device responds to each user operation (for opening/jumping to the next-level interface of the current display interface), and sequentially displays the user interface 2510 of the video application, the video application
  • the user interface 2520 of the video application, the user interface 2530 of the video application, the user interface 430 of the shopping application, the user interface 510 of the shopping application, and the user interface 520 of the shopping application that is, the user interface 2510, the user interface 2520, the user interface 2530, the user interface 430.
  • the user interface 520 of the shopping application is, for example, the first interface (ie, the currently displayed interface) of the first application program, and the top activity of the first activity stack is the first activity associated with the user interface 520 .
  • the user interface 430 of the shopping application is, for example, the second interface of the first application, and the user interface 2510 of the video application is, for example, the third interface of the second application.
  • the electronic device when the electronic device displays the first interface of the first application program, it receives a first user operation.
  • the electronic device may pop up at least two activities of the first activity stack in response to the first user operation, and display the second interface of the first application program, or the electronic device may pop up at least two activities of the first activity stack in response to the first user operation. Two activities, showing the third interface of the second application.
  • the first user operation is a normal return operation, and when the electronic device receives the first user operation, it is determined that the trigger condition for quick return is met. In other embodiments, the first user operation is a quick return operation. Specific examples and The above example where the first activity stack includes the first activity and the second activity is similar.
  • the type of the first user operation received is different, for example, the operation modes such as the active area, active control, operating direction, and sliding distance are different, as shown in FIG. 13 - FIG. 14 shows the first fast return operation and the second fast return operation.
  • the user interface 520 of the shopping application is the first interface of the first application
  • the user interface 430 of the shopping application is the second interface of the first application
  • the user interface 2510 of the video application is The third interface of the second application.
  • the 20 it may display sixth prompt information 523A and seventh prompt information 523B (in the displayed first interface, the second control included is, for example, the sixth prompt information 523A , the third control is, for example, seventh prompt information 523B), the sixth prompt information 523A is an icon of a shopping application, used to indicate a shopping application, and the seventh prompt information 523B is an icon of a video application, used to indicate a video application.
  • the electronic device may respond to the touch operation acting on the sixth prompt information 523A, and return to display the first opened user interface in the shopping application, that is, the user interface 430 (ie, the second interface), that is, the electronic device may display the user interface
  • the multiple activities pushed onto the stack are popped out, that is, the two activities associated with the user interface 520 and the user interface 510 are popped out of the stack, which can be understood as a quick return operation to pop two activities out of the stack.
  • the electronic device may respond to the touch operation acting on the seventh prompt information 523B, and return to display the first opened user interface in the video application, that is, the main interface of the video application, that is, the user interface 2510 (ie, the third interface), that is to say , the electronic device can pop the multiple activities that have been pushed into the stack after the third activity associated with the user interface 2510, that is, pop the multiple activities associated with the user interface 520, the user interface 510, the user interface 430, the user interface 2530, and the user interface 2520 , which can be understood as a quick return operation to pop 5 Activities out of the stack.
  • the electronic device may determine the top activity of the first activity stack (ie, the above-mentioned second activity or third activity) after executing the fast return method according to the application program corresponding to the Activity. It is assumed that the name of the Activity includes the name of the application program (referred to as the package name) and the specific name (referred to as the Activity tag), and the package names of the activities belonging to the same application program are the same.
  • the electronic device can identify whether the package name of the Activity in the first activity stack has changed.
  • the electronic device can record the first Activity after the package name is changed.
  • the electronic device can also record the package name. The first Activity that was pushed onto the stack before the name change.
  • the recorded Activity can be the top activity of the first activity stack after the fast return method is executed.
  • the electronic device displays the user interface 2530 of the video application, it may respond to the user operation acting on the shopping option 2531, and display the user interface 430 of the shopping application.
  • the user interface 430 of the first activity stack The package name of the activity on the top of the stack is changed from the package name of the video application to the package name of the shopping application, then the electronic device can record the first Activity after the package name change: the second activity associated with the user interface 430, and can also record the package name change
  • the first activity pushed into the stack the third activity associated with the user interface 2510 (ie the bottom activity of the first activity stack).
  • the electronic device can determine the activity corresponding to the return interface according to the type of the quick return operation. Specifically, the electronic device can respond to the first quick return operation by popping the activity above the second activity in the first activity stack, that is, returning to the shopping The user interface 430 of the application. In response to the second fast return operation, the electronic device may pop the activity above the third activity in the first activity stack, that is, return to the user interface 2510 of the video application.
  • the electronic device can record the pop-up time of each Activity in the first activity stack and the number of pop-up Activities, so as to determine whether to meet the requirement of fast access according to the recorded information when it is determined to receive a normal return operation.
  • the specific example of the triggering condition for returning is as follows (the following example uses Activity1 as an example for the preset returning interface):
  • Example 1 Assume that the electronic device has received K normal return operations, and K is a positive integer.
  • the electronic device can pop the top Activity in the first activity stack out of the stack in response to each return operation, which can be understood as executing K S101, S103 and S104.
  • the electronic device can record the pop-up time of each Activity, assuming that the recorded pop-up time is [t1, t2, . . . , t(K)]. Then, assuming that the electronic device receives the (K+1)th ordinary return operation at time t(K+1), it may be determined whether (t(K+1)-t(K)) is less than or equal to the first preset duration.
  • the electronic device determines that (t(K+1) ⁇ t(K)) is less than or equal to the first preset duration, it determines that the trigger condition for fast return is met. Therefore, the electronic device may, in response to the (K+1)th normal return operation, pop multiple Activities above Activity1 corresponding to the preset return interface in the first activity stack from the stack. In some embodiments, it can be understood that the (K+1)th S101 and S103 are executed, and one S105 is executed.
  • Example 2 Assume that the electronic device has received K normal return operations, and K is a positive integer.
  • the electronic device can pop the top Activity in the first activity stack out of the stack in response to each return operation, which can be understood as executing K S101, S103 and S104.
  • the electronic device can record the pop-up time of each Activity, assuming that the recorded pop-up time is [t1, t2, . . . , t(K)]. Then, the electronic device may receive the (K+1)th ordinary return operation, and pop the top Activity in the first activity stack out of the stack in response to the (K+1)th ordinary return operation, and record the popping time t(K +1).
  • the electronic device determines that (t(K+1) ⁇ t(K)) is less than or equal to the first preset duration, it determines that the trigger condition for fast return is met. Therefore, the electronic device may, in response to the (K+1)th normal return operation, pop multiple Activities above Activity1 corresponding to the preset return interface in the first activity stack from the stack. In some embodiments, it can be understood that the (K+1)th S101 and S103 are executed, and one S105 is executed.
  • the electronic device when the electronic device determines that the trigger condition of fast return is satisfied, it may also display prompt information (such as the first control), the prompt information is used for the user to determine whether to perform the fast return operation, and the user determines to perform the fast return operation.
  • prompt information such as the first control
  • the electronic device can execute S102 and S103.
  • the method may further include: determining that the number of Activities in the first activity stack is greater than or equal to a preset number threshold. It can be understood that the fast return method shown in this application can be applied to the back stack whose number of activities is greater than or equal to the preset number threshold.
  • the method may further include: determining that the application of the user interface associated with the Activity in the first activity stack is an application that can enable the quick return function (abbreviated as a preset application), optional
  • the application program of the user interface associated with any Activity in the first activity stack is determined to be the preset application
  • the application program of the user interface associated with the top activity of the first activity stack after the fast return method is determined to be the preset application set the application.
  • the name of the Activity includes the name of the application program (referred to as the package name) and the specific name (referred to as the Activity tag), and the package names of the Activities belonging to the same application are the same, but the Activity tags are different.
  • the electronic device can determine whether the package name of the Activity is the package name of the preset application. It can be understood that the preset application on the electronic device can apply the quick return method shown in this application. Optionally, the preset applications may be some or all of the applications on the electronic device.
  • any at least one of the above steps in Figure 26 is an optional step, for example only including S102 and S105, or only including S101 and S104, or not including S102. Not limited thereto, it may also include S101 and S103, and the method may further include: when it is determined that the electronic device satisfies the trigger condition for quick return, that is, if the judgment result of S103 is yes, the electronic device may display a prompt message . Alternatively, before S101 and/or S102, the method may further include: displaying prompt information by the electronic device. Hints are used to indicate quick return actions. For examples of prompt information, please refer to Figure 6, Figure 10-11, Figure 15-18, and Figure 20 above.
  • the back stack includes 20 activities, and the preset return interface corresponds to Activity 1 at the bottom of the back stack as an example for illustration.
  • FIG. 27 exemplarily shows a schematic diagram of popping an Activity.
  • the triggering condition of the fast return is: the duration of the period of receiving 5 normal return operations is less than or equal to 3 seconds.
  • the electronic device can receive the user's normal return operation 4 times within 2 seconds, and pop the top activity of the back stack out of the stack in response to each normal return operation, that is, from the current display interface Return to the previous interface.
  • the top Activity of the back stack is 16, and the electronic device can receive the user's fifth normal return operation within 1 second.
  • the electronic device determines that the difference between the receiving times of the fourth normal return operation and the fifth normal return operation is less than or equal to 1 second, that is, determines that the trigger condition of the fast return is satisfied.
  • the electronic device may pop multiple Activities above the Activity1 corresponding to the preset return interface in the back stack from the stack.
  • the multiple activities above Activity1 are the 15 activities of Activity2, Activity3, ..., Activity15, and Activity16.
  • the top activity of the back stack is Activity1, and the electronic device can display the preset return interface. The user only needs to perform 5 normal return operations to return to the displayed user interface after performing 19 normal return operations, and the operation is simple.
  • the electronic device may, in response to a fast return operation, pop the multiple activities above the Activity corresponding to the preset return interface in the back stack sequentially according to the first-in-last-out principle.
  • This solution may be called the first pop-out stack scheme.
  • the electronic device may respond to a quick return operation by first popping multiple activities between the Activity corresponding to the preset return interface in the back stack and the top Activity, and then popping the top Activity from the stack.
  • the popping scheme can be called the second popping scheme, and a specific example can be found in Figure 28 below.
  • FIG. 28 exemplarily shows another schematic diagram of Activity popping out.
  • the electronic device can respond to the user's quick return operation and return the 18 activities between the corresponding Activity 1 and the top activity (i.e., Activity 20) in the back stack. Popping out of the stack, in some embodiments, the 18 Activities of Activity19, Activity18, .
  • the top Activity of the back stack remains as Activity20, that is, the user interface displayed by the electronic device remains as the user interface corresponding to Activity20. Then, the electronic device can continue to pop Activity20 out of the stack. At this time, the top Activity of the back stack is Activity1, and the electronic device can display a preset return interface.
  • the 18 Activities can also be popped out of the stack in sequence according to the principle of last-in-first-out, or in any order. This application There is no limit to this.
  • the electronic device can also respond to the user's normal return operation (and determine that the trigger condition for quick return is satisfied), and the activity corresponding to the preset return interface in the back stack and the top activity
  • the electronic device can respond to the user's fifth normal return operation, and return the default activity in the back stack to the interface corresponding to Activity1 and the top
  • the 14 activities between the Activity ie Activity16
  • the Activity16 is popped out of the stack, and then the Activity16 is popped out of the stack.
  • the Android system when the user enters, exits, and returns to the application (also can be understood as opening, exiting, and returning to the user interface), the Activity corresponding to the user interface has experienced different states in the life cycle,
  • the Android system calls a series of methods in the life cycle. It can be understood that there is a life cycle for each Activity. For a specific example, see Figure 29 below.
  • FIG. 29 exemplarily shows a schematic diagram of an Activity life cycle.
  • the entire process of the life cycle can be understood as starting from the creation method onCreated() and ending with the destruction method onDestroy().
  • the user can see the Activity, or it can be understood that the user can see the corresponding activity of the Activity
  • the user interface is between the start method onStart() and the stop method onStop().
  • the user can interact with the Activity, or it can be understood that the user can interact with the user interface corresponding to the Activity, from the resume method onResume() to the pause method onPause().
  • the life cycle can also include the restart method onRestart(), that is to say, the life cycle can include seven methods, and the example is as follows:
  • Creation method onCreated() Called when the Activity is created, usually doing some initialization settings.
  • Start method onStart() Called before the Activity is ready to be displayed on the screen, and the Activity is in a visible state after the call.
  • Resume method onResume() Called when the Activity gets focus and interacts with the user.
  • Pause method onPause() Called when the current Activity is partially covered by other Activities or the screen is locked.
  • Stop method onStop() Called when the Activity is invisible to the user.
  • Destroy method onDestroy() Called when the Activity is about to be destroyed.
  • Restart method onRestart() Called when the Activity starts again from the stopped (Stopped) state.
  • the Activity is in different states after different method calls are executed.
  • the life cycle can include five states.
  • the example is as follows:
  • Created state the state that the Activity is in after the method onCreated() is executed. When the Activity is in the current state, it is invisible to the user and cannot interact with the user.
  • Started state The state of the Activity after the method onStart() is executed. When the Activity is in the current state, it is visible to the user but cannot interact with the user. Among them, when the Activity is in the Created state, the Activity is in the Started state after the method onStart() is executed. When the Activity is in the Stopped state, the methods onRestart() and onStart() are executed sequentially and the Activity is in the Started state.
  • Resumed state also called running state.
  • Paused state the state of the Activity after the method onPause() is executed. When the Activity is in the current state, it is visible to the user but cannot interact with the user.
  • Stopped state the state of the Activity after the method onStop() is executed.
  • the Activity is in the current state, it is invisible to the user and cannot interact with the user.
  • Destroyed (Destroyed) state the state of the Activity after the method onDestroy() is executed. When the Activity is in the current state, it is invisible to the user and cannot interact with the user.
  • the method when a lifecycle method is called for a different Activity, the method carries an Activity identifier as an example.
  • Activity(i) is an example of an Activity identifier
  • i is a positive integer.
  • the method for the life cycle called by Activity1 can be expressed as: onCreated(Activity1), onStart(Activity1), onResume(Activity1), onPause(Activity1), onStop(Activity1), onDestroy(Activity1), onRestart (Activity1).
  • the methods onCreated(Activity1), onStart(Activity1), and onResume(Activity1) can be called sequentially for Activity1, and the states of Activity1 can be sequentially Created, Started, Resumed. That is to say, when Activity1 is the top Activity of the back stack, the state is Resumed, which is visible to the user and can interact with the user.
  • the methods onPause(Activity1), onCreated(Activity2), onStart(Activity2), onResume(Activity2), and onStop(Activity1) can be called sequentially for Activity1 and Activity2.
  • Activity2 is the top Activity of the back stack, its status is Resumed, it is visible to the user and can interact with the user, while the status of Activity1 is Stopped, it is invisible to the user and cannot interact with the user. Then, when the user executes the return operation and Activity2 pops out of the stack, the methods onPause(Activity2), onRestart(Activity1), onStart(Activity1), onResume(Activity1), onStop(Activity2), onDestroy(Activity2) can be called sequentially for Activity1 and Activity2 . Activity2 is destroyed, and Activity1 becomes the top Activity of the back stack again.
  • the electronic device can respond to the user's fast return operation, and pop the multiple activities above the activity corresponding to the preset return interface in the back stack sequentially according to the principle of first-in, last-out , that is, Activity20, Activity19, ..., Activity3, and Activity2 are popped out of the stack in sequence, so that Activity1 is the top Activity, and Activity1 is visible to the user and can interact with the user.
  • the methods onPause(Activity20), onRestart(Activity19), onStart(Activity19), onResume(Activity19), onStop(Activity20), onDestroy(Activity20) can be called sequentially for Activity20 and Activity19. Need to execute 18 times. Therefore, when the first popping solution is adopted, the electronic device needs to call (19 ⁇ 6) life cycle methods to make Activity1 the top Activity.
  • the electronic device may respond to the user's quick return operation, and the activity1 corresponding to the preset return interface in the back stack and the top Activity (i.e., Activity20)
  • the 18 Activities of Activity19, Activity18, ..., Activity3, and Activity2 are popped out of the stack in turn according to the principle of first in, last out, and the electronic device can call the methods onDestroy(Activity19), onDestroy( Activity18), ..., onDestroy(Activity3), onDestroy(Activity2), a total of 18 life cycle methods are called.
  • the top Activity of the back stack remains as Activity20, that is, the user interface displayed by the electronic device remains as the user interface corresponding to Activity20.
  • the electronic device can continue to pop Activity20 out of the stack, and the electronic device can sequentially call the methods onPause(Activity20), onRestart(Activity1), onStart(Activity1), onResume(Activity1), onStop(Activity20), onDestroy(Activity20) for Activity20 and Activity1 , a total of 6 life cycle methods are called. Therefore, when the second popping solution is adopted, the electronic device needs to call (18+6) life cycle methods to make Activity1 the top Activity.
  • (18+6) is much smaller than (19 ⁇ 6), and the power consumption consumed by the electronic device when adopting the second stacking scheme is far less than the power consumption when adopting the first stacking scheme, for example, reducing 90% power consumption.
  • the electronic device adopts the first pop-out scheme the user performs a quick return operation, and the user interface displayed by the electronic device will jump from the user interface corresponding to Activity20 to the preset return interface corresponding to Activity1 in turn, that is, the electronic device actually displays 20 user interfaces are loaded (pictures, videos and other data required by 20 user interfaces are loaded), but because the jump speed is too fast (jump time is short), the user interface visible to the user may appear flickering, white screen, stuck Dayton and other issues.
  • the electronic device adopts the second stacking scheme
  • the user performs a quick return operation, and the user interface displayed by the electronic device will directly jump from the user interface corresponding to Activity20 to the preset return interface corresponding to Activity1, that is, the electronic device actually displays 2 A user interface, smooth performance, better user experience.
  • the user interface 520 is associated with the top activity of the first activity stack.
  • the activities included in the first activity stack are the activities associated with the user interface 300, the user interface 410, the user interface 420, the user interface 430, the user interface 510 and the user interface 520 in order from the bottom to the top (ie, the order of entry).
  • the electronic device can pop up multiple activities between the top activity and the bottom activity in response to the user's fast return operation, that is, execute the method onDestroy() on the multiple activities between the top activity and the bottom activity, for example, sequentially Call methods onDestroy (Activity associated with user interface 510), onDestroy (Activity associated with user interface 430), onDestroy (Activity associated with user interface 420), onDestroy (Activity associated with user interface 410).
  • the electronic device can pop up the stack top activity to display the user interface 300, that is, call the methods onPause (the activity associated with the user interface 520), onRestart (the activity associated with the user interface 300), onStart ((the activity associated with the user interface 300), onResume ((the activity associated with the user interface 300 ), onStop (the activity associated with the user interface 520 ), onDestroy (the activity associated with the user interface 520 ). Examples of other fast-returning user interfaces are similar and will not be repeated here.
  • the 18 Activities such as Activity19, Activity18, ..., Activity3, and Activity2 may be popped out of the stack in sequence according to the last-in-first-out principle, and the electronic device may call the methods onDestroy(Activity2), onDestroy(Activity3), ..., onDestroy in sequence (Activity18), onDestroy (Activity19), can also be popped out of the stack in any order, which is not limited in this application.
  • Only one Activity may be included between the Activity corresponding to the preset return interface returned by the quick return method and the top Activity of the Task.
  • the default return interface returned by the quick return method corresponds to the Activity1 at the bottom of the back stack as an example for illustration.
  • the default return interface returned by the quick return method is any Activity in the back stack except the top Activity, such as Activity (2), Activity (5), and so on.
  • Activity in this application can be understood as a user interface, such as a user interface displayed on the entire display screen, or a user interface displayed on an area of the display screen other than the status bar.
  • the user interface may be an interface displayed by the electronic device in response to received user operations. For example, in the embodiment shown in FIG. Interface 400.
  • the processes can be completed by computer programs or hardware related to the computer programs.
  • the computer programs can be stored in computer-readable storage media.
  • the computer programs During execution, it may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: various media capable of storing computer program codes such as read-only memory (ROM) or random access memory (RAM), magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请提供了一种快速返回界面的方法及电子设备,该方法应用于电子设备,该方法包括:显示第一应用程序的第一界面,第一界面和第一活动关联,第一活动为第一活动栈的栈顶活动,第一活动栈包括第一活动、第二活动和第三活动;接收第一用户操作;响应于第一用户操作,弹出第一活动栈的至少两个活动,显示第一应用程序的第二界面,第二界面和第二活动关联;或,响应于第一用户操作,弹出第一活动栈的至少两个活动,显示第二应用程序的第三界面,第三界面和第三活动关联。本申请可以响应于第一用户操作,快速返回到上一级界面之前打开的一个用户界面,操作简单方便。

Description

一种快速返回界面的方法及电子设备
本申请要求于2021年06月26日提交中国专利局、申请号为202110715180.1、申请名称为“一种快速返回界面的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备技术领域,尤其涉及一种快速返回界面的方法及电子设备。
背景技术
一个应用程序可以包括多个应用程序活动(Activity)。用户在使用应用程序的过程中,应用程序会根据用户的操作生成多个活动,这多个活动会按照访问顺序依次进入堆栈。当堆栈中的活动数量较多时,若用户想要返回到之前打开的一个界面(例如应用程序的主界面),需多次触发返回键逐级返回,活动也会按照访问顺序的反向顺序依次弹出堆栈,用户操作繁琐。或者,用户可以直接退出该应用程序,再重新打开该应用程序,但这样之前的操作记录会丢失,用户可能需要重新操作,操作繁琐且违背正常感知,用户体验感差。
发明内容
本申请实施例公开了一种快速返回界面的方法及电子设备,可以快速返回到上一级界面之前打开的一个界面,操作简单方便。
第一方面,本申请实施例提供了一种快速返回界面的方法,应用于电子设备,该方法包括:显示第一应用程序的第一界面,所述第一界面和第一活动关联,所述第一活动为第一活动栈的栈顶活动,所述第一活动栈包括所述第一活动、第二活动和第三活动;接收第一用户操作;响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,所述第二界面和所述第二活动关联;或,响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示第二应用程序的第三界面,所述第三界面和所述第三活动关联。
在上述方法中,电子设备可以应用于一个第一用户操作,快速返回到上一级界面之前打开的一个界面,该界面可以是和当前显示的第一界面属于同一个应用程序,例如第一应用程序第一次打开的用户界面,也可以和当前显示界面属于不同的应用程序,例如第二应用程序的主界面,用户操作简单方便,返回界面多样化,交互体验更加友好。
在一种可能的实现方式中,所述显示第一应用程序的第一界面之前,所述方法还包括:显示所述第二应用程序的所述第三界面;显示所述第一应用程序的所述第二界面,所述第二活动是在所述第一活动进入所述第一活动栈之前进入的,所述第三活动是在所述第二活动进入所述第一活动栈之前进入的。
在一种可能的实现方式中,所述接收第一用户操作之前,所述方法还包括:接收第一数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,包括:当所述第一数量个所述第二 用户操作和所述第一用户操作满足第一预设条件时,响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,所述预设条件为第一接收时刻和所述第一用户操作的接收时刻的差值小于或等于第一时长,所述第一接收时刻为所述第一数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻。
在一些实施例中,连续接收多个用户操作(第一数量个第二用户操作和一个第一用户操作)的时段较短时,可以快速返回到上一级界面之前打开的一个界面,例如电子设备可以在2秒内连续接收了3次返回操作(如从屏幕左边缘向内滑动),电子设备可以响应于第3次的返回操作,弹出第一活动栈的至少两个活动,显示上一级界面之前打开的一个界面。
在一种可能的实现方式中,所述接收第一用户操作之前,所述方法还包括:接收第二数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;当所述第二数量个所述第二用户操作满足第二预设条件时,显示第一控件,所述第二预设条件为第二接收时刻和第三接收时刻的差值小于或等于第二时长,所述第二接收时刻为所述第二数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻,所述第三接收时刻为所述第二数量个所述第二用户操作中最晚接收的所述第二用户操作的接收时刻;所述接收第一用户操作,包括:接收作用于所述第一控件的所述第一用户操作。
在一些实施例中,连续接收多个用户操作(第二数量个第二用户操作)的时段较短时,电子设备可以显示第一控件,第一控件用于指示用户执行快速返回操作后显示的用户界面,快速返回操作即为作用于第一控件的第一用户操作。然后,电子设备可以响应于快速返回操作,弹出第一活动栈的至少两个活动,显示上一级界面之前打开的一个界面,即第一控件指示的用户界面。在一些实施例中,第一控件通过包括的文字指示用户界面,在另一些实施例中,第一控件为指示的用户界面的应用程序的图标。
在一种可能的实现方式中,所述接收第一用户操作,包括:接收作用于第一区域的所述第一用户操作,所述第一区域和第二区域不同,所述第二区域为第二用户操作作用的区域,所述第二用户操作用于返回当前显示界面的上一级界面。
在一些实施例中,第一区域和第二区域均位于屏幕左侧,第二区域位于第一区域上侧。
在一种可能的实现方式中,第一用户操作和第二用户操作的作用区域相同,操作方向不同,所述第二用户操作用于返回当前显示界面的上一级界面。在一些实施例中,第二用户操作为从屏幕左边缘向内水平滑动的操作,第一用户操作为从屏幕左边缘向内滑动且滑动方向为对角向上的操作。
在一种可能的实现方式中,所述第一界面包括第二控件和第三控件,所述第二控件用于指示所述第一应用程序,所述第三控件用于指示所述第二应用程序;所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,包括:响应于作用于所述第二控件的所述第一用户操作,弹出所述第一活动栈中所述第二活动之后进入的至少两个活动,显示所述第二界面;或,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示第二应用程序的第三界面,包括:响应于作用于所述第三控件的所述第一用户操作,弹出所述第一活动栈中所述第三活动之后进入的至少两个活动,显示所述第三界面。
在一些实施例中,第二控件为第一应用程序的图标,第三控件为第二应用程序的图标。
在一些实施例中,该方法还包括:显示所述第一界面时,响应于作用于第一区域的滑动操作,显示所述第二控件和所述第三控件。在另一些实施例中,该方法还包括:显示所述第一界面时,响应于作用于第一区域且滑动距离为预设距离的滑动操作,显示所述第二控件和 所述第三控件。第一区域和第二区域不同,第二区域为第二用户操作作用的区域,所述第二用户操作用于返回当前显示界面的上一级界面。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,包括:响应于第一类型的第一用户操作,弹出所述第一活动栈中所述第二活动之后进入的至少两个活动,显示所述第二界面;或,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示第二应用程序的第三界面,包括:响应于第二类型的第一用户操作,弹出所述第一活动栈中所述第三活动之后进入的至少两个活动,显示所述第三界面。
在一些实施例中,第一类型的第一用户操作和第二类型的第一用户操作的作用区域相同,操作方向不同,在一些实施例中,第一类型的第一用户操作为从屏幕左边缘向内滑动且滑动方向为对角向上的操作,第二类型的第一用户操作为从屏幕左边缘向内滑动且滑动方向为对角向下的操作。
本申请中,用户可以基于界面提示的信息,执行不同类型的第一用户操作,从而快速返回到不同的用户界面,使用场景多样化,用户体验感更好。
在一种可能的实现方式中,所述第一活动和所述第二活动的名称包括所述第一应用程序的名称,所述显示所述第一应用程序的所述第二界面之前,所述方法还包括:显示所述第二应用程序的第四界面,所述第四界面和第四活动关联,所述第四活动的名称包括所述第二应用程序的名称,所述第四活动是在所述第二活动进入所述第一活动栈之前,及所述第三活动进入所述第一活动栈之后进入的;所述显示所述第一应用程序的所述第二界面,包括:从所述第四界面切换为所述第二界面时,确定所述第二活动为响应于作用于所述第二控件的所述第一用户操作时,显示的用户界面关联的活动;所述第四界面切换为所述第二界面时,所述第一活动栈的栈顶活动从所述第四活动变为所述第二活动,所述第四活动的名称包括的应用程序的名称和所述第二活动的名称包括的应用程序的名称不同。
在一些实施例中,第四界面是在第三界面之后显示的,第二应用程序的用户界面中最后一个显示的界面,电子设备显示的第二应用程序的第四界面跳转显示为第一应用程序的第二界面时,电子设备可以记录包名(即应用程序的名称)变化后的第一个活动,也就是第一应用程序的第二界面关联的第二活动。记录的第二活动可以为执行快速返回方法后第一活动栈的栈顶活动,即电子设备可以响应于第一用户操作,弹出所述第一活动栈中所述第二活动之后进入的至少两个活动,显示所述第二界面。
本申请中,电子设备可以快速返回到跳转的第一应用程序的用户界面中,第一个打开的用户界面,符合用户使用习惯,用户体验感更好。
在一种可能的实现方式中,所述显示所述第一应用程序的所述第二界面,包括:从所述第四界面切换为所述第二界面时,确定所述第三活动为响应于作用于所述第三控件的所述第一用户操作时,显示的用户界面关联的活动,所述第三活动为名称包括所述第二应用程序的名称的多个活动中最早进入所述第一活动栈的活动。
在一些实施例中,第四界面是在第三界面之后显示的,第二应用程序的用户界面中最后一个显示的界面,电子设备显示的第二应用程序的第四界面跳转显示为第一应用程序的第二界面时,电子设备可以记录包名变化前第一个进入第一活动栈的活动,也就是第二应用程序的第三界面关联的第三活动。记录的第三活动可以为执行快速返回方法后第一活动栈的栈顶活动,即电子设备可以响应于第一用户操作,弹出所述第一活动栈中所述第三活动之后进入的至少两个活动,显示所述第三界面。
在一些实施例中,第三界面为第二应用程序的主界面。电子设备可以快速返回到第二应用程序的主界面,符合用户使用习惯,用户体验感更好。
在一种可能的实现方式中,所述方法还包括:响应于作用于所述第二控件的第三用户操作,分屏显示所述第一界面和所述第二界面;或,所述方法还包括:响应于作用于所述第三控件的第四用户操作,分屏显示所述第一界面和所述第三界面。
本申请中,电子设备可以响应于用户操作,分屏显示当前显示的第一界面,和上一级界面之前显示的一个用户界面,使用更加灵活。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,包括:响应于所述第一用户操作,弹出第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动,所述第五活动和第五界面关联,所述第五界面为所述第二界面或所述第三界面;弹出所述第一活动,显示所述第五界面。
本申请中,电子设备弹出第一活动栈的至少两个活动时,可以先弹出第一活动栈的栈顶活动(即第一活动)和目标的第五活动之间的活动,此时栈顶活动保持不变,显示的用户界面也保持为第一界面,然后再弹出第一活动,此时栈顶活动为第五活动,电子设备显示第五界面。也就是说,用户可见的用户界面是直接从第一界面返回到第五界面,避免弹出的至少两个活动较多时,显示的用户界面多次切换而带来的闪烁、白屏、卡顿等问题,性能流畅,用户体验感更好。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动,包括:响应于所述第一用户操作,分别对所述第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动执行销毁方法,所述第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动处于销毁状态,所述第一活动处于恢复状态,所述第五活动处于停止状态;所述弹出所述第一活动,显示所述第五界面,包括:对所述第一活动执行暂停方法,所述第一活动处于暂停状态;对所述第五活动执行开始方法和重启方法,所述第五活动处于开始状态;对所述第五活动执行恢复方法,所述第五活动处于恢复状态;对所述第一活动执行停止方法,所述第一活动处于停止状态;对所述第一活动执行销毁方法,所述第一活动处于销毁状态。
本申请中,电子设备只需分别对所述第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动执行销毁方法,而不是在每次弹出栈顶活动,显示上一级界面时,执行下述多个方法:对栈顶活动执行暂停方法,对上一级界面关联的活动执行开始方法、重启方法、恢复方法,对栈顶活动执行停止方法、销毁方法,大大减小了处理量,减少设备功耗。
在一种可能的实现方式中,所述方法还包括:响应于第五用户操作,开启第一功能;所述第一功能为所述第一用户操作的作用区域不同时,响应于所述第一用户操作显示的用户界面不同,或,所述第一功能为所述第一用户操作的操作方向不同时,响应于所述第一用户操作显示的用户界面不同。
本申请中,用户可以自行选择快速返回功能的实现方式,例如可以根据使用习惯选择第一用户操作的作用区域不同时,快速返回的用户界面不同,或者根据使用习惯选择第一用户操作的操作方向不同时,快速返回的用户界面不同,使用更加灵活。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动之前,所述方法还包括:确定所述第一活动栈包括的活动的数量大于或等于预设数量阈值。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第一活动栈的至少 两个活动之前,所述方法还包括:确定所述第一活动栈包括的活动关联的用户界面的应用程序为预设应用。
在一种可能的实现方式中,所述方法还包括:响应于第六用户操作,确定所述第一应用程序和所述第二应用程序为预设应用。
本申请中,用户可以自行选择应用快速返回功能的预设应用,使用更加灵活。
第二方面,本申请实施例提供了又一种快速返回界面的方法,应用于电子设备,该方法包括:显示第一应用程序的第一界面,所述第一界面和第一活动关联,所述第一活动为第一活动栈的栈顶活动,所述第一活动栈包括所述第一活动和第二活动;接收第一用户操作;响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,所述第二界面和所述第二活动关联。
在上述方法中,电子设备可以应用于一个第一用户操作,快速返回到上一级界面之前打开的一个界面,用户操作简单方便,体验感更好。
在一种可能的实现方式中,所述显示第一应用程序的第一界面之前,所述方法还包括:显示所述第一应用程序的所述第二界面,所述第二活动是在所述第一活动进入所述第一活动栈之前进入的。
在一种可能的实现方式中,所述显示第一应用程序的第一界面时,所述第二活动为所述第一活动栈的栈底活动。
在一些实施例中,第二界面为第一应用程序的主界面。电子设备可以快速返回到第一应用程序的主界面,符合用户使用习惯,用户体验感更好。
在一种可能的实现方式中,所述接收第一用户操作之前,所述方法还包括:接收第一数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,包括:当所述第一数量个所述第二用户操作和所述第一用户操作满足第一预设条件时,响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,所述预设条件为第一接收时刻和所述第一用户操作的接收时刻的差值小于或等于第一时长,所述第一接收时刻为所述第一数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻。
在一些实施例中,连续接收多个用户操作(第一数量个第二用户操作和一个第一用户操作)的时段较短时,可以快速返回到上一级界面之前打开的一个界面,例如电子设备可以在2秒内连续接收了3次返回操作(如从屏幕左边缘向内滑动),电子设备可以响应于第3次的返回操作,弹出第一活动栈的至少两个活动,显示上一级界面之前打开的一个界面。
在一种可能的实现方式中,所述接收第一用户操作之前,所述方法还包括:接收第二数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;当所述第二数量个所述第二用户操作满足第二预设条件时,显示第一控件,所述第二预设条件为第二接收时刻和第三接收时刻的差值小于或等于第二时长,所述第二接收时刻为所述第二数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻,所述第三接收时刻为所述第二数量个所述第二用户操作中最晚接收的所述第二用户操作的接收时刻;所述接收第一用户操作,包括:接收作用于所述第一控件的所述第一用户操作。
在一些实施例中,连续接收多个用户操作(第二数量个第二用户操作)的时段较短时,电子设备可以显示第一控件,第一控件用于指示用户执行快速返回操作后显示的用户界面,快速返回操作即为作用于第一控件的第一用户操作。然后,电子设备可以响应于快速返回操 作,弹出第一活动栈的至少两个活动,显示上一级界面之前打开的一个界面,即第一控件指示的用户界面。在一些实施例中,第一控件通过包括的文字指示用户界面,在另一些实施例中,第一控件为指示的用户界面的应用程序的图标。
在一种可能的实现方式中,所述接收第一用户操作,包括:接收作用于第一区域的所述第一用户操作,所述第一区域和第二区域不同,所述第二区域为第二用户操作作用的区域,所述第二用户操作用于返回当前显示界面的上一级界面。
在一些实施例中,第一区域和第二区域均位于屏幕左侧,第二区域位于第一区域上侧。
在一种可能的实现方式中,第一用户操作和第二用户操作的作用区域相同,操作方向不同,所述第二用户操作用于返回当前显示界面的上一级界面。在一些实施例中,第二用户操作为从屏幕左边缘向内水平滑动的操作,第一用户操作为从屏幕左边缘向内滑动且滑动方向为对角向上的操作。
在一种可能的实现方式中,所述第一界面包括第二控件,所述第二控件用于指示所述第一应用程序;所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,包括:响应于作用于所述第二控件的所述第一用户操作,弹出所述第一活动栈中所述第二活动之后进入的至少两个活动,显示所述第二界面。
在一些实施例中,第二控件为第一应用程序的图标。
在一些实施例中,该方法还包括:显示所述第一界面时,响应于作用于第一区域的滑动操作,显示所述第二控件。在另一些实施例中,该方法还包括:显示所述第一界面时,响应于作用于第一区域且滑动距离为第一距离的滑动操作,显示所述第二控件的部分内容;响应于作用于第一区域且滑动距离为第二距离的滑动操作,显示所述第二控件的全部内容,所述第二距离大于第一距离。可选地,所述第二控件显示的内容多少是根据滑动操作的滑动距离确定的。在另一些实施例中,该方法还包括:显示所述第一界面时,响应于作用于第一区域且滑动距离为预设距离的滑动操作,显示所述第二控件。其中,第一区域和第二区域不同,第二区域为第二用户操作作用的区域,所述第二用户操作用于返回当前显示界面的上一级界面。
在一种可能的实现方式中,所述第二界面包括第四控件,所述方法还包括:响应于作用于所述第四控件的第七用户操作,确定所述第二界面为响应于所述第一用户操作时显示的用户界面,所述第一活动栈还包括所述第二活动之前进入的至少一个活动。
在一些实施例中,第一控件为第二界面新增的控件,在另一些实施例中,第一控件为第一应用程序中已有的控件。
本申请中,用户可以选择浏览过的用户界面为响应于第一用户操作时显示的用户界面,操作更加灵活。
在一种可能的实现方式中,所述方法还包括:响应于第八用户操作,分屏显示所述第一界面和所述第二界面。
本申请中,电子设备可以响应于用户操作,分屏显示当前显示的第一界面,和上一级界面之前显示的一个用户界面,使用更加灵活。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,包括:响应于所述第一用户操作,弹出所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动;弹出所述第一活动,显示所述第二界面。
本申请中,电子设备弹出第一活动栈的至少两个活动时,可以先弹出第一活动栈的栈顶 活动(即第一活动)和目标的第二活动之间的活动,此时栈顶活动保持不变,显示的用户界面也保持为第一界面,然后再弹出第一活动,此时栈顶活动为第二活动,电子设备显示第二界面。也就是说,用户可见的用户界面是直接从第一界面返回到第二界面,避免弹出的至少两个活动较多时,显示的用户界面多次切换而带来的闪烁、白屏、卡顿等问题,性能流畅,用户体验感更好。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动,包括:响应于所述第一用户操作,分别对所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动执行销毁方法,所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动处于销毁状态,所述第一活动处于恢复状态,所述第二活动处于停止状态;所述弹出所述第一活动,显示所述第二界面,包括:对所述第一活动执行暂停方法,所述第一活动处于暂停状态;对所述第二活动执行开始方法和重启方法,所述第二活动处于开始状态;对所述第二活动执行恢复方法,所述第二活动处于恢复状态;对所述第一活动执行停止方法,所述第一活动处于停止状态;对所述第一活动执行销毁方法,所述第一活动处于销毁状态。
本申请中,电子设备只需分别对所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动执行销毁方法,而不是在每次弹出栈顶活动,显示上一级界面时,执行下述多个方法:对栈顶活动执行暂停方法,对上一级界面关联的活动执行开始方法、重启方法、恢复方法,对栈顶活动执行停止方法、销毁方法,大大减小了处理量,减少设备功耗。
在一种可能的实现方式中,所述方法还包括:响应于第五用户操作,开启第一功能;所述第一功能为所述第一用户操作的作用区域不同时,响应于所述第一用户操作显示的用户界面不同,或,所述第一功能为所述第一用户操作的操作方向不同时,响应于所述第一用户操作显示的用户界面不同。
本申请中,用户可以自行选择快速返回功能的实现方式,例如可以根据使用习惯选择第一用户操作的作用区域不同时,快速返回的用户界面不同,或者根据使用习惯选择第一用户操作的操作方向不同时,快速返回的用户界面不同,使用更加灵活。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面之前,所述方法还包括:确定所述第一活动栈包括的活动的数量大于或等于预设数量阈值。
在一种可能的实现方式中,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面之前,所述方法还包括:确定所述第一活动栈包括的活动关联的用户界面的应用程序为预设应用。
在一种可能的实现方式中,所述方法还包括:所述方法还包括:响应于第九用户操作,确定所述第一应用程序为预设应用。
本申请中,用户可以自行选择应用快速返回功能的预设应用,使用更加灵活。
第三方面,本申请实施例提供了一种电子设备,包括收发器、处理器和存储器,上述存储器用于存储计算机程序,上述处理器调用上述计算机程序,用于执行本申请实施例第一方面至第二方面,以及第一方面至第二方面的任意一种实现方式提供的快速返回界面的方法。
第四方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该计算机程序被处理器执行时,实现本申请实施例第一方面至第二方面,以及第一方面至第二方面的任意一种实现方式提供的快速返回界面的方法。
第五方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行本申请实施例第一方面至第二方面,以及第一方面至第二方面的任意一种实现方式提供的快速返回界面的方法。
第六方面,本申请实施例提供一种电子设备,该电子设备包括执行本申请任一实施例所介绍的方法或装置。上述电子设备例如为芯片。
应当理解的是,本申请中对技术特征、技术方案、有益效果或类似语言的描述并不是暗示在任意的单个实施例中可以实现所有的特点和优点。相反,可以理解的是对于特征或有益效果的描述意味着在至少一个实施例中包括特定的技术特征、技术方案或有益效果。因此,本说明书中对于技术特征、技术方案或有益效果的描述并不一定是指相同的实施例。进而,还可以任何适当的方式组合本实施例中所描述的技术特征、技术方案和有益效果。本领域技术人员将会理解,无需特定实施例的一个或多个特定的技术特征、技术方案或有益效果即可实现实施例。在其他实施例中,还可在没有体现所有实施例的特定实施例中识别出额外的技术特征和有益效果。
附图说明
以下对本申请实施例用到的附图进行介绍。
图1是本申请实施例提供的一种活动Activity入栈出栈的示意图;
图2A是本申请实施例提供的一种电子设备的硬件结构示意图;
图2B是本申请实施例提供的一种电子设备的软件架构示意图;
图3-图25是本申请实施例提供的一些用户界面实施例的示意图;
图26是本申请实施例提供的一些快速返回界面的方法的流程示意图;
图27-图28是本申请实施例提供的一些Activity的出栈的示意图;
图29示例性示出一种Activity的生命周期的示意图。
具体实施方式
下面结合本申请实施例中的附图对本申请实施例进行描述。本申请实施例的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
本申请实施例提供了一种快速返回界面的方法,应用于电子设备。电子设备可以响应于一次返回操作,将活动任务栈(简称活动栈)(Activity Stack)中的多个活动(Activity)出栈,以执行返回多个用户界面的操作,即实现快速返回界面的效果,避免用户多次执行返回操作,操作更加便捷,提升用户体验感。
本申请中,返回操作例如但不限于为:作用于应用程序内置的返回键的操作,作用于三键导航中的返回键的操作,手势导航中的返回操作(如从屏幕左边缘或右边缘向内滑动),语音(如发出声音:“返回”),手势(如张开手指并从左往右挥动)。上述返回键可以是虚拟按键,也可以是实体按键。
本申请中,电子设备可以运行至少一个应用,一个应用可以包括至少一个应用程序活动。可选地,一个应用程序活动可以对应一个用户界面,为便于描述,本申请实施例将应用程序活动简称为活动,或应用活动。应用程序活动可以是安卓(Android)系统中的活动(Activity),还可以是IOS等其他操作系统中的应用程序活动,本申请对此不作限定。
以下实施例以应用程序活动为Android系统中的Activity为例进行说明。
其中,Activity是Android系统中用户和应用程序之间进行交互的接口。Activity供应用程序在其中绘制界面。Activity通常会填满屏幕,但也可能比屏幕小,并浮动在其他Activity上面。一个Activity是用户可以直观交互的东西,可以表现为一个用户界面,可以理解为一个Activity对应一个用户界面。一个应用可以包含多个用户界面,也可以理解为是一个应用可以包含多个Activity。操作应用程序时,偶尔需要调用多个Activity来完成需求。每个Activity可以启动另一个Activity,以执行不同的操作。例如,用户启动电子邮件应用后可以先进入应用的主界面,主界面对应的Activity可以启动其他Activity,以提供执行写邮件和打开邮件这类任务的用户界面。
在操作应用程序的过程中,Andord系统可以使用堆栈的方式管理Activity,可以称为活动任务栈(Activity Stack),也可称为Task,Task便于线性记录Activity示例。Task在安卓开放源代码项目(Android open source project)中,实际为一种动态数组(array list)。堆栈的特性是压入(也可称进入)和弹出,并且采用先进后出的原则,即先压入堆栈(也可称进入堆栈)的Activity比后压入堆栈的Activity先弹出堆栈。一个Task可以包括至少一个Activity。一个Task中的多个Activity可以是同一应用包括的Activity,也可以是不同应用包括的Activity。第一个压入Task且最后一个弹出Task的Activity,可以理解为是Task中位于最底层的Activity,可以称为根部Activity,最后一个压入Task且第一个弹出Task的Activity,可以理解为是Task中位于最顶层的Activity,可以称为顶部Activity。
在一些实施例中,根部Activity通常对应应用的主界面。顶部Activity通常是正在运行、用户正在交互的Activity,也可以称为前台活动(foreground activity),前台活动对应的用户界面用户可见。
本申请中,每次启动新的Activity时,该Activity可以压入Task,成为Task的顶部Activity。用户可以触发返回操作,以返回顶部Activity之前压入Task的一个Activity,直到Task的根部Activity被弹出。因此,Task也可称为回退栈(back stack)。具体示例如下图1所示。
请参见图1,图1示例性示出一种Activity入栈出栈的示意图。
如图1所示,用户可以基于电子设备打开对应Activity1的第一界面,例如用户点击电子设备桌面的应用图标时,电子设备显示应用图标对应的应用的主界面。此时,Activity1被压入回退栈,成为回退栈的顶部Activity。第一界面用户可见且可交互,Activity1为前台活动。用户可以继续基于电子设备打开对应Activity2的第二界面,例如用户点击主界面的分类选项时,电子设备显示分类选项对应的应用界面。此时,Activity2被压入回退栈,成为回退栈的顶部Activity。第一界面用户不可交互,第二界面用户可见且可交互,Activity2为前台活动。
如图1所示,用户可以基于电子设备执行返回操作,例如用户点击第二界面上虚拟的返回键时,电子设备返回显示第一界面。此时,Activity2被弹出回退栈,Activity1重新成为回退栈的顶部Activity。第一界面重新变为用户可见且可交互,Activity1重新变为前台活动。
本申请实施例中涉及的电子设备可以是手机、平板电脑、手持计算机、个人数字助理(Personal Digital Assistant,PDA)等用户终端设备,智能电视、智能摄像头等智能家居设备,智能手环、智能手表、智能眼镜等可穿戴设备,或其他桌面型、膝上型、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、上网本、智慧屏等设备。
接下来介绍本申请实施例示例性的电子设备100。
请参见图2A,图2A示例性示出了电子设备100的硬件结构示意图。
如图2A所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121, 通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有 源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传 感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。例如,分层架构的软件系统可以是Android系统,也可以是HMS系统。本申请实施例以分层架构的Android系统为例,示例性说明终端的软件结构。
图2B是本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图2B所示,应用程序包可以包括相机,图库,音乐,浏览器,电子邮件,购物应用,视频应用,社交应用以及信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后 台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
应用程序框架层还可以包括活动管理服务(activity manager service,AMS)。AMS是Android系统的系统服务,用于控制系统中不同的应用程序之间合理的调度与运行。AMS的主要职责包括统一调度各应用程序的Activity、管理应用程序的进程、管理内存、调度Task、查询系统当前运行状态等等。AMS还可以用于执行本申请提供的快速返回界面的方法,例如执行下图26-图28所示流程。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面结合购物应用的主界面返回到桌面的场景,示例性说明电子设备100软件以及硬件的工作流程。
显示屏194显示购物应用的主界面时,若压力传感器180A和/或触摸传感器180K接收到从屏幕左边缘向内滑动的操作(即手势导航的返回操作),相应的硬件中断被发给内核层。内核层将该滑动操作加工成原始输入事件(包括滑动轨迹,滑动坐标,时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。购物应用可以调用应用框架层的接口,进而通过调用内核层的显示驱动,通过显示屏194显示电子设备100的桌面。
下面介绍本申请实施例涉及的应用场景以及该场景下的用户界面实施例。
请参见图3,图3示例性示出一种用户界面的示意图。
如图3所示,电子设备可以显示用户界面200,用户界面200可以是电子设备的桌面。用户界面200可以包括应用程序图标220,应用程序图标220可以包括例如视频应用220A、购物应用220B、社交应用220C、图库220D、浏览器220E、音乐220F、电子邮件220G、电话220H、信息220I和相机220J等,还可以包括其他应用的图标,本申请对此不作限定。电子设备可以响应于针对任一应用的图标的用户操作(例如触摸操作),启动图标对应的应用,显示图标对应的应用的主界面。
在一些实施例中,假设用户想要使用购物应用,电子设备可以接收作用于购物应用220B的用户操作(例如触摸操作),响应于该用户操作,启动购物应用,显示图4的(A)所示的 用户界面300。
请参见图4,图4示例性示出一种界面跳转的用户界面示意图。
如图4的(A)所示,电子设备可以显示用户界面300。用户界面300可以包括搜索栏310、购物选项图标320和页面选项330,其中:
搜索栏310可以用于在购物应用中搜索用户想要查看的商品。搜索栏310可以包括输入框310A和搜索控件310B,输入框310A可以用于用户输入想要查看的商品名称,电子设备可以响应于针对搜索控件310B的用户操作(例如触摸操作),在购物应用的商品中查找用户输入的商品名称,并显示对应的查找结果。例如,输入框310A输入的内容为“裤装”时,电子设备可以显示购物应用上商品信息包括“裤装”的商品,如显示下图4的(C)所示的用户界面420。
购物选项图标320可以包括例如夏季服饰320A、新鲜水果320B、旅行服务320C、生活服务320D、电器产品320E和药品保健320F等,本申请对此不作限定。电子设备可以响应于针对任一购物选项的图标的用户操作(例如触摸操作),显示图标对应的购物选项的用户界面。
页面选项330可以包括例如首页选项330A、分类选项330B、购物车选项330C和我的选项330D等,本申请对此不作限定。用户界面300中首页选项330A为选中状态,表示用户界面300是购物应用的首页,即购物应用的主界面。电子设备可以响应于针对页面选项330中任一选项的图标的用户操作(例如触摸操作),显示图标对应的选项的购物界面。
在一些实施例中,假设用户想要查看“夏季服饰”,电子设备可以接收作用于夏季服饰320A的用户操作(例如触摸操作),响应于该用户操作,显示“夏季服饰”对应的购物界面,例如图4的(B)所示的用户界面410。
如图4的(B)所示,电子设备可以显示用户界面410。用户界面410可以包括返回键411、页面主题412(即“夏季服饰”)、购物选项图标413和页面选项414,其中:
返回键411可以用于返回当前界面的上一级界面。电子设备可以接收作用于返回键411的用户操作(例如触摸操作),响应于该用户操作,显示用户界面410的上一级界面。
购物选项图标413可以包括例如上衣413A、裤装413B、裙装413C、美妆413D、鞋靴413E和箱包413F等,本申请对此不作限定。电子设备可以响应于针对任一选项的图标的用户操作(例如触摸操作),显示图标对应的购物选项的用户界面。
页面选项414可以包括例如首页选项414A、分类选项414B和活动选项414C等,本申请对此不作限定。用户界面410中分类选项414B为选中状态,表示用户界面410是夏季服饰的分类界面。电子设备可以响应于针对页面选项414中任一选项的图标的用户操作(例如触摸操作),显示图标对应的选项的购物界面。
在一些实施例中,假设用户想要查看“裤装”,电子设备可以接收作用于裤装413B的用户操作(例如触摸操作),响应于该用户操作,显示“裤装”对应的购物界面,例如图4的(C)所示的用户界面420。
如图4的(C)所示,电子设备可以显示用户界面420。用户界面420可以包括返回键421、搜索栏422和商品列表423,其中:返回键421和用户界面410所示的返回键411类似,不再赘述。
搜索栏422可以用于在购物应用中搜索用户想要查看的商品。用户界面420中的搜索栏422中已输入“裤装”,表示用户界面420包括购物应用上商品信息包括“裤装”的商品列表,即商品列表423。
商品列表423可以包括多个商品的信息,例如商品名称:裤装A(未示出)、裤装B(未 示出)、裤装C(未示出)、裤装D(未示出)、裤装E、裤装F、裤装G、裤装H。电子设备可以接收作用于任意一个商品的选项的用户操作(例如触摸操作),响应于该用户操作,显示该选项对应的商品的详细信息。
在一些实施例中,假设用户想要查看“裤装G”,电子设备可以接收作用于“裤装G”的选项423A的用户操作(例如触摸操作),响应于该用户操作,显示“裤装G”的详细信息,例如图4的(D)所示的用户界面430。
如图4的(D)所示,电子设备可以显示用户界面430。用户界面430可以包括返回键431、推荐商品432、商品“裤装G”的详细信息433和购物选项,其中:返回键431和用户界面410所示的返回键411类似,不再赘述。
推荐商品432用于显示根据“裤装G”推荐的其他商品的图片和价格,可以包括这多个其他商品的选项,例如商品选项432A、商品选项432B、商品选项432C和商品选项432D。电子设备可以响应于针对任一选项的用户操作(例如触摸操作),显示该选项对应的商品的详细信息。
商品“裤装G”的详细信息433在用户界面430中未示出具体内容,例如但不限于包括:价格信息、快递费用、月销量、发货城市、商品服务、商品尺码和颜色、商品参数、多个角度的图片和尺码信息等。
购物选项可以包括但不限于店铺、收藏、加入购物车、立即购买等选项。
在一些实施例中,假设用户想要查看商品选项432D对应的商品,电子设备可以接收作用于商品选项432D的用户操作(例如触摸操作),响应于该用户操作,显示该选项对应的商品的详细信息,例如图4的(E)所示的用户界面510。
如图4的(E)所示,电子设备可以显示用户界面510,用户界面510和用户界面430类似,可以包括返回键、商品“连衣裙A”的详细信息、购物选项和推荐商品(未示出)等,不再赘述。
电子设备显示的用户界面可以从图4的(D)所示的用户界面430,跳转至图4的(E)所示的用户界面510,这样的过程可以理解为是从一个商品的用户界面跳转到另一个商品的用户界面。用户使用购物应用的过程中,可能会实现多次商品的用户界面的跳转,例如,从图4的(E)所示的“连衣裙A”的用户界面510,跳转至图4的(F)所示的“连衣裙B”的用户界面520。用户界面520和用户界面510、用户界面430类似,不再赘述。
在一些实施例中,用户浏览过多个用户界面后,想要返回到之前浏览过的一个用户界面,例如电子设备显示图4的(F)所示的用户界面520时,用户想要返回到购物应用的主界面:图4的(A)所示的用户界面300。用户通常需要执行多次返回操作,返回跳转至每个浏览过的用户界面才能实现目标,如多次点击购物应用的用户界面中的返回键,如多次执行手势导航中的返回操作,具体示例如下图5所示。
以下实施例以返回操作为手势导航中的返回操作(假设为从屏幕左边缘向内滑动的操作)为例进行说明。
请参见图5,图5示例性示出一种返回界面的用户界面示意图。
如图5的(A)所示,电子设备显示用户界面520时,可以接收返回操作(例如从屏幕左边缘向内滑动的滑动操作),响应于该返回操作,显示用户界面520的上一级界面:图5的(B)所示的用户界面510。上述过程可以理解为是用户执行了1次返回操作,电子设备返回了1个用户界面。电子设备显示用户界面520时,用户可以连续执行5次返回操作,电子设备可以响应于这5次返回操作,依次返回显示:图5的(B)所示的用户界面510、图5的(C) 所示的用户界面430、图5的(D)所示的用户界面420、图5的(E)所示的用户界面410、图5的(F)所示的用户界面300。即用户需执行5次返回操作,电子设备中间返回显示4个用户界面,才可以从用户界面520返回至购物应用的主界面:用户界面300,用户操作繁琐,体验感差。
本申请中,电子设备可以响应于一次返回操作,返回多个用户界面,减少用户执行返回操作的次数,操作更加便捷。
在一些实施例中,接收第一预设次数次返回操作的时长小于或等于第一预设时长时,电子设备可以返回多个用户界面。
示例性地,电子设备显示上图5的(A)所示的用户界面520时,用户可以在1秒内连续执行了2次返回操作,电子设备可以响应于这2次返回操作,依次返回显示:图5的(B)所示的用户界面510、图5的(C)所示的用户界面430。电子设备显示用户界面430时,用户可以在1秒内再次执行1次返回操作,电子设备可以响应于该次返回操作,直接返回显示购物应用的主界面:图5的(F)所示的用户界面300。也就是说,电子设备可以响应于该次返回操作,返回3个用户界面:图5的(D)所示的用户界面420、图5的(E)所示的用户界面410、图5的(F)所示的用户界面300,但电子设备仅显示用户界面300。
上述示例以第一预设次数为3次,第一预设时长为2秒为例进行说明,电子设备可以响应于2秒内执行的第3次返回操作,返回多个用户界面。在上述示例中,用户仅需执行3次返回操作,即可达到上图5中需执行5次返回操作才能返回的界面:用户界面300,减少了用户操作的步骤。并且,在上述实例中,电子设备实际返回了5个用户界面,却仅返回显示了3个用户界面,避免多次快速执行返回操作而带来的闪烁、白屏、卡顿等问题,用户体验感更好。
不限于上述示例,也可以是在第一预设时长的时段内接收的返回操作的次数大于或等于第一预设次数时,电子设备返回多个用户界面。
不限于上述示例,第一预设时长和第一预设次数的取值还可以为其他取值,本申请对此不作限定。
在一些实施例中,接收第二预设次数次普通返回操作的时长小于或等于第二预设时长时,电子设备可以显示提示信息,用户可以基于提示信息执行快速返回操作,其中,普通返回操作用于返回当前界面的上一级界面(也可称为返回一个用户界面),快速返回操作用于返回多个用户界面,具体示例如下图6所示。
请参见图6,图6示例性示出了又一种返回界面的用户界面示意图。
如图6的(A)所示,电子设备显示用户界面520时,用户可以在1秒内连续执行了2次返回操作,电子设备可以响应于这2次返回操作,依次返回显示:图6的(B)所示的用户界面510、图6的(C)所示的用户界面430。并且,电子设备可以响应于1秒内执行的第2次返回操作,在返回显示的用户界面430上显示第一提示信息434。其中,第一提示信息434可以包括文字:“返回主界面”,在一些实施例中,第一提示信息434用于指示用户执行快速返回操作后显示的用户界面:当前应用(即购物应用)的主界面。电子设备可以接收作用于第一提示信息434的点击操作,即可以接收快速返回操作,响应于快速返回操作,直接返回显示购物应用的主界面:图6的(F)所示的用户界面300。也就是说,电子设备可以响应于快速返回操作,返回3个用户界面:图6的(D)所示的用户界面420、图6的(E)所示的用户界面410、图6的(F)所示的用户界面300,但电子设备仅显示用户界面300。
如图6所示,用户仅需执行2次普通返回操作和1次快速返回操作,即可达到上图5中 需执行5次普通返回操作才能返回的界面:用户界面300,减少了用户操作的步骤。并且,在上述示例中,电子设备实际返回了5个用户界面,却仅返回显示了3个用户界面,避免多次快速执行返回操作而带来的闪烁、白屏、卡顿等问题,用户体验感更好。
不限于上述示例,也可以是在第二预设时长的时段内接收的返回操作的次数大于或等于第二预设次数时,电子设备显示快速返回操作的提示信息。
图6以第二预设次数为2次,第二预设时长为1秒为例进行说明,在具体实现中,第二预设时长和第二预设次数的取值还可以为其他取值,本申请对此不作限定。
不限于上述列举的快速返回操作,快速返回操作还可以是其他和普通返回操作不同的用户操作,快速返回操作和普通返回操作例如但不限于是作用区域不同,作用控件不同,操作方式不同等等,具体示例如下图7、图9所示。
请参见图7,图7示例性示出一种返回操作的示意图。图7的(A)示出了普通返回操作的示意图,图7的(B)示出了快速返回操作的示意图。
如图7所示,快速返回操作和普通返回操作的作用区域可以不同,普通返回操作的作用区域可以为返回区域1,快速返回操作的作用区域可以为返回区域2。返回区域1和返回区域2均位于屏幕左侧,返回区域1位于返回区域2上侧,不限于此,在具体实现中,也可以是返回区域1位于屏幕左侧,返回区域2位于屏幕右侧,本申请对作用区域的具体位置不作限定。快速返回操作的示例如下图8所示。
请参见图8,图8示例性示出又一种返回界面的用户界面示意图。
如图8的(A)所示,电子设备显示用户界面520时,可以接收快速返回操作(作用于返回区域2的滑动操作),响应于快速返回操作,直接返回显示购物应用的主界面:图8的(F)所示的用户界面300。也就是说,电子设备可以响应于快速返回操作,返回5个用户界面:图8的(B)所示的用户界面510、图8的(C)所示的用户界面430、图8的(D)所示的用户界面420、图8的(E)所示的用户界面410、图8的(F)所示的用户界面300,但电子设备仅显示用户界面300。
如图8所示,用户仅需执行1次快速返回操作,即可达到上图5中需执行5次普通返回操作才能返回的界面:用户界面300,减少了用户操作的步骤。并且,在上述实例中,电子设备实际返回了5个用户界面,却仅返回显示了1个用户界面,避免多次快速执行返回操作而带来的闪烁、白屏、卡顿等问题,用户体验感更好。
请参见图9,图9示例性示出又一种返回操作的示意图。图9的(A)示出了普通返回操作的示意图,图9的(B)示出了快速返回操作的示意图。
如图9所示,快速返回操作和普通返回操作的作用区域可以相同(均为返回区域),但操作方式可以不同,普通返回操作可以为从屏幕左边缘向内水平滑动的操作,快速返回操作可以为从屏幕左边缘向内滑动且滑动方向为对角向上的操作。不限于此,也可以是普通返回操作和快速返回操作的滑动距离不同,本申请对具体操作方式不作限定。快速返回操作的示例和上图8类似,只是快速返回操作替换为从屏幕左边缘向内滑动,且滑动方向为对角向上的操作。
在一些实施例中,电子设备可以显示提示信息,用户可以基于提示信息执行快速返回操作。示例性地,提示信息用于指示以下至少一项:快速返回操作的作用区域、作用控件、操作方式、返回界面、返回界面对应的应用,具体示例如下图10-图11、图15-图16所示。
请参见图10,图10示例性示出了又一种返回操作的示意图。
如图10的(A)所示,电子设备显示用户界面520时,可以接收作用于返回区域2且滑 动距离为第一距离的滑动操作,响应于该滑动操作,电子设备可以在用户界面520上显示第二提示信息521的部分内容。在一些实施例中,第二提示信息521用于指示用户执行快速返回操作后返回显示的用户界面:购物应用的主界面,例如第二提示信息521为购物应用的图标。第二提示信息521显示的内容多少是根据滑动操作的滑动距离确定的。电子设备可以继续接收上述作用于返回区域2的滑动操作,但此时滑动距离变更为第二距离,第二距离大于第一距离。响应于该滑动操作,电子设备可以在用户界面520上显示第二提示信息521的全部内容,具体可参见图10的(B)所示的用户界面520。
如图10的(C)所示,电子设备可以接收作用于第二提示信息521的用户操作(例如触摸操作、滑动操作等),即可以接收快速返回操作,响应于快速返回操作,直接返回显示购物应用的主界面:图8的(F)所示的用户界面300。
请参见图11,图11示例性示出了又一种返回操作的示意图。
如图11的(A)所示,电子设备显示用户界面520时,可以接收作用于返回区域2且滑动距离为第一距离的滑动操作,此时用户界面520保持不变。电子设备可以继续接收上述作用于返回区域2的滑动操作,但此时滑动距离变更为第二距离,第二距离大于第一距离。响应于该滑动操作,电子设备可以在用户界面520上显示第二提示信息521,具体如图11的(B)所示。电子设备可以继续接收上述作用于返回区域2的滑动操作,但此时滑动距离变更为第三距离,第三距离大于第二距离,即可以接收快速返回操作,具体如图11的(C)所示。响应于快速返回操作,电子设备可以直接返回显示购物应用的主界面:图8的(F)所示的用户界面300。
在一些实施例中,用户可以在浏览用户界面的过程中可以对用户界面执行特定操作(可称为收藏用户界面),收藏的用户界面用于在响应于快速返回操作时返回显示,具体示例如下图12所示。
请参见图12,图12示例性示出一种特定操作的示意图。
如图12所示,电子设备显示的用户界面420可以还包括新增的收藏选项424。电子设备可以响应于作用于收藏选项424的用户操作(例如触摸操作),确定当前显示的用户界面420为响应于快速返回操作返回显示的用户界面。可以理解地,电子设备可以在安装的全部应用或部分应用的用户界面显示收藏选项424,电子设备可以在一个应用的全部用户界面或部分用户界面显示收藏选项424。
不限于此,还可以通过应用程序中已有的控件收藏用户界面,例如上图8的(B)所示的用户界面510中,电子设备可以响应于作用于购物选项“收藏”的用户操作(例如触摸操作),确定当前显示的用户界面510为返回界面。
本申请中,电子设备显示的任意一个用户界面可以被收藏。
在一些实施例中,可收藏的用户界面的数量可以小于或等于预设的最大数量。可选地,电子设备可以将用户最近收藏的第一数量个用户界面,确定为第一数量种类型的快速返回操作对应返回显示的用户界面,第一数量等于最大数量。示例性地,假设用户在使用应用A的过程中,依次收藏了用户界面A、B和C,以及假设最大数量为2,则电子设备可以将用户界面B和用户界面C,确定为两种类型的快速返回操作对应返回显示的用户界面。
不限于上述列举的收藏操作,在具体实现中,用户还可以通过握拳手势等手势操作来收藏用户界面,本申请对收藏操作的具体实现方式不作限定。
不限于上述列举的情况,在具体实现中,电子设备也可以预设返回界面,例如预设返回界面为当前应用第一次打开的用户界面(如应用主界面)。电子设备也可以按照预设规则确定 返回界面,例如记录用户界面的浏览时长,浏览时长大于或等于预设浏览时长的用户界面为快速返回操作对应返回显示的用户界面。
在一些实施例中,快速返回操作可以包括多种类型,不同类型的快速返回操作对应返回显示不同的用户界面,不同类型的快速返回操作例如但不限于是作用区域不同,作用控件不同,操作方式不同等等,具体示例如下图13-图16所示。
以下实施例以快速返回操作包括两种类型:第一快速返回操作和第二快速返回操作为例进行说明。
请参见图13,图13示例性示出又一种返回操作的示意图。
如图13所示,快速返回操作可以包括两种类型:第一快速返回操作和第二快速返回操作,这两种类型的操作的作用区域可以不同,如图13的(A)所示,第一快速返回操作的作用区域可以为返回区域3,如图13的(B)所示,第二快速返回操作的作用区域可以为返回区域4。而普通返回操作的作用区域可以为返回区域1,其中,返回区域1位于返回区域3和返回区域4的上侧,返回区域3位于返回区域4的上侧,不限于此,在具体实现中,也可以是返回区域3位于屏幕左下侧,返回区域4位于屏幕右下侧,本申请对作用区域的具体位置不作限定。
请参见图14,图14示例性示出又一种返回操作的示意图。
如图14所示,快速返回操作可以包括两种类型:第一快速返回操作和第二快速返回操作。普通返回操作、第一快速返回操作和第二快速返回操作的作用区域可以相同(均为返回区域),但操作方式可以不同,如图14的(A)所示,第一快速返回操作可以为从屏幕左边缘向内滑动且滑动方向为对角向上的操作,如图14的(B)所示,第二快速返回操作可以为从屏幕左边缘向内滑动且滑动方向为对角向下的操作,而普通返回操作可以为从屏幕左边缘向内水平滑动的操作。
请参见图15,图15示例性示出又一种返回操作的示意图。
如图15的(A)所示,电子设备显示用户界面520时,可以接收作用于返回区域2且滑动距离为第一距离的滑动操作,此时用户界面520保持不变。电子设备可以继续接收上述作用于返回区域2的滑动操作,但此时滑动距离变更为第二距离,第二距离大于第一距离。响应于该滑动操作,电子设备可以在用户界面520上显示第三提示信息522A、第四提示信息522B、第五提示信息522C,具体如图15的(B)所示。这三个提示信息可以分别对应三种类型的快速返回操作,可以包括和返回界面对应的图标和文字。第三提示信息522A指示的返回界面为购物应用的主界面:用户界面300,第四提示信息522B指示的返回界面为:图12中通过新增的收藏选项424收藏的用户界面420,第五提示信息522C指示的返回界面为:通过购物应用已有的收藏选项511收藏的用户界面510。
如图15的(C)所示,电子设备可以继续接收上述滑动操作,此时滑动操作的滑动方向从水平变更为对角向上,且作用于第三提示信息522A,即可以接收第一快速返回操作,响应于第一快速返回操作,直接返回显示用户界面300。不限于此,电子设备还可以接收针对第四提示信息522B或第五提示信息522C的滑动操作,以返回对应的返回界面。
请参见图16,图16示例性示出又一种返回操作的示意图。
如图16的(A)所示,电子设备显示用户界面520时,可以响应于作用于返回区域2的滑动操作,在用户界面520上显示第三提示信息522A、第四提示信息522B、第五提示信息522C,具体说明和图15中的提示信息一致。电子设备可以接收作用于任意一个提示信息的用户操作,即可以接收快速返回操作,响应于快速返回操作,直接返回显示和作用的提示信 息对应的返回界面。例如,电子设备可以接收作用于第三提示信息522A的点击操作,即可以接收第一快速返回操作,响应于第一快速返回操作,直接返回显示用户界面300,具体示例可参见图16的(B)。
在一些实施例中,电子设备可以响应于用户操作,分屏显示当前界面和上一级界面之前打开的用户界面,具体示例如下图17-图18所示。
请参见图17,图17示例性示出一种分屏显示的用户界面实施例的示意图。
如图17的(A)所示,电子设备可以显示用户界面520,用户界面520可以包括第三提示信息522A、第四提示信息522B、第五提示信息522C,触发显示提示信息的方式可参见上图16,提示信息的说明可参见上图15。电子设备可以接收作用于第五提示信息522C的拖拽操作,该拖拽操作用于将第五提示信息522C拖拽至屏幕上方,响应于该拖拽操作,电子设备可以显示分屏界面,具体示例如图17的(B)所示。
如图17的(B)所示,电子设备显示的分屏界面可以包括上下两个窗口:第一窗口1810和第二窗口1820,以及这两个窗口之间的移动控件1830。第一窗口1810用于显示第五提示信息522C,第二窗口1820用于显示用户界面520(仅示出部分),移动控件1830用于调整第一窗口1810和第二窗口1820的相对大小,例如将移动控件1830往上移动时,第一窗口1810变小,第二窗口1820变大。电子设备检测到作用于第五提示信息522C的触摸操作(也可理解为是上述拖拽操作)取消时,可以在第一窗口1810显示第五提示信息522C对应的返回界面:用户界面510,具体可参见图17的(C)。也即电子设备在第一窗口1810检测到第五提示信息522C对应的快速返回操作,因此可以直接在第一窗口1810返回显示第五提示信息522C对应的返回界面。
在一些实施例中,用户还可以在图17的(C)所示的用户界面520下,将第三提示信息522A或第四提示信息522B拖拽至第一窗口1810,则电子设备可以在第一窗口1810显示拖拽的提示信息对应的返回界面,并且在第一窗口1810或第二窗口1820上显示第五提示信息522C。
在一些实施例中,用户还可以在图17的(C)所示的用户界面520下,点击第三提示信息522A或第四提示信息522B,则电子设备可以在第二窗口1820显示点击的提示信息对应的返回界面。
在一些实施例中,电子设备可以接收作用于第二窗口1820的快速返回操作,例如作用于第三提示信息522A的触摸操作,响应于该触摸操作,返回显示第三提示信息522A对应的返回界面,或者作用于第四提示信息522B的触摸操作,响应于该触摸操作,返回显示第四提示信息522B对应的返回界面。
请参见图18,图18示例性示出又一种分屏显示的用户界面实施例的示意图。图18以电子设备配置有可折叠的显示屏(简称为折叠屏)为例进行说明。
如图18所示,折叠屏可以为一个柔性折叠屏,可以包括弯折线两侧的第一显示区域和第二显示区域,折叠屏可以沿着弯折线弯折。示例性地,折叠屏可以处于展开状态或弯折状态,折叠屏的弯折角度为180度时处于展开状态,折叠屏的弯折角度大于或等于0度且小于180度时处于弯折状态,不限于此,还可以包括其他物理状态和对应的角度,本申请对具体物理状态和对应的角度不作限定。图18以折叠屏的弯折角度为180度为例进行说明。
如图18的(A)所示,电子设备可以在折叠屏显示上图17的(A)所示的用户界面520,其中,第三提示信息522A、第四提示信息522B、第五提示信息522C均位于第一显示区域。图18的(A)到图18的(C)的过程,和上图17的(A)到图17的(C)的过程类似,只 是作用于第五提示信息522C的拖拽操作的拖拽方向不同,图18中,该拖拽操作用于将第五提示信息522C从第一显示区域拖拽至第二显示区域。分屏的显示窗口也不同,图18中,用于显示原用户界面520的显示窗口为第一显示区域,用于显示第五提示信息522C以及对应的返回界面的为显示窗口为第二显示区域。图18中,移动控件1910位于弯折线上,但具体功能和图17所示的移动控件1830一致。具体过程可参见图17所示说明,不再赘述。
在一些实施例中,电子设备可以接收作用于第一显示区域的快速返回操作,例如作用于第三提示信息522A的触摸操作,响应于该触摸操作,返回显示第三提示信息522A对应的返回界面,或者作用于第四提示信息522B的触摸操作,响应于该触摸操作,返回显示第四提示信息522B对应的返回界面。
图17-图18以用户想要返回的界面为第五提示信息522C对应的返回界面为例进行说明,在具体实现中,用户想要返回的界面也可以是第三提示信息522A或第四提示信息522B对应的返回界面,具体过程和上图17-图18类似,不再赘述。
不限于图18列举的示例,在具体实现中,折叠屏分屏也可以是上下分屏,本申请对分屏的具体显示方式不作限定。折叠屏也可以是刚性屏和柔性屏、链条等连接组件拼接而成的显示屏,电子设备的两面可以均配置有显示屏,本申请对显示屏的具体结构不作限定。
在一些实施例中,用户使用应用的过程中,可能会从当前应用的用户界面跳转到其他应用的用户界面,具体示例如下图19所示。
请参见图19,图19示例性示出又一种界面跳转的用户界面示意图。
如图19的(A)所示,电子设备可以显示用户界面2510。在一些实施例中,用户界面2510可以是电子设备响应于作用于视频应用的图标的用户操作(例如触摸操作),显示的视频应用的主界面,可选地,视频应用的图标为电子设备的桌面上的图标,例如图3所示的用户界面200上的视频应用220A。用户界面2510可以包括例如搜索栏,推荐视频2511,推荐视频列表和页面选项等,推荐视频列表可以包括例如多个视频的名称和封面图片。
在一些实施例中,假设用户想要查看推荐视频2511对应的“视频E”,电子设备可以接收作用于推荐视频2511的用户操作(例如触摸操作),响应于该用户操作,显示推荐视频2511对应的“视频E”的内容,例如图19的(B)所示的用户界面2520。
如图19的(B)所示,用户界面2520可以包括“视频E”的视频内容,以及详细信息(例如名称、说明、发布者等)。用户界面2520还可以包括“视频E”的相关信息,例如根据“视频E”推荐的其他视频的信息,如视频选项2521包括“视频F”的名称、发布者、封面图片等。
在一些实施例中,假设用户想要查看视频选项2521对应的“视频F”,电子设备可以接收作用于视频选项2521的用户操作(例如触摸操作),响应于该用户操作,显示视频选项2521对应的“视频F”的内容,例如下图19的(C)所示的用户界面2530。
如图19的(C)所示,用户界面2530可以包括“视频F”的视频内容,以及详细信息(例如名称、说明、发布者等)。用户界面2530还可以包括“视频F”的相关信息,例如根据“视频F”推荐的其他视频的信息(如名称、发布者、封面图片等),例如针对“视频F”的购物选项2531,购物选项2531可以包括购物应用的图标和说明(包括文字:“点击购买视频同款”)。
在一些实施例中,电子设备可以接收作用于购物选项2531的用户操作(例如触摸操作),响应于该用户操作,显示和“视频F”关联的购物应用的用户界面,例如视频内容中出现过的商品“裤装G”的详细信息,例如图19的(D)所示的用户界面430,即图4的(D)所示的用户界面430。图19的(D)所示的用户界面430可以继续跳转至图19的(E)所示的 用户界面510、图19的(F)所示的用户界面520,该过程和上图4的(D)所示的用户界面430跳转至图4的(E)所示的用户界面510、图4的(F)所示的用户界面520的跳转过程一致,不再赘述。
在一些实施例中,电子设备可以响应于接收的不同类型的快速返回操作,分别返回显示不同应用的用户界面,例如,电子设备可以响应于接收的第一快速返回操作,直接返回显示购物应用中第一个打开的用户界面,即图19的(D)所示的用户界面430,电子设备可以响应于接收的第二快速返回操作,直接返回显示视频应用的主界面,即图19的(A)所示的用户界面2510,具体示例可参见下图20。
请参见图20,图20示例性示出又一种返回操作的示意图。
如图20的(A)所示,电子设备显示用户界面520时,可以接收作用于返回区域2且滑动距离为第一距离的滑动操作,此时用户界面520保持不变。电子设备可以继续接收上述作用于返回区域2的滑动操作,但此时滑动距离变更为第二距离,第二距离大于第一距离。响应于该滑动操作,电子设备可以在用户界面520上显示第六提示信息523A和第七提示信息523B,具体如图20的(B)所示。这两个提示信息可以位于用户手指触摸位置的附近,例如触摸位置的右侧。这两个提示信息可以分别对应两种类型的返回操作,用于分别返回不同应用的用户界面,这两个提示信息可以包括返回界面的应用的图标。第六提示信息523A包括购物应用的图标,第七提示信息523B包括视频应用的图标,电子设备可以接收作用于第六提示信息523A的触摸操作,具体如图20的(C)所示,作用于第七提示信息523B的触摸操作类似。电子设备可以响应于作用于第六提示信息523A的触摸操作,返回显示购物应用中第一个打开的用户界面,即图19的(D)所示的用户界面430。电子设备可以响应于作用于第七提示信息523B的触摸操作,返回显示视频应用的主界面,即图19的(A)所示的用户界面2510。
其他示例和上图6-图18所示的一个应用的快速返回界面的实施例类似,不再一一示例。
在一些实施例中,上述提示信息可以基于返回界面分析得到的,例如返回界面的标识名称(如上图6的(C)所示的用户界面430中,第一提示信息434为“返回主界面”,对应的返回界面为购物应用的主界面),例如对返回界面语义分析得到的(如返回界面为上图6的(A)所示的用户界面520时,提示信息可以包括商品名称:“连衣裙B”),例如对返回界面图像分析得到的(如返回界面为上图6所示的用户界面520、530时,提示信息可以包括商品图片)。在另一些实施例中,上述提示信息也可以是电子设备根据返回界面的应用类型确定的图标,例如从应用程序图标库中确定的应用程序的图标(如上图10-图11中,第二提示信息521为购物应用的图标,对应的返回界面为购物应用的主界面)。本申请对提示信息的具体表达方式不作限定。
不限于上述示例,电子设备也可以响应于接收的触发操作,显示提示信息,触发操作例如从屏幕右边缘向内水平滑动的操作,从屏幕左边缘向内的长滑动操作等等,本申请对触发显示提示信息的具体方式不作限定。
不限于上述示例,快速返回操作也可以是滑动距离较长的长滑动操作,本申请对快速返回操作的具体类型不作限定。
不限于上述示例,图4所示实施例中,还可以跳转显示更多的用户界面,例如图4的(A)到图4的(D)之间还有多个用户界面,图4的(D)到图4的(F)之间还有多个用户界面。因此,图5所示实施例中,用户需执行更多的返回操作,以及返回显示更多的用户界面,才能返回到图5的(F)所示的用户界面300。图6和图8所示实施例中,电子设备可以响应于 快速返回操作,返回更多的用户界面。图19所示实施例类似,本申请对跳转显示过的用户界面的数量,返回的用户界面的数量不作限定。
在一些实施例中,电子设备响应于一次返回操作,返回多个界面的功能(简称为快速返回功能),可以默认为开启状态或关闭状态。在另一些实施例中,电子设备也可以响应于用户操作,开启或关闭快速返回功能,具体示例如下图21-图25所示。
请参见图21,图21示例性示出又一种用户界面的示意图。
如图21所示,电子设备可以显示用户界面3000。用户界面3000可以包括页面主题3010(即“快速返回设置”)、总功能选项3020、第一功能选项3030、第二功能选项3040和第三功能选项3050,其中:
总功能选项3020可以包括对应的功能名称(即“快速返回功能”)、功能说明(即“执行一次返回操作返回多个界面”)和开关控件3020A,开关控件3020A用于开启或关闭快速返回功能,电子设备可以接收作用于开关控件3020A的用户操作(例如触摸操作),响应于该用户操作,开启或关闭快速返回功能。
在一些实施例中,快速返回功能可以包括N种类型,例如第一功能选项3030、第二功能选项3040、第三功能选项3050对应的功能。这N种类型的快速返回功能中的M种可以同时生效,也可以仅生效一种,M、N为正整数,N大于或等于M。
第一功能选项3030可以包括对应的功能名称(即“多次普通返回触发快速返回”)、功能说明(即“短时间内执行的返回操作的次数较多时,下一次返回操作可以返回多个界面”)和开关控件3030A。第二功能选项3040可以包括对应的功能名称(即“返回区域决定返回界面”)、功能说明(即“返回操作作用的区域不同时,触发返回的用户界面不同”)和开关控件3040A。第三功能选项3050可以包括对应的功能名称(即“滑动方向决定返回界面”)、功能说明(即“返回操作的滑动方向不同时,触发返回的用户界面不同”)和开关控件3050A。电子设备可以接收作用于这三个功能选项中任意一个开关控件的用户操作(例如触摸操作),响应于该用户操作,开启或关闭对应的快速返回功能。第一功能选项3030对应的功能开启后,快速返回操作的示例可参见上图6。
在一些实施例中,第二功能选项3040对应的功能开启后,电子设备可以显示该功能的具体说明,具体可参见图22所示实施例。
如图22所示,第二功能选项3040的开关控件3040A为开启状态时,第二功能选项3040可以还包括引导示例3040B和返回设置3040C。第二功能选项3040对应的功能开启后,快速返回操作的示例可参见上图7、图8、图13,引导示例3040B和上图7类似。返回设置3040C可以用于设置不同返回区域的大小,不同返回区域对应的返回界面。
在一些实施例中,第三功能选项3050对应的功能开启后,电子设备可以显示该功能的具体说明,具体可参见图23所示实施例。
如图23所示,第三功能选项3050的开关控件3050A为开启状态时,第三功能选项3050可以还包括引导示例3050B和返回设置3050C。第三功能选项3050对应的功能开启后,快速返回操作的示例可参见上图9、图14-图16、图20,引导示例3050B和上图14类似。返回设置3050C可以用于设置返回区域的大小,不同滑动方向对应返回的用户界面。
在一些实施例中,电子设备可以响应于作用于图22所示的返回设置3040C的用户操作(例如触摸操作),显示返回设置的用户界面,具体示例可参见图24。
请参见图24,图24示例性示出又一种用户界面的示意图。
如图24所示,用户界面3100可以包括页面主题3110(即“返回设置”)、左侧返回区域 设置3120和右侧返回区域设置3130,其中:
左侧返回区域设置3120可以包括开关控件3120A,开关控件3120A可以用于在屏幕左边缘启用或取消返回区域。用户界面3100中开关控件3120A为开启状态时,屏幕左边缘示出了返回区域1和返回区域的2,并且左侧返回区域设置3120还包括区域大小设置和返回界面设置。区域大小设置可以包括横向大小设置条3120B和纵向大小设置条3120C,横向大小设置条3120B、纵向大小设置条3120C可以分别用于调整返回区域1和返回区域2在横向的宽度、在纵向的宽度。返回界面设置可以包括对应返回区域1的返回界面的设置选项3120D,以及对应返回区域2的返回界面的设置选项3120E。
右侧返回区域设置3130包括的开关控件3130A可以用于在屏幕右边缘启用或取消返回区域,具体设置和左侧返回区域设置3120类似,不再赘述。
图23所示的返回设置3050C对应的设置和图24所示的设置类似,不再赘述。
在一些实施例中,电子设备还可以响应于用户操作,启用手动收藏返回界面等其他功能,具体示例可参见图25。
请参见图25,图25示例性示出又一种用户界面的示意图。
如图25所示,用户界面3000可以为:电子设备响应于作用于图21所示的用户界面3000的滑动操作(例如从下往上滑动的操作),显示的用户界面。用户界面3000还可以包括第四功能选项3060、第五功能选项3070和应用选项3080,其中:
第四功能选项3060可以包括对应的功能名称(即“跨应用返回”)、功能说明(即“快速返回操作可以快速返回拉起前台应用的后台应用的主界面”)和开关控件3060A,其中,前台应用为用户可见且可交互的应用,后台应用为用户不可交互的应用。第五功能选项3070可以包括对应的功能名称(即“手动收藏返回界面”)、功能说明(即“快速返回操作可以快速返回用户手动收藏的用户界面”)和开关控件3070A。电子设备可以接收作用于这两个功能选项中任意一个开关控件的用户操作(例如触摸操作),响应于该用户操作,开启或关闭对应的快速返回功能。第四功能选项3060对应的功能开启后,快速返回操作的示例可参见上图20。第五功能选项3070对应的功能开启后,收藏操作和快速返回操作的示例可参见上图12、图15-图16。
应用选项3080可以包括多个应用的快速返回功能的功能开关,例如视频应用的功能开关3080A、购物应用的功能开关3080B、社交应用的功能开关3080C。任意一个应用的功能开关用于用户开启或关闭针对该应用的快速返回功能。在一些实施例中,应用选项3080中的应用可以是电子设备默认设置的,例如,上图3-图20所示的购物应用和视频应用为可以开启快速返回功能的应用。用户使用购物应用和视频应用的过程中,均可以从一个用户界面A开始,中间跳转多个用户界面到另一个用户界面B,并且返回用户界面时需要多次执行普通返回操作才能返回到用户界面A,或者用户界面A和用户界面B之间的显示的用户界面。而通常不可以开启快速返回功能的应用,例如图库应用,通常是从一个用户界面C(例如图片列表)跳转到另一个用户界面D(例如图片A的界面),然后再返回用户界面C,再从用户界面C跳转到另一个用户界面E(例如图片B的界面),对于从用户界面C跳转到的其他用户界面,往往只需要少量的返回操作即可返回到用户界面C。
不限于上述示例,用户还可以设置不同滑动距离对应返回不同的用户界面,是否显示提示信息,提示信息的具体形式等,本申请对用户可以设置的快速返回功能不作限定。
不限于上述示例,电子设备还可以默认开启某些应用(例如购物应用和视频应用)的快速返回功能,或者电子设备可以默认开启所有应用的快速返回功能。本申请对开启快速返回 功能的应用不作限定。
不限于上述列举的用户操作,在具体实现中,普通返回操作和快速返回操作还可以是滑动距离不同,不同类型的快速返回操作还可以是滑动距离不同,本申请对用户操作的具体形式不作限定。
基于上图1、图2A-图2B、图3-图25所示的实施例,接下来介绍本申请提供的快速返回界面的方法。
请参见图26,图26是本申请实施例提供的一种快速返回界面的方法。该方法可以应用于图2A所示的电子设备100。该方法可以应用于图2B所示的电子设备100。该方法可以包括但不限于如下步骤:
S101:电子设备接收普通返回操作。
S102:电子设备接收快速返回操作。
具体地,普通返回操作和快速返回操作可以但不限于满足以下至少一项:作用的区域不同,作用的控件不同,操作方式不同(例如操作方向不同,触摸距离不同)等,具体示例可参见上图3-图25中的普通返回操作和快速返回操作。在一些实施例中,电子设备接收普通返回操作(即S101)后,可以跳转到S103。在另一些实施例中,电子设备接收快速返回操作(即S102)后,可以跳转到S105。
S103:电子设备判断是否满足快速返回的触发条件。
在一些实施例中,电子设备可以判断接收第一预设次数次普通返回操作的时段是否小于或等于第一预设时长,若是则确定满足快速返回的触发条件,否则确定不满足快速返回的触发条件。在另一些实施例中,电子设备可以判断第一预设时长内接收的普通返回操作的次数是否大于或等于第一预设次数,若是则确定满足快速返回的触发条件,否则确定不满足快速返回的触发条件。
在一些实施例中,电子设备确定不满足快速返回的触发条件时,可以跳转到S104。在另一些实施例中,电子设备确定满足快速返回的触发条件时,可以跳转到S105。
示例性地,假设执行S101之前电子设备接收了K次普通返回操作,K为正整数,这K次普通返回操作中最早接收到的普通返回操作的时刻为第一时刻,电子设备执行S101的时刻为第二时刻。快速返回的触发条件可以但不限于包括:第一时刻和第二时刻的差值小于或等于第一预设时长,和/或,(K+1)小于或等于第一预设次数。
S104:电子设备执行普通返回方法。
具体地,确定接收普通返回操作且不满足快速返回的触发条件时,电子设备可以返回当前界面的上一级界面(即执行普通返回方法),具体示例可参见上图5。
S105:电子设备执行快速返回方法。
具体地,确定接收普通返回操作且满足快速返回的触发条件,或者,接收快速返回操作时,电子设备可以返回多个用户界面,直接返回显示预设返回界面,具体示例可参见上图6-图18。其中,预设返回界面可以是电子设备在当前界面之前显示过的,除上一级界面外的任意一个用户界面,例如第一个打开的应用界面,例如应用的主界面。在一些实施例中,预设返回界面可以和当前界面属于同一个应用的用户界面,在另一些实施例中,预设返回界面和当前界面属于不同应用的用户界面。
在一些实施例中,预设返回界面可以有多个,在一些实施例中,快速返回操作可以包括多种类型,不同类型的快速返回操作对应返回到不同的用户界面,不同类型的快速返回操作 例如但不限于是作用的区域不同,作用的控件不同,操作方式不同(例如操作方向不同,触摸距离不同)等等。在一些实施例中,不同类型的快速返回操作对应返回的不同的用户界面,可以是同一个应用的,具体示例可参见上图6-图18,在另一些实施例中,也可以是不同应用的,具体示例可参见上图19-图20。
在一种可能的实现方式中,电子设备的软件系统可以是Android系统,可以将电子设备显示的一个用户界面理解为是对应一个Activity,而Activity是通过Task来管理的。Task也可称为回退栈(back stack)。因此,打开一个用户界面,可以理解为是将该用户界面对应的Activity压入Task(即入栈)。执行返回操作以返回当前界面的上一级界面,可以理解为是弹出Task的顶部Activity(也可称栈顶活动)(即当前界面对应的Activity)(即出栈),具体示例可参见上图1。因此,图26所示的快速返回方法用于返回预设返回界面,可以理解为是:快速返回方法用于将Task中预设返回界面对应的Activity之上的多个Activity出栈,以将预设返回界面对应的Activity设置为Task的顶部Activity。
在一些实施例中,假设电子设备运行有第一活动栈,电子设备显示第一应用程序的第二界面时,和第二界面关联的第二活动(也可称为和第二界面对应的第二活动)压入(也可称为进入)第一活动栈,然后,电子设备显示第一应用程序的第一界面时,和第一界面关联的第一活动压入第一活动栈。示例性地,上图4所示过程中,电子设备响应于每次的用户操作(用于打开/跳转到当前显示界面的下一级界面),依次显示用户界面300、用户界面410、用户界面420、用户界面430、用户界面510和用户界面520,也就是将用户界面300、用户界面410、用户界面420、用户界面430、用户界面510和用户界面520对应的Activity压入第一活动栈。其中,用户界面520例如为第一界面(即当前显示界面),则第一活动栈的栈顶活动为用户界面520关联的第一活动。用户界面300例如为第二界面,则第一活动栈的底部Activity(也可称栈底活动)为用户界面300关联的第二活动,不限于此,用户界面410、用户界面420和用户界面430中任意一个界面也可以为第二界面,第二界面关联的第二活动可以理解为是栈中活动(即栈底活动和栈顶活动之外的活动),但可以理解的是,第二活动不为用户界面510(即当前显示界面的上一级界面)关联的活动。
在一些实施例中,电子设备显示第一应用程序的第一界面时,确定接收普通返回操作且不满足快速返回的触发条件时,可以返回第一界面的上一级界面,也就是说,电子设备可以弹出第一活动栈的栈顶活动。示例性地,上图5所示过程,电子设备显示用户界面520时,可以响应于每次的返回操作,依次返回显示用户界面510、用户界面430、用户界面420、用户界面410和用户界面300,也就是依次弹出第一活动栈的栈顶活动,直到栈顶活动为用户界面300关联的活动。示例性地,电子设备可以执行S104所示的普通返回方法,图26所示实施例中,back stack包括更多的Activity,例如为20个Activity,从底部往顶部(即按照进入的顺序,也即按照打开的先后顺序)依次为:Activity1、Activity2、…、Activity19、Activity20,电子设备确定接收普通返回操作且不满足快速返回的触发条件时,可以弹出back stack的栈顶活动:Activity20。上述情况可以理解为是一次普通返回操作出栈一个Activity。
在一些实施例中,电子设备显示第一应用程序的第一界面时,接收第一用户操作,响应于第一用户操作,弹出第一活动栈的至少两个活动。具体地,电子设备显示第一应用程序的第一界面时,第一活动栈的栈顶活动为第一活动。电子设备响应于第一用户操作,弹出第一活动栈中第二活动之后进入的至少两个活动,显示第二界面。
在一些实施例中,第一用户操作为普通返回操作,电子设备接收第一用户操作时确定满足快速返回的触发条件,示例性地,以上图5所示的用户界面为例说明,用户界面520为第 一界面,用户界面300为第二界面。电子设备显示图5的(A)所示的用户界面520时,响应于1秒内执行的2次普通返回操作,在1秒内连续出栈了用户界面520和图5的(B)所示的用户界面510关联的Activity,响应于下1秒内再次接收的普通返回操作(确定满足快速返回的触发条件,也可理解为满足第一预设条件),将用户界面300关联的第二活动之后入栈的多个Activity出栈,即将用户界面430、用户界面420和用户界面410关联的多个Activity出栈,可以理解为是一次返回操作(实际为第3次接收的普通返回操作)出栈3个Activity。
在另一些实施例中,第一用户操作为快速返回操作,示例性地,上图6所示过程中,用户界面520为第一界面,用户界面300为第二界面,电子设备响应于1秒内执行的2次普通返回操作(确定第二数量个第二用户操作满足第二预设条件),在1秒内连续出栈了用户界面510和用户界面520关联的Activity,并且在显示用户界面430时显示第一提示信息434(满足第二预设条件时,显示的第一控件例如为第一提示信息434)。电子设备可以响应于作用于第一提示信息434的用户操作(即快速返回操作),将用户界面300关联的第二活动之后入栈的多个Activity出栈,即将用户界面430、用户界面420和用户界面410关联的多个Activity出栈,可以理解为是一次快速返回操作出栈3个Activity。示例性地,上图8所示过程中,电子设备响应于作用于区域2的滑动操作(即快速返回操作),将用户界面300关联的第二活动之后入栈的多个Activity出栈,即将用户界面520、用户界面410、用户界面430、用户界面420和用户界面410关联的多个Activity出栈,可以理解为是一次快速返回操作出栈5个Activity。其他示例的第一用户操作可参见上图10-图11、图13-图16。
示例性地,电子设备可以执行S105所示的快速返回方法,图26所示实施例中,back stack包括更多的Activity,例如为20个Activity,从底部往顶部(即按照进入的顺序,也即按照打开的先后顺序)依次为:Activity1、Activity2、…、Activity19、Activity20。第一活动为栈顶活动:Activity20,第二活动为栈底活动:Activity20。电子设备确定接收普通返回操作且满足快速返回的触发条件,或者接收快速返回操作时,可以弹出back stack的Activity20之后进入的(即之上)的Activity(即Activity2、…、Activity20)。
在一些实施例中,电子设备可以预设执行快速返回方法后第一活动栈的栈顶活动(即上述第二活动),例如预设执行快速返回方法前第一活动栈的栈底活动为第二活动。
在另一些实施例中,电子设备可以根据Activity的类型确定执行快速返回方法后第一活动栈的栈顶活动(即上述第二活动)。假设Activity的名称包括应用程序的名称(简称包名)和具体名称(简称Activity标记),属于同一个应用程序的Activity的包名相同,但Activity标记不同,不同类型的Activity对应的标记不同。在一些实施例中,电子设备可以记录接收特定操作的用户界面关联的Activity,例如图12所示实施例中,电子设备可以响应于作用于收藏选项424(例如第四控件为收藏选项424)的用户操作,记录用户界面420关联的Activity。在一些实施例中,记录的Activity可以为执行快速返回方法后第一活动栈的栈顶活动。示例性地,电子设备可以记录应用程序的主界面关联的Activity,以及记录接收特定操作的用户界面关联的Activity。电子设备可以根据快速返回操作的类型确定返回界面对应的Activity,具体地,电子设备可以响应于第一快速返回操作,将第一活动栈中应用程序的主界面关联的Activity之上的Activity出栈,即返回到应用程序的主界面。电子设备可以响应于第二快速返回操作,将第一活动栈中接收特定操作的用户界面关联的Activity之上的Activity出栈,即返回到接收特定操作的用户界面。
在另一些实施例中,假设电子设备运行有第一活动栈,电子设备显示第二应用程序的第三界面时,和第三界面关联的第三活动压入第一活动栈,然后,电子设备显示第一应用程序 的第二界面时,和第二界面关联的第二活动压入第一活动栈,然后,电子设备显示第一应用程序的第一界面时,和第一界面关联的第一活动压入第一活动栈。示例性地,上图19所示过程中,电子设备响应于每次的用户操作(用于打开/跳转到当前显示界面的下一级界面),依次显示视频应用的用户界面2510、视频应用的用户界面2520、视频应用的用户界面2530、购物应用的用户界面430、购物应用的用户界面510和购物应用的用户界面520,也就是将用户界面2510、用户界面2520、用户界面2530、用户界面430、用户界面510和用户界面520压入第一活动栈。其中,购物应用的用户界面520例如为第一应用程序的第一界面(即当前显示界面),则第一活动栈的栈顶活动为用户界面520关联的第一活动。购物应用的用户界面430例如为第一应用程序的第二界面,视频应用的用户界面2510例如为第二应用程序的第三界面。
在一些实施例中,电子设备显示第一应用程序的第一界面时,接收第一用户操作。电子设备可以响应于第一用户操作,弹出第一活动栈的至少两个活动,显示第一应用程序的第二界面,或者,电子设备可以响应于第一用户操作,弹出第一活动栈的至少两个活动,显示第二应用程序的第三界面。
在一些实施例中,第一用户操作为普通返回操作,电子设备接收第一用户操作时确定满足快速返回的触发条件,在另一些实施例中,第一用户操作为快速返回操作,具体示例和上述第一活动栈包括第一活动和第二活动的示例类似。
在一些实施例中,显示第二界面之前和显示第二界面之前,接收的第一用户操作的类型不同,例如作用区域、作用控件、操作方向、滑动距离等操作方式不同,例如图13-图14所示的第一快速返回操作和第二快速返回操作。示例性地,图20所示过程中,购物应用的用户界面520为第一应用程序的第一界面,购物应用的用户界面430为第一应用程序的第二界面,视频应用的用户界面2510为第二应用程序的第三界面。电子设备显示图20的(B)所示的用户界面520时,可以显示第六提示信息523A和第七提示信息523B(显示的第一界面中,包括的第二控件例如为第六提示信息523A,第三控件例如为第七提示信息523B),第六提示信息523A为购物应用的图标,用于指示购物应用,第七提示信息523B为视频应用的图标,用于指示视频应用。电子设备可以响应于作用于第六提示信息523A的触摸操作,返回显示购物应用中第一个打开的用户界面,即用户界面430(即第二界面),也就是说,电子设备可以将用户界面430关联的第二活动之后入栈的多个Activity出栈,即将用户界面520和用户界面510关联的2个Activity出栈,可以理解为是一次快速返回操作出栈2个Activity。电子设备可以响应于作用于第七提示信息523B的触摸操作,返回显示视频应用中第一个打开的用户界面,即视频应用的主界面,即用户界面2510(即第三界面),也就是说,电子设备可以将用户界面2510关联的第三活动之后入栈的多个Activity出栈,即将用户界面520、用户界面510、用户界面430、用户界面2530、用户界面2520关联的多个Activity出栈,可以理解为是一次快速返回操作出栈5个Activity。
在一些实施例中,电子设备可以根据Activity对应的应用程序,确定执行快速返回方法后第一活动栈的栈顶活动(即上述第二活动或第三活动)。假设Activity的名称包括应用程序的名称(简称包名)和具体名称(简称Activity标记),属于同一个应用程序的Activity的包名相同。在一些实施例中,电子设备可以识别第一活动栈中Activity的包名是否变化,可选地,电子设备可以记录包名变化后的第一个Activity,可选地,电子设备也可以记录包名变化前第一个入栈的Activity,可选地,记录的Activity可以为执行快速返回方法后第一活动栈的栈顶活动。示例性地,图19所示实施例中,电子设备显示视频应用的用户界面2530时,可 以响应于作用于购物选项2531的用户操作,显示购物应用的用户界面430,此时第一活动栈的栈顶活动的包名从视频应用的包名变为购物应用的包名,则电子设备可以记录包名变化后的第一个Activity:用户界面430关联的第二活动,也可以记录包名变化前第一个入栈的Activity:用户界面2510关联的第三活动(即第一活动栈的栈底活动)。电子设备可以根据快速返回操作的类型确定返回界面对应的Activity,具体地,电子设备可以响应于第一快速返回操作,将第一活动栈中第二活动之上的Activity出栈,即返回到购物应用的用户界面430。电子设备可以响应于第二快速返回操作,将第一活动栈中第三活动之上的Activity出栈,即返回到视频应用的用户界面2510。
在一些实施例中,电子设备可以记录第一活动栈中每个Activity出栈的时间和出栈的Activity的个数,以在确定接收普通返回操作的情况下,根据记录的信息判断是否满足快速返回的触发条件,具体示例如下所示(以下示例以预设返回界面对应的Activity为Activity1为例进行说明):
示例一:假设电子设备接收了K次普通返回操作,K为正整数,电子设备可以响应于每次的返回操作,将第一活动栈中的顶部Activity出栈,可以理解为是执行了K个S101、S103和S104。电子设备可以记录每次Activity出栈的时间,假设记录的出栈时间为[t1,t2,…,t(K)]。然后,假设电子设备在时刻t(K+1)接收第(K+1)次普通返回操作,可以判断(t(K+1)-t(K))是否小于或等于第一预设时长。若电子设备确定(t(K+1)-t(K))小于或等于第一预设时长,则确定满足快速返回的触发条件。因此,电子设备可以响应于第(K+1)次普通返回操作,将第一活动栈中预设返回界面对应的Activity1以上的多个Activity出栈。在一些实施例中,可以理解为是执行了第(K+1)个S101和S103,以及执行了1个S105。
示例二:假设电子设备接收了K次普通返回操作,K为正整数,电子设备可以响应于每次的返回操作,将第一活动栈中的顶部Activity出栈,可以理解为是执行了K个S101、S103和S104。电子设备可以记录每次Activity出栈的时间,假设记录的出栈时间为[t1,t2,…,t(K)]。然后,电子设备可以接收第(K+1)次普通返回操作,响应于第(K+1)次普通返回操作,将第一活动栈中的顶部Activity出栈,并记录出栈时间t(K+1)。若电子设备确定(t(K+1)-t(K))小于或等于第一预设时长,则确定满足快速返回的触发条件。因此,电子设备可以响应于第(K+1)次普通返回操作,将第一活动栈中预设返回界面对应的Activity1以上的多个Activity出栈。在一些实施例中,可以理解为是执行了第(K+1)个S101和S103,以及执行了1个S105。
不限于此,在另一些示例中,电子设备确定满足快速返回的触发条件时,也可以显示提示信息(例如第一控件),该提示信息用于用户确定是否执行快速返回操作,用户确定执行快速返回操作时,电子设备可以执行S102和S103。
在一些实施例中,S101和/或S102之前,该方法还可以包括:确定第一活动栈中Activity的数量大于或等于预设数量阈值。可以理解为是,Activity的数量大于或等于预设数量阈值的back stack可以应用本申请所示的快速返回方法。
在一些实施例中,S101和/或S102之前,该方法还可以包括:确定第一活动栈中Activity关联的用户界面的应用程序为可启用快速返回功能的应用(简称预设应用),可选地,确定第一活动栈中任意一个Activity关联的用户界面的应用程序为预设应用,可选地,确定执行快速返回方法后第一活动栈的栈顶活动关联的用户界面的应用程序为预设应用。可选地,假设Activity的名称包括应用程序的名称(简称包名)和具体名称(简称Activity标记),属于同一个应用程序的Activity的包名相同,但Activity标记不同。则确定预设应用时,电子设备可以判断Activity的包名是否为预设应用的包名。可以理解为是,电子设备上的预设应用可以 应用本申请所示的快速返回方法。可选地,预设应用可以为电子设备上部分或全部的应用。
上图26中任意至少一项为可选的步骤,例如仅包括S102和S105,或者仅包括S101和S104,或者不包括S102。不限于此,还可以是包括S101和S103,并且该方法还可以包括:在确定电子设备满足快速返回的触发条件的情况下,即S103的判断结果为是的情况下,电子设备可以显示提示信息。或者,还可以是在S101和/或S102之前,该方法还可以包括:电子设备显示提示信息。提示信息用于指示快速返回操作。提示信息的示例可参见上图6、图10-图11、图15-图18、图20。
可以理解地,图26所示方法的示例可参见上图3-图25所示实施例。
本申请中,若用户想要返回到预设返回界面,用户只需执行少量的普通返回操作,或执行一次快速返回操作,就能返回到预设返回界面,具体示例可参见下图27-图28。
以下实施例以back stack包括20个Activity,预设返回界面对应Activity为back stack底部的Activity1为例进行说明。
请参见图27,图27示例性示出一种Activity出栈的示意图。
如图27所示,假设快速返回的触发条件为:接收5次普通返回操作的时段的时长小于或等于3秒。当back stack包括20个Activity时,电子设备可以在2秒内依次接收了用户4次的普通返回操作,响应于每次的普通返回操作,将back stack的顶部Activity出栈,即从当前显示界面返回到上一级界面。此时,back stack的顶部Activity为16,电子设备可以在1秒内接收用户第五次的普通返回操作。电子设备确定第4次普通返回操作和第5次普通返回操作的接收时刻的差值小于或等于1秒,即确定满足快速返回的触发条件。电子设备可以响应于第5次的普通返回操作,将back stack中预设返回界面对应的Activity1以上的多个Activity出栈。Activity1以上的多个Activity即为Activity2、Activity3、…、Activity15、Activity16这15个Activity,此时,back stack的顶部Activity为Activity1,电子设备可以显示预设返回界面。用户仅需执行5次普通返回操作,即可达到执行19次普通返回操作才能返回显示的用户界面,操作简单。
在一些实施例中,电子设备可以响应于一次快速返回操作,将back stack中预设返回界面对应的Activity以上的多个Activity按照先进后出的原则依次出栈,该方案可以称为第一出栈方案。在另一些实施例中,电子设备可以响应于一次快速返回操作,先将back stack中预设返回界面对应的Activity和顶部Activity之间的多个Activity出栈,然后再将顶部Activity出栈,该出栈方案可以称为第二出栈方案,具体示例可参见下图28。
请参见图28,图28示例性示出又一种Activity出栈的示意图。
如图28所示,当back stack包括20个Activity时,电子设备可以响应于用户的快速返回操作,将back stack中预设返回界面对应的Activity1和顶部Activity(即Activity20)之间的18个Activity出栈,在一些实施例中,Activity19、Activity18、…、Activity3、Activity2这18个Activity按照先进后出的原则依次出栈。在这个过程中,back stack的顶部Activity保持为Activity20,即电子设备显示的用户界面保持为Activity20对应的用户界面。然后,电子设备可以继续将Activity20出栈,此时,back stack的顶部Activity为Activity1,电子设备可以显示预设返回界面。
不限于图28所示示例,在具体实现中,也可以是Activity19、Activity18、…、Activity3、Activity2这18个Activity按照后进先出的原则依次出栈,还可以是按照任意顺序出栈,本申请对此不作限定。
不限于图28所示示例,在具体实现中,电子设备也可以响应于用户的普通返回操作(且 确定满足快速返回的触发条件),将back stack中预设返回界面对应的Activity和顶部Activity之间的多个Activity出栈,例如图27中,当back stack的顶部Activity为16时,电子设备可以响应于用户第五次的普通返回操作,将back stack中预设返回界面对应的Activity1和顶部Activity(即Activity16)之间的14个Activity出栈,然后再将Activity16出栈。
在一些实施例中,在Android系统中,当用户进入、退出、回到应用(也可以理解为是打开、退出、返回用户界面)时,用户界面对应的Activity经历了生命周期中的不同状态,Android系统调用了一系列生命周期中的方法。可以理解为是每个Activity存在生命周期,具体示例可参见下图29。
请参见图29,图29示例性示出一种Activity的生命周期的示意图。
如图29所示,生命周期的整个过程可以理解为是从创建方法onCreated()开始,到销毁方法onDestroy()结束,用户可以见到Activity,也可以理解为是用户可以见到该Activity对应的用户界面,是从开始方法onStart()到停止方法onStop()之间。用户可以和Activity交互,也可以理解为是用户可以和该Activity对应的用户界面交互,是从恢复方法onResume()到暂停方法onPause()。除此以外,生命周期还可以包括重启方法onRestart(),也就是说,生命周期可以包括七种方法,说明示例如下所示:
创建方法onCreated():在Activity被创建时调用,通常做一些初始化设置。
开始方法onStart():在Activity准备显示在屏幕前调用,调用后Activity处于可见状态。
恢复方法onResume():在Activity获取焦点开始和用户交互时调用。
暂停方法onPause():在当前Activity被其他Activity部分覆盖或锁屏时调用。
停止方法onStop():在Activity对用户处于不可见状态时调用。
销毁方法onDestroy():在Activity即将被销毁时调用。
重启方法onRestart():在Activity从停止(Stopped)状态再次启动时调用。
如图29所示,Activity在不同的方法调用执行后处于不同的状态,生命周期可以包括五中状态,说明示例如下所示:
创建(Created)状态:方法onCreated()执行后Activity所处的状态,Activity处于当前状态时对用户不可见且不可与用户交互。
开始(Started)状态:方法onStart()执行后Activity所处的状态,Activity处于当前状态时对用户可见但不可与用户交互。其中,当Activity处于Created状态时,方法onStart()执行后Activity处于Started状态。当Activity处于Stopped状态时,方法onRestart()、onStart()依次执行后Activity处于Started状态。
恢复(Resumed)状态:也可称为运行(running)状态。方法onResume()执行后Activity所处的状态,Activity处于当前状态时对用户可见且可以与用户交互。其中,方法onResume()执行前,Activity可以处于Started状态或Paused状态。
暂停(Paused)状态:方法onPause()执行后Activity所处的状态,Activity处于当前状态时对用户可见但不可与用户交互。
停止(Stopped)状态:方法onStop()执行后Activity所处的状态,Activity处于当前状态时对用户不可见且不可与用户交互。
销毁(Destroyed)状态:方法onDestroy()执行后Activity所处的状态,Activity处于当前状态时对用户不可见且不可与用户交互。
以下实施例以针对不同的Activity调用生命周期的方法时,方法携带Activity的标识为例进行说明,本申请以Activity(i)为Activity的标识为例进行说明,i为正整数。例如,假设图1 中,针对Activity1调用的生命周期的方法可以表示为:onCreated(Activity1)、onStart(Activity1)、onResume(Activity1)、onPause(Activity1)、onStop(Activity1)、onDestroy(Activity1)、onRestart(Activity1)。
示例性地,在上图1中,Activity1第一次启动,压入back stack时,可以针对Activity1依次调用方法onCreated(Activity1)、onStart(Activity1)、onResume(Activity1),则Activity1的状态可以依次为Created、Started、Resumed。也就是说,当Activity1为back stack的顶部Activity时,状态为Resumed,对用户可见且可以与用户交互。而当Activity2第一次启动,压入back stack时,可以针对Activity1和Activity2依次调用方法onPause(Activity1)、onCreated(Activity2)、onStart(Activity2)、onResume(Activity2)、onStop(Activity1)。此时,Activity2为back stack的顶部Activity,状态为Resumed,对用户可见且可以与用户交互,而Activity1状态为Stopped,对用户不可见且不可与用户交互。然后,当用户执行返回操作,Activity2出栈时,可以针对Activity1和Activity2依次调用方法onPause(Activity2)、onRestart(Activity1)、onStart(Activity1)、onResume(Activity1)、onStop(Activity2)、onDestroy(Activity2)。Activity2被销毁,Activity1重新变为back stack的顶部Activity。
在一些实施例中,采用第一出栈方案时,电子设备可以响应于用户的快速返回操作,将back stack中预设返回界面对应的Activity以上的多个Activity按照先进后出的原则依次出栈,即将Activity20、Activity19、…、Activity3、Activity2依次出栈,以使Activity1为顶部Activity,Activity1对用户可见且可以与用户交互。以Activity20出栈为例,可以针对Activity20和Activity19依次调用方法onPause(Activity20)、onRestart(Activity19)、onStart(Activity19)、onResume(Activity19)、onStop(Activity20)、onDestroy(Activity20),而这样的过程还需执行18次。因此,采用第一出栈方案时,电子设备需调用(19×6)次生命周期的方法,才能使Activity1为顶部Activity。
在一些实施例中,如图28所示,采用第二出栈方案时,电子设备可以响应于用户的快速返回操作,将back stack中预设返回界面对应的Activity1和顶部Activity(即Activity20)之间的18个Activity出栈,在一些实施例中,Activity19、Activity18、…、Activity3、Activity2这18个Activity按照先进后出的原则依次出栈,电子设备可以依次调用方法onDestroy(Activity19)、onDestroy(Activity18)、…、onDestroy(Activity3)、onDestroy(Activity2),共调用了18次生命周期的方法。在这个过程中,back stack的顶部Activity保持为Activity20,即电子设备显示的用户界面保持为Activity20对应的用户界面。然后,电子设备可以继续将Activity20出栈,电子设备可以针对Activity20和Activity1依次调用方法onPause(Activity20)、onRestart(Activity1)、onStart(Activity1)、onResume(Activity1)、onStop(Activity20)、onDestroy(Activity20),共调用了6次生命周期的方法。因此,采用第二出栈方案时,电子设备需调用(18+6)次生命周期的方法,就可以使Activity1为顶部Activity。
可以理解地,(18+6)远小于(19×6),电子设备采用第二出栈方案时所耗费的功耗远远小于采用第一出栈方案时所耗费的功耗,例如减少了90%的功耗。并且,电子设备采用第一出栈方案时,用户执行一次快速返回操作,电子设备显示的用户界面会从Activity20对应的用户界面,依次跳转到Activity1对应的预设返回界面,即电子设备实际显示了20个用户界面(加载了20个用户界面所需的图片、视频等数据),但由于跳转速度过快(跳转时间较短),用户可见的用户界面可能出现闪烁、白屏、卡顿等问题。而电子设备采用第二出栈方案时,用户执行一次快速返回操作,电子设备显示的用户界面会直接从Activity20对应的用户界面跳转到Activity1对应的预设返回界面,即电子设备实际显示了2个用户界面,性能流畅,用 户体验感更好。
示例性地,上图8所示实施例中,电子设备显示用户界面520时,用户界面520和第一活动栈的栈顶活动关联,假设用户界面300和第一活动栈的栈底活动关联,第一活动栈包括的Activity按照从底部往顶部的顺序(即进入的先后顺序)依次为用户界面300、用户界面410、用户界面420、用户界面430、用户界面510和用户界面520关联的Activity。电子设备可以响应于用户的快速返回操作,弹出栈顶活动和栈底活动之间的多个Activity,即对栈顶活动和栈底活动之间的多个Activity分别执行方法onDestroy(),例如依次调用方法onDestroy(用户界面510关联的Activity),onDestroy(用户界面430关联的Activity),onDestroy(用户界面420关联的Activity),onDestroy(用户界面410关联的Activity)。然后,电子设备可以弹出栈顶活动,显示用户界面300,即依次调用方法onPause(用户界面520关联的活动)、onRestart(用户界面300关联的活动)、onStart((用户界面300关联的活动)、onResume((用户界面300关联的活动)、onStop(用户界面520关联的活动)、onDestroy(用户界面520关联的活动)。其他快速返回的用户界面的示例类似,不再赘述。
不限于上述示例,也可以是Activity19、Activity18、…、Activity3、Activity2这18个Activity按照后进先出的原则依次出栈,电子设备可以依次调用方法onDestroy(Activity2)、onDestroy(Activity3)、…、onDestroy(Activity18)、onDestroy(Activity19),还可以是按照任意顺序出栈,本申请对此不作限定。
快速返回方法返回的预设返回界面对应的Activity和Task的顶部Activity之间也可以仅包括一个Activity。
以上实施例以快速返回方法返回的预设返回界面对应back stack中位于底部的Activity1为例进行说明。在具体实现中,快速返回方法返回的预设返回界面对应的back stack中除顶部Activity外的任意一个Activity,例如Activity(2)、Activity(5)等。
本申请中的活动(Activity)可以理解为是一个用户界面,例如显示在整个显示屏上的用户界面,或者显示在显示屏上除状态栏以外的区域的用户界面等。用户界面可以是电子设备响应于接收的用户操作显示的界面,例如上图4所示实施例中,电子设备显示用户界面300时,可以响应于作用于夏季服饰320A的触摸操作,跳转显示用户界面400。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来计算机程序相关的硬件完成,该计算机程序可存储于计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可存储计算机程序代码的介质。

Claims (32)

  1. 一种快速返回界面的方法,其特征在于,应用于电子设备,所述方法包括:
    显示第一应用程序的第一界面,所述第一界面和第一活动关联,所述第一活动为第一活动栈的栈顶活动,所述第一活动栈包括所述第一活动、第二活动和第三活动;
    接收第一用户操作;
    响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,所述第二界面和所述第二活动关联;或,响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示第二应用程序的第三界面,所述第三界面和所述第三活动关联。
  2. 如权利要求1所述的方法,其特征在于,所述显示第一应用程序的第一界面之前,所述方法还包括:
    显示所述第二应用程序的所述第三界面;
    显示所述第一应用程序的所述第二界面,所述第二活动是在所述第一活动进入所述第一活动栈之前进入的,所述第三活动是在所述第二活动进入所述第一活动栈之前进入的。
  3. 如权利要求1或2所述的方法,其特征在于,所述接收第一用户操作之前,所述方法还包括:接收第一数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;
    所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,包括:
    当所述第一数量个所述第二用户操作和所述第一用户操作满足第一预设条件时,响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,所述预设条件为第一接收时刻和所述第一用户操作的接收时刻的差值小于或等于第一时长,所述第一接收时刻为所述第一数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻。
  4. 如权利要求1或2所述的方法,其特征在于,所述接收第一用户操作之前,所述方法还包括:
    接收第二数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;
    当所述第二数量个所述第二用户操作满足第二预设条件时,显示第一控件,所述第二预设条件为第二接收时刻和第三接收时刻的差值小于或等于第二时长,所述第二接收时刻为所述第二数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻,所述第三接收时刻为所述第二数量个所述第二用户操作中最晚接收的所述第二用户操作的接收时刻;
    所述接收第一用户操作,包括:接收作用于所述第一控件的所述第一用户操作。
  5. 如权利要求1或2所述的方法,其特征在于,所述接收第一用户操作,包括:
    接收作用于第一区域的所述第一用户操作,所述第一区域和第二区域不同,所述第二区域为第二用户操作作用的区域,所述第二用户操作用于返回当前显示界面的上一级界面。
  6. 如权利要求1或2所述的方法,其特征在于,所述第一界面包括第二控件和第三控件,所述第二控件用于指示所述第一应用程序,所述第三控件用于指示所述第二应用程序;
    所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应 用程序的第二界面,包括:响应于作用于所述第二控件的所述第一用户操作,弹出所述第一活动栈中所述第二活动之后进入的至少两个活动,显示所述第二界面;或,
    所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示第二应用程序的第三界面,包括:响应于作用于所述第三控件的所述第一用户操作,弹出所述第一活动栈中所述第三活动之后进入的至少两个活动,显示所述第三界面。
  7. 如权利要求6所述的方法,其特征在于,所述第一活动和所述第二活动的名称包括所述第一应用程序的名称,所述显示所述第一应用程序的所述第二界面之前,所述方法还包括:
    显示所述第二应用程序的第四界面,所述第四界面和第四活动关联,所述第四活动的名称包括所述第二应用程序的名称,所述第四活动是在所述第二活动进入所述第一活动栈之前,及所述第三活动进入所述第一活动栈之后进入的;
    所述显示所述第一应用程序的所述第二界面,包括:
    从所述第四界面切换为所述第二界面时,确定所述第二活动为响应于作用于所述第二控件的所述第一用户操作时,显示的用户界面关联的活动;所述第四界面切换为所述第二界面时,所述第一活动栈的栈顶活动从所述第四活动变为所述第二活动,所述第四活动的名称包括的应用程序的名称和所述第二活动的名称包括的应用程序的名称不同。
  8. 如权利要求7所述的方法,其特征在于,所述显示所述第一应用程序的所述第二界面,包括:
    从所述第四界面切换为所述第二界面时,确定所述第三活动为响应于作用于所述第三控件的所述第一用户操作时,显示的用户界面关联的活动,所述第三活动为名称包括所述第二应用程序的名称的多个活动中最早进入所述第一活动栈的活动。
  9. 如权利要求6所述的方法,其特征在于,所述方法还包括:响应于作用于所述第二控件的第三用户操作,分屏显示所述第一界面和所述第二界面;或,
    所述方法还包括:响应于作用于所述第三控件的第四用户操作,分屏显示所述第一界面和所述第三界面。
  10. 如权利要求1或2所述的方法,其特征在于,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,包括:
    响应于所述第一用户操作,弹出第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动,所述第五活动和第五界面关联,所述第五界面为所述第二界面或所述第三界面;
    弹出所述第一活动,显示所述第五界面。
  11. 如权利要求10所述的方法,其特征在于,所述响应于所述第一用户操作,弹出第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动,包括:
    响应于所述第一用户操作,分别对所述第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动执行销毁方法,所述第五活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动处于销毁状态,所述第一活动处于恢复状态,所述第五活动处于停止状态;
    所述弹出所述第一活动,显示所述第五界面,包括:
    对所述第一活动执行暂停方法,所述第一活动处于暂停状态;
    对所述第五活动执行开始方法和重启方法,所述第五活动处于开始状态;
    对所述第五活动执行恢复方法,所述第五活动处于恢复状态;
    对所述第一活动执行停止方法,所述第一活动处于停止状态;
    对所述第一活动执行销毁方法,所述第一活动处于销毁状态。
  12. 如权利要求1或2所述的方法,其特征在于,所述方法还包括:
    响应于第五用户操作,开启第一功能;所述第一功能为所述第一用户操作的作用区域不同时,响应于所述第一用户操作显示的用户界面不同,或,所述第一功能为所述第一用户操作的操作方向不同时,响应于所述第一用户操作显示的用户界面不同。
  13. 如权利要求1或2所述的方法,其特征在于,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动之前,所述方法还包括:
    确定所述第一活动栈包括的活动的数量大于或等于预设数量阈值。
  14. 如权利要求1或2所述的方法,其特征在于,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动之前,所述方法还包括:
    确定所述第一活动栈包括的活动关联的用户界面的应用程序为预设应用。
  15. 如权利要求14所述的方法,其特征在于,所述方法还包括:
    响应于第六用户操作,确定所述第一应用程序和所述第二应用程序为预设应用。
  16. 一种快速返回界面的方法,其特征在于,应用于电子设备,所述方法包括:
    显示第一应用程序的第一界面,所述第一界面和第一活动关联,所述第一活动为第一活动栈的栈顶活动,所述第一活动栈包括所述第一活动和第二活动;
    接收第一用户操作;
    响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,所述第二界面和所述第二活动关联。
  17. 如权利要求16所述的方法,其特征在于,所述显示第一应用程序的第一界面之前,所述方法还包括:
    显示所述第一应用程序的所述第二界面,所述第二活动是在所述第一活动进入所述第一活动栈之前进入的。
  18. 如权利要求16或17所述的方法,其特征在于,所述显示第一应用程序的第一界面时,所述第二活动为所述第一活动栈的栈底活动。
  19. 如权利要求16或17所述的方法,其特征在于,所述接收第一用户操作之前,所述方法还包括:接收第一数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;
    所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,包括:当所述第一数量个所述第二用户操作和所述第一用户操作满足第一预设条件时,响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,所述预设条件为第一接收时刻和所述第一用户操作的接收时刻的差值小于或等于第一时长,所述第一接收时刻为所述第一数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻。
  20. 如权利要求16或17所述的方法,其特征在于,所述接收第一用户操作之前,所述方法还包括:
    接收第二数量个第二用户操作,所述第二用户操作用于返回当前显示界面的上一级界面;
    当所述第二数量个所述第二用户操作满足第二预设条件时,显示第一控件,所述第二预设条件为第一接收时刻和第二接收时刻的差值小于或等于第二时长,所述第一接收时刻为所述第一数量个所述第二用户操作中最早接收的所述第二用户操作的接收时刻,所述第二接收时刻为所述第二数量个所述第二用户操作中最晚接收的所述第二用户操作的接收时刻;
    所述接收第一用户操作,包括:接收作用于所述第一控件的所述第一用户操作。
  21. 如权利要求16或17所述的方法,其特征在于,所述接收第一用户操作,包括:
    接收作用于第一区域的所述第一用户操作,所述第一区域和第二区域不同,所述第二区域为第二用户操作作用的区域,所述第二用户操作用于返回当前显示界面的上一级界面。
  22. 如权利要求16或17所述的方法,其特征在于,所述第一界面包括第二控件,所述第二控件用于指示所述第一应用程序;所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,包括:
    响应于作用于所述第二控件的所述第一用户操作,弹出所述第一活动栈中所述第二活动之后进入的至少两个活动,显示所述第二界面。
  23. 如权利要求16或17所述的方法,其特征在于,所述第二界面包括第四控件,所述方法还包括:
    响应于作用于所述第四控件的第七用户操作,确定所述第二界面为响应于所述第一用户操作时显示的用户界面,所述第一活动栈还包括所述第二活动之前进入的至少一个活动。
  24. 如权利要求16或17所述的方法,其特征在于,所述方法还包括:
    响应于第八用户操作,分屏显示所述第一界面和所述第二界面。
  25. 如权利要求16或17所述的方法,其特征在于,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面,包括:
    响应于所述第一用户操作,弹出所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动;
    弹出所述第一活动,显示所述第二界面。
  26. 如权利要求25所述的方法,其特征在于,所述响应于所述第一用户操作,弹出所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动,包括:
    响应于所述第一用户操作,分别对所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动执行销毁方法,所述第二活动之后所述第一活动之前进入所述第一活动栈中的至少两个活动处于销毁状态,所述第一活动处于恢复状态,所述第二活动处于停止状态;
    所述弹出所述第一活动,显示所述第二界面,包括:
    对所述第一活动执行暂停方法,所述第一活动处于暂停状态;
    对所述第二活动执行开始方法和重启方法,所述第二活动处于开始状态;
    对所述第二活动执行恢复方法,所述第二活动处于恢复状态;
    对所述第一活动执行停止方法,所述第一活动处于停止状态;
    对所述第一活动执行销毁方法,所述第一活动处于销毁状态。
  27. 如权利要求16或17所述的方法,其特征在于,所述方法还包括:
    响应于第五用户操作,开启第一功能;所述第一功能为所述第一用户操作的作用区域不同时,响应于所述第一用户操作显示的用户界面不同,或,所述第一功能为所述第一用户操作的操作方向不同时,响应于所述第一用户操作显示的用户界面不同。
  28. 如权利要求16或17所述的方法,其特征在于,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面之前,所述方法还包括:
    确定所述第一活动栈包括的活动的数量大于或等于预设数量阈值。
  29. 如权利要求16或17所述的方法,其特征在于,所述响应于所述第一用户操作,弹出所述第一活动栈的至少两个活动,显示所述第一应用程序的第二界面之前,所述方法还包括:
    确定所述第一活动栈包括的活动关联的用户界面的应用程序为预设应用。
  30. 如权利要求29所述的方法,其特征在于,所述方法还包括:
    响应于第九用户操作,确定所述第一应用程序为预设应用。
  31. 一种电子设备,其特征在于,包括收发器、处理器和存储器,所述存储器用于存储计算机程序,所述处理器调用所述计算机程序,用于执行如权利要求1-30任一项所述的方法。
  32. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现权利要求1-30任一项所述的方法。
PCT/CN2022/100212 2021-06-26 2022-06-21 一种快速返回界面的方法及电子设备 WO2022268085A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/573,896 US20240211280A1 (en) 2021-06-26 2022-06-21 Quick interface return method and electronic device
EP22827578.0A EP4350513A4 (en) 2021-06-26 2022-06-21 METHOD FOR QUICKLY RETURNING TO AN INTERFACE AND ELECTRONIC DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110715180.1 2021-06-26
CN202110715180.1A CN115525367A (zh) 2021-06-26 2021-06-26 一种快速返回界面的方法及电子设备

Publications (1)

Publication Number Publication Date
WO2022268085A1 true WO2022268085A1 (zh) 2022-12-29

Family

ID=84545148

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100212 WO2022268085A1 (zh) 2021-06-26 2022-06-21 一种快速返回界面的方法及电子设备

Country Status (4)

Country Link
US (1) US20240211280A1 (zh)
EP (1) EP4350513A4 (zh)
CN (1) CN115525367A (zh)
WO (1) WO2022268085A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130696A (zh) * 2023-03-14 2023-11-28 荣耀终端有限公司 应用程序的界面跳转方法、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120036456A1 (en) * 2010-08-03 2012-02-09 Aaron Grunberger Method and system for revisiting prior navigated pages and prior edits
CN104881212A (zh) * 2015-06-26 2015-09-02 深圳市富途网络科技有限公司 用于移动电子设备的显示界面的快捷切换方法及其系统
CN106033372A (zh) * 2015-03-19 2016-10-19 阿里巴巴集团控股有限公司 一种页面切换方法及装置
CN110263273A (zh) * 2019-05-21 2019-09-20 深圳壹账通智能科技有限公司 页面回退方法及相关装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955748B (zh) * 2016-05-06 2019-07-02 青岛海信电器股份有限公司 应用程序的返回场景处理方法及装置
CN112578982A (zh) * 2019-09-29 2021-03-30 华为技术有限公司 一种对电子设备的操作方法及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120036456A1 (en) * 2010-08-03 2012-02-09 Aaron Grunberger Method and system for revisiting prior navigated pages and prior edits
CN106033372A (zh) * 2015-03-19 2016-10-19 阿里巴巴集团控股有限公司 一种页面切换方法及装置
CN104881212A (zh) * 2015-06-26 2015-09-02 深圳市富途网络科技有限公司 用于移动电子设备的显示界面的快捷切换方法及其系统
CN110263273A (zh) * 2019-05-21 2019-09-20 深圳壹账通智能科技有限公司 页面回退方法及相关装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4350513A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130696A (zh) * 2023-03-14 2023-11-28 荣耀终端有限公司 应用程序的界面跳转方法、设备及存储介质

Also Published As

Publication number Publication date
US20240211280A1 (en) 2024-06-27
EP4350513A1 (en) 2024-04-10
EP4350513A4 (en) 2024-09-04
CN115525367A (zh) 2022-12-27

Similar Documents

Publication Publication Date Title
US11496600B2 (en) Remote execution of machine-learned models
US20200310615A1 (en) Systems and Methods for Arranging Applications on an Electronic Device with a Touch-Sensitive Display
US11474626B2 (en) Button functionality
US11048873B2 (en) Emoji and canned responses
US11747975B2 (en) Devices, methods, and graphical user interfaces for touch input processing
US11955100B2 (en) User interface for a flashlight mode on an electronic device
US11323559B2 (en) Displaying and updating a set of application views
WO2023088068A1 (zh) 窗口切换方法、电子设备及可读存储介质
US10838598B2 (en) Focus movement between virtual user interface elements and native user interface elements
US20170357433A1 (en) Application shortcuts for carplay
WO2019080511A1 (zh) 一种多任务管理方法及终端设备
CN113805743B (zh) 切换显示窗口的方法和电子设备
WO2023226455A1 (zh) 应用图标的显示方法、电子设备及可读存储介质
WO2021213449A1 (zh) 一种触控操作方法及设备
EP3304250A1 (en) Content browsing user interface
CN113093955B (zh) 表情符号和预设回复
WO2015183533A1 (en) Device, method, and graphical user interface for navigating a content hierarchy
WO2022268085A1 (zh) 一种快速返回界面的方法及电子设备
WO2024109220A1 (zh) 显示卡片的方法、电子设备及可读存储介质
WO2022252788A1 (zh) 一种控制方法及电子设备
WO2024114234A1 (zh) 一种单手操作方法及电子设备
WO2024001871A1 (zh) 一种操控方法和电子设备

Legal Events

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

Ref document number: 22827578

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022827578

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 18573896

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022827578

Country of ref document: EP

Effective date: 20231218

NENP Non-entry into the national phase

Ref country code: DE