CN114637451B - Display optimization method, device and storage medium during application switching - Google Patents

Display optimization method, device and storage medium during application switching Download PDF

Info

Publication number
CN114637451B
CN114637451B CN202210484262.4A CN202210484262A CN114637451B CN 114637451 B CN114637451 B CN 114637451B CN 202210484262 A CN202210484262 A CN 202210484262A CN 114637451 B CN114637451 B CN 114637451B
Authority
CN
China
Prior art keywords
application
screen
interface
switching
management service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210484262.4A
Other languages
Chinese (zh)
Other versions
CN114637451A (en
Inventor
刘雅坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210484262.4A priority Critical patent/CN114637451B/en
Publication of CN114637451A publication Critical patent/CN114637451A/en
Application granted granted Critical
Publication of CN114637451B publication Critical patent/CN114637451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/04845Interaction 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 for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • 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
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a display optimization method, equipment and storage medium during application switching, which are applied to electronic equipment provided with a hole digging screen, wherein the method comprises the following steps: displaying an interface of a first application; responding to the application switching operation, switching to an interface of a second application, wherein the adaptation states of the first application and the second application to the hole digging screen are different; the display state of the occlusion image is updated on the stencil prior to switching to the interface of the second application. In this embodiment, the electronic device starts updating the display state of the occlusion image on the hole digging screen before switching to the interface of the second application, so as to shorten the time difference between hiding the occlusion image and ending the switching of the application interface, alleviate the visual blocking caused by hiding the occlusion image when switching the application, and improve the use experience of the user.

Description

Display optimization method, device and storage medium during application switching
Technical Field
The present disclosure relates to the field of screen display technologies, and in particular, to a display optimization method, device, and storage medium during application switching.
Background
The screen is a screen structure commonly used in electronic devices such as mobile phones at present, and for the screen device (i.e. the electronic device with the screen), if the currently displayed application interface and the screen are not adapted, the screen device can display a shielding image in the top area and/or the side area of the screen, for example, black bars on the top and the side of the screen, so as to shield the corresponding area, and the non-shielded area on the screen is adapted to the currently displayed application interface.
When the electronic equipment is switched among different applications, the shielding image is required to be displayed or hidden according to whether the switched application interface is suitable for the hole digging screen. For example, when switching from an application of an adaptive hole-digging screen to an application of an adaptive hole-digging screen, the occlusion image needs to be hidden, and when switching from an application of an adaptive hole-digging screen to an application of an adaptive hole-digging screen, the occlusion image needs to be displayed.
In the current electronic device, a longer time difference exists between the display or hiding of the occlusion image and the switching of the application interface, which causes bad use experience for the user.
Disclosure of Invention
The application provides a display optimization method, equipment and a storage medium during application switching, so as to improve the visual experience of electronic equipment when an occlusion image is adjusted.
The first aspect of the present application provides a display optimization method during application switching, applied to an electronic device configured with a hole digging screen, the method comprising:
displaying an interface of a first application;
responding to the application switching operation, and switching to an interface of the second application;
and displaying or hiding a shielding image on the hole digging screen before switching to the interface of the second application according to whether the second application is matched with the hole digging screen.
For example, if the first application is a video application adapted to the hole-digging screen and the second application is a chat application not adapted to the hole-digging screen, the electronic device in this embodiment displays an occlusion image on the hole-digging screen before switching from the interface of the video application to the interface of the chat application; if the first application is a chat application that is not adapted to the hole-digging screen and the second application is a video application that is adapted to the hole-digging screen, the electronic device in this embodiment conceals the occlusion image on the hole-digging screen before switching from the interface of the chat application to the interface of the video application.
The method and the device have the beneficial effects that when the electronic equipment switches between interfaces of different applications, the shielding image can be displayed or hidden on the hole digging screen in advance before the switching of the application interfaces is completed, so that the blocking feeling when the application interfaces are switched is relieved.
In some alternative embodiments, the first application is adapted to the screen and the second application is not adapted to the screen;
the displaying or hiding an occlusion image on the hole digging screen before switching to the interface of the second application includes:
an occlusion image is displayed on the screen prior to switching to the interface of the second application.
That is, upon switching from the application of the adapted hole-digging screen to the application of the non-adapted hole-digging screen, the electronic apparatus displays the shielding image on the hole-digging screen in advance before switching to the interface of the application of the non-adapted hole-digging screen.
In some alternative embodiments, the first application does not adapt the screen and the second application adapts the screen;
the displaying a first application interface includes:
displaying a first application interface and displaying a shielding image on the hole digging screen;
the displaying or hiding an occlusion image on the hole digging screen before switching to the interface of the second application includes:
hiding an occlusion image on the stencil prior to switching to the interface of the second application.
That is, upon switching from an application that does not adapt to a hole-digging screen to an application that adapts to the hole-digging screen, the electronic device hides the occlusion image on the hole-digging screen in advance before switching to the interface of the application that adapts to the hole-digging screen.
In some alternative embodiments, the hiding the occlusion image on the hole digging screen includes:
and gradually reducing the size of the shielding image displayed on the hole digging screen until the shielding image is hidden.
In some alternative embodiments, the hiding the occlusion image on the hole digging screen includes:
And gradually improving the transparency of the shielding image displayed on the hole digging screen until the shielding image is hidden.
In the above embodiment, the advantage of hiding the occlusion image by successively reducing the size or successively increasing the transparency is that: the method can relieve the abrupt sense caused by the abrupt disappearance of the shielding image and improve the visual experience of the user.
In some alternative embodiments, the operating system of the electronic device includes a window management service and a system user interface;
hiding an occlusion image on the hole-digging screen before switching to the interface of the second application, including:
before the window management service plays the application to switch the animation effect, obtaining an occlusion image display strategy of the second application;
the window management service informs the system of hiding the shielding image of the user interface according to the shielding image display strategy of the second application;
the system user interface conceals the occlusion image in response to the notification of the window management service.
In some optional embodiments, the application switching operation is a swipe gesture operation, including a swipe touch gesture and a swipe lift gesture;
The operating system of the electronic device further comprises a desktop;
the responding to the application switching operation, the interface switching to the second application comprises the following steps:
the desktop responds to the horizontal sliding touch gesture, triggers the window management service to inquire and caches an occlusion image display strategy of the second application;
the desktop responds to the horizontal sliding lifting gesture to trigger the window management service to start a window of the second application;
the window management service plays an application switching animation effect.
In some alternative embodiments, the operating system of the electronic device further comprises an application management service;
the desktop responds to the sideslip lifting gesture, triggers the window management service to start a window of the second application, and comprises the following steps:
the desktop responds to the horizontal sliding lifting gesture to inform the application management service to start the second application;
in response to the notification of the desktop, the application management service notifies the window management service to launch a window of the second application.
A second aspect of the present application provides an electronic device comprising a memory and one or more processors;
the memory is used for storing a computer program;
The one or more processors are configured to execute the computer program, and in particular, to implement a display optimization method during application switching provided in any one of the first aspects of the present application.
A third aspect of the present application provides a computer storage medium storing a computer program, which when executed is specifically configured to implement the display optimization method at the time of application switching provided in any one of the first aspects of the present application.
In order to achieve the above object, the present application provides the following technical solutions:
the embodiment of the application provides a display optimization method, equipment and storage medium during application switching, which are applied to electronic equipment provided with a hole digging screen, wherein the method comprises the following steps: displaying an interface of a first application; responding to the application switching operation, switching to an interface of a second application, wherein the adaptation states of the first application and the second application to the hole digging screen are different; the display state of the occlusion image is updated on the stencil prior to switching to the interface of the second application. In this embodiment, the electronic device starts updating the display state of the occlusion image on the hole digging screen before switching to the interface of the second application, so as to shorten the time difference between hiding the occlusion image and ending the switching of the application interface, alleviate the visual blocking caused by hiding the occlusion image when switching the application, and improve the use experience of the user.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic diagram of a user interface of an electronic device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a user interface of another electronic device according to an embodiment of the present application;
fig. 6 is a schematic technical architecture of an electronic device according to an embodiment of the present application;
FIG. 7 is a timing chart of a display optimization method for a hole digging screen according to an embodiment of the present application;
fig. 8 is a signaling diagram of a display optimization method of a hole digging screen according to an embodiment of the present application;
fig. 9 is a flowchart of a display optimization method of a hole digging screen according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include, for example, "one or more" such forms of expression, unless the context clearly indicates to the contrary. It should also be understood that in embodiments of the present application, "one or more" means one, two, or more than two; "and/or", describes an association relationship of the association object, indicating that three relationships may exist; for example, a and/or B may represent: a alone, a and B together, and B alone, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship.
To facilitate an understanding of the present application, terms that may be involved in the present application are first described.
The full-screen device is an electronic device with a higher screen ratio obtained by reducing the size of a frame, the screen ratio is a ratio of a screen area to an area of a front face (generally, the face where a screen is located is the front face) of the electronic device, and the screen ratio of the full-screen device can reach about 80% to 90% by reducing the width of the frame.
The waterfall screen device is a product which is further improved on the basis of the full screen device. The side edge of the screen of the waterfall screen device is provided with a certain radian, so that compared with the full-screen device, the waterfall screen device can completely cancel the frames on two sides of the screen, the screen occupation ratio is further improved, and the screen occupation ratio of the waterfall screen device can reach more than 90%.
In general, the screen of the full-face screen and the waterfall screen device may be provided with a hole digging area, and the shape of the hole digging area may be a circle, a rounded rectangle or other irregular shape, and the hole digging area may be located at one corner of the screen (generally located near the upper left corner) or may be located at the top center of the screen, and the position and the shape of the hole digging area are not limited in this embodiment. Front-mounted devices on the electronic equipment, such as front-facing cameras, proximity sensors, etc., may be mounted in the hollowed-out area. Accordingly, the above-described overall screen and waterfall screen provided with the hole digging region may be collectively referred to as a hole digging screen, and an electronic apparatus configured with a screen as a hole digging screen may be referred to as a hole digging screen apparatus.
The sideslip gesture operation is a gesture for switching applications commonly used in electronic equipment. The electronic device may switch between a plurality of applications previously run in response to a user's swipe gesture operation.
When the user performs the horizontal sliding gesture operation, the user firstly touches the screen with a finger (or a touch pen) and slides horizontally on the screen, along with the sliding of the user, the electronic device can sequentially display cards of applications which have been operated in the last period of time on the screen, for example, after the electronic device is unlocked, weather, navigation, video and chat applications are sequentially operated, when the user touches the screen and slides, the electronic device sequentially displays chat, video, navigation and cards corresponding to weather applications (displayed according to the operation sequence and displayed at first of the cards of the last operated application), and when the user stops sliding and lifts the finger (or the touch pen) from the screen, the electronic device is switched to the application corresponding to the currently displayed card. For example, when the user lifts a finger, the electronic device displays a card of the video application, and the electronic device switches from the current interface to the interface of the video application.
For ease of description, the swipe gesture operation may be divided into a swipe touch gesture including an action in which a finger (or stylus) contacts the screen and slides laterally, and a swipe lift gesture including an action in which the finger (or stylus) stops sliding and lifts from the screen.
The embodiment of the application provides an electronic device 100, which may be a mobile phone, a tablet computer, and other devices.
As shown in fig. 1, the electronic device 100 may include: processor 110, external memory 120, internal memory (also referred to as "memory") 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include any one or more of a variety of sensors including, for example, pressure sensors, gyroscopic sensors, barometric sensors, touch sensors, ambient light sensors, and the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a communication processor (communication processor, CP, which may also be referred to as a modem), a graphics processor (graphics processing unit, GPU), and the like.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the 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 reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The camera 193 may include one or more cameras, for example, the camera 193 may include one or more rear cameras mounted on the back of the electronic device and one or more front cameras mounted on the front of the electronic device (the front side on which the screen is located).
The display 194 may comprise one or more screens. The electronic device displays video, images, and a series of graphical user interfaces through a screen. In some embodiments, the display screen 194 may be combined with a touch screen, and a user may interact with the electronic device by clicking or sliding (with a finger or stylus) on the touch screen.
The above is a specific description of the embodiment of the present application taking the electronic device 100 as an example. It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device provided in the embodiments of the present application may be a User Equipment (UE), for example, a mobile terminal (e.g., a user mobile phone), a tablet computer, a desktop, a laptop, a handheld computer, a netbook, a personal digital assistant (personal digital assistant, PDA), and other devices.
In addition, an operating system is run on the components. Such as the iOS operating system developed by apple corporation, the Android open source operating system developed by google corporation, the Windows operating system developed by microsoft corporation, etc. An operating application may be installed on the operating system.
The operating system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
For example, the electronic device may install a run navigation application, a music application, a chat application, a game application, a video application, and the like.
When the screen of the electronic device is a hole digging screen, the application interfaces of different applications are different in adaptation conditions of the hole digging screen.
There are applications whose application interfaces fit the screen, which can occupy the entire screen, so that the electronic device need not display the occlusion image in the top and side areas of the screen when displaying the application interfaces of the applications.
The application interfaces of other applications are not suitable for the hole digging screen, and when the application interfaces of the unsuitable hole digging screen are displayed on the hole digging screen, the application interfaces cannot occupy the whole screen, so that when the application interfaces of the unsuitable hole digging screen are displayed by the electronic equipment, shielding images are displayed in the top area and/or the side area of the screen, and the unobstructed visible area and the application interfaces on the screen are adapted.
The occlusion image refers to an image displayed by the electronic device in the top area and/or the side area of the screen for occluding the corresponding area. The style and size of the occlusion image may be determined based on a default configuration of the system or may be determined based on user settings.
Taking fig. 2 as an example, a schematic diagram of an application interface and an occlusion image of an unadapted hole digging screen are displayed on the hole digging screen by using the electronic device provided by the application. It can be seen that a hole digging area 201 is provided on the screen of the electronic device 100, and a front camera is installed in the hole digging area 201. The top of the screen, i.e., the area where the hole digging area 201 is located, is the top area 202 of the hole digging screen, and the elongated areas on both sides of the screen are the side areas of the hole digging screen.
When the electronic device 100 opens and runs the chat application, the illustrated chat application interface is displayed on the electronic device's screen. Because the chat application interface is not adapted to the hole-digging screen, the electronic device displays the top black bar 204 as shown in fig. 2 in the top area 202 of the hole-digging screen and displays the side black bar 205 as shown in fig. 2 in the side area 203 of the hole-digging screen, and the top black bar 204 and the side black bar 205 as shown in fig. 2 are a specific implementation form of the occlusion image described in the application.
In addition to the scenario shown in fig. 2, in practical application, when an application interface of the non-adaptive hole-digging screen is displayed, according to an area covered by the application interface on the hole-digging screen, the electronic device may display the shielding image in the top area and the side area at the same time, or may display the shielding image in the top area only, or may display the shielding image in the side area only. In short, the specific position of displaying the occlusion image may be determined according to the currently displayed application interface, which is not limited in this embodiment.
It can be seen that when the electronic device switches from an application that adapts to the hole digging screen to an application that does not, an occlusion image is displayed on the screen, and when the electronic device switches from an application that does not adapt to the hole digging screen to an application that adapts to the hole digging screen, the occlusion image displayed on the screen is hidden.
In the related art, when an electronic device displays or hides an occlusion image following switching of different applications, there are the following problems:
when the current electronic equipment is switched from one application to another application, the display or the hiding of the shielding image on the screen is regulated after the application switching effect is finished, and when the application is switched, the visual effect seen by a user is generally that the interface displayed on the screen jumps after the application switching effect is finished, and the interface displayed with the shielding image is directly switched to the interface hidden with the shielding image or the interface hidden with the shielding image is switched to the interface displayed with the shielding image. The jump after the application switching effect is played can cause visual jamming sense, namely, a user feels that the electronic equipment is jammed and splashed during the application switching process.
Further, since the current electronic device defaults to hide the shielding image on the screen during the application switching effect, after the application switching effect is played, whether to add the shielding image is determined according to the adaptation condition of the switched application interface, so that at most two hops (screen flashing) at least once exist in the whole application switching process.
Aiming at the problems, the application provides a display optimization method during application switching, so as to improve the click feeling and flickering feeling caused during application switching of electronic equipment and improve the use experience of a user.
The following describes a scenario when a mobile phone applying the display optimization method of the present application switches applications, taking a specific electronic device, i.e. a smart phone, as an example.
Referring to fig. 3, an example of a scenario in which a mobile phone switches from an application adapting to a hole digging screen to an application not adapting to the hole digging screen is provided.
When the mobile phone is in a vertical screen state, a user opens a video application installed on the mobile phone, the mobile phone responds to the user operation to start running the video application, and an interface of the video application in a vertical screen mode shown in (1) of fig. 3 is displayed. The video application interface of the vertical screen mode is adapted to the hole digging screen, so that when the video application interface of the vertical screen mode is displayed, a shielding image is not displayed on the hole digging screen.
During running of the video application, the user performs a swipe gesture operation as shown in (1) of fig. 3, and the mobile phone switches from the video application to another application that was last running, in this example, from the video application to the chat application, in response to the swipe gesture operation.
When the mobile phone is switched from one application to another application, a preset application switching animation effect can be played, or the application switching animation effect can not be played, and the specific form of the application switching animation effect can be a default setting form of a system or a form designated by a user.
For example, when the mobile phone switches from the video application to the chat application, the application switching animation effect shown in (2) of fig. 3 may be played, that is, the interface of the cut video application is gradually moved out of the screen to the right side until the interface of the video application disappears, and at the same time, the interface of the cut chat application is moved out of the screen from the left side until the interface of the chat application is completely displayed on the screen.
Because the chat application interface in the vertical screen mode is not adapted to the hole digging screen, when the mobile phone displays the chat application interface in the vertical screen mode, the shielding image is displayed on the hole digging screen, namely, the top black bar and the side black bars shown in (3) of fig. 3 are displayed.
Referring to fig. 4, an example of a scenario in which a mobile phone switches from an application interface of an unadapted hole digging screen to an application interface of an adaptive hole digging screen is provided.
When the mobile phone is in a vertical screen state, the user opens the chat application installed on the mobile phone, the mobile phone starts to run the chat application in response to the user operation, and an interface of the chat application in a vertical screen mode as shown in (1) of fig. 4 is displayed. The vertical mode chat application interface is not adapted to the screen, so when the vertical mode chat application interface is displayed, the phone displays a shielding image on the screen, namely, a top black bar and a side black bar shown in (1) of fig. 4.
During running of the chat application, the user performs a swipe gesture action as shown in fig. 4 (1), in response to which the handset switches from the chat application to another application that was last running, in this example from the chat application to the video application.
When the mobile phone switches from the chat application to the video application, an application switching animation effect shown in (2) of fig. 4 can be played, that is, the interface of the cut chat application gradually moves out of the screen to the right until the interface of the chat application disappears, and meanwhile, the interface of the cut video application moves out of the screen from the left until the user releases his hands, and after the transverse sliding gesture is finished, the interface of the video application is completely displayed on the screen.
Because the video application interface of the vertical screen mode is adapted to the hole digging screen, when the mobile phone displays the video application interface of the vertical screen mode, the shielding image on the hole digging screen is hidden, namely, the top black bar and the side black bars shown in (1) of fig. 4 are hidden.
Referring to fig. 5, an example of a scenario in which a mobile phone switches from an application interface of an unadapted hole digging screen to an application interface of an unadapted hole digging screen is provided.
When the mobile phone is in a vertical screen state, the user opens the chat application installed on the mobile phone, the mobile phone starts to run the chat application in response to the user operation, and an interface of the chat application in a vertical screen mode is displayed as shown in (1) of fig. 5. The vertical mode chat application interface is not adapted to the screen, so when the vertical mode chat application interface is displayed, the phone displays a shielding image on the screen, i.e., the top black bar and the side black bar shown in fig. 5 (1).
During running of the chat application, the user performs a swipe gesture action as shown in fig. 5 (1), in response to which the handset switches from the chat application to another application that was last running, in this example from the chat application to the shopping application.
When the mobile phone is switched from the chat application to the shopping application, an application switching animation effect shown in (2) of fig. 5 can be played, that is, the interface of the cut chat application gradually moves out of the screen to the right until the interface of the chat application disappears, and meanwhile, the interface of the cut shopping application moves out of the screen from the left until the user releases his hands, and after the transverse sliding gesture is finished, the interface of the shopping application is completely displayed on the screen.
Because the shopping application interface in the vertical screen mode is not matched with the hole digging screen, when the shopping application interface in the vertical screen mode is displayed by the mobile phone, the shielding image on the hole digging screen is still displayed, namely the top black bar and the side black bars shown in (1) of fig. 5 are displayed.
As can be seen from fig. 5 (2), in the process of switching from the chat application to the shopping application, the mobile phone continuously displays the top black bar and the side black bar before the user releases his hand, and after the user releases his hand and the interface of the complete shopping application is displayed on the screen, the mobile phone continuously displays the top black bar and the side black bar because the interface of the shopping application is not adapted to the hole digging screen. That is, when the mobile phone is switched between two application interfaces of the unadapted hole digging screen, the application of the scheme can avoid that the shielding image (namely the top black bar and the side black bar) disappears before the user loosens the hands and then appears after the user loosens the hands, so that the blocking and the screen flashing are prevented from happening during the application switching.
In the present application, as an example, the present application defaults to a sideslip gesture operation as an operation for switching the latest application, that is, when the electronic device detects that the user performs the sideslip gesture operation, the electronic device determines that the user intends to switch the latest application. Switching the latest application refers to switching the electronic device from the currently running application to another application that has been running last time, for example, the electronic device runs the application a for a period of time and then runs the application B, and during the running of the application B, the user performs a lateral gesture operation, so that the electronic device switches back to the application a.
In some alternative embodiments, in addition to the above-described lateral sliding gesture operation, the electronic device may also be configured to switch the latest application in response to other actions of the user, such as clicking a virtual key on the screen, or other gesture operations, and the specific form of the operation of switching the latest application is not limited in this embodiment.
In order to more clearly illustrate the display optimization method of the hole digging screen provided in the embodiment of the present application, a technical architecture of the electronic device 100 is illustrated below by taking an Android system with a layered architecture as an example.
Fig. 6 is a schematic technical architecture diagram of the electronic device 100 provided in the present application.
The electronic device may include a hardware layer and a software layer, where an Android system of the layered architecture may include an application layer, an application framework layer, and a kernel layer. In some alternative embodiments, the system of the electronic device may also include levels not mentioned by the above technical architecture, such as Android Runtime (Android run) and system libraries.
The application layer may include a series of application packages such as navigation applications, music applications, video applications, and the like. As shown in FIG. 3, the application package may include video, chat, desktop (launcher), system user interface (SystemUI).
Applications such as navigation, chat, music and video are used to provide corresponding services to users. For example, a user views video using a video application and chat with other users using a chat application.
The desktop is used for displaying application icons of part or all of applications installed on the electronic device, a user can open a corresponding application by clicking the application icons, for example, the desktop displays application icons of video applications, and the user can open the video applications by clicking the icons of the video applications.
The system UI is used for managing a human-computer Interface (UI) of the electronic device, and in this application, the system UI is used for managing display and hiding of an occlusion image of an edge area of the hole digging screen.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in fig. 3, the application framework layer may include a window management service module (Window Manage Service, WMS), an Input management module (also called Input), an application management service module (Application Manage Service, AMS), and the like.
WMSs are used to manage windows. The window manager may obtain the screen size, determine if there is a status bar, lock the screen, intercept the screen, etc. In the application, the WMS may create and manage a window corresponding to an application.
The AMS serves to launch a specific application according to a user's operation. For example, when a user clicks a video application icon of a desktop, the AMS sets a video application to a foreground running state and creates an application stack corresponding to the video application, so that the video application can run normally.
In this embodiment of the present application, the WMS includes a task recording stack, where the task recording stack may record applications that have been run by the electronic device and their sequence within a period of time, and by using the task recording stack, it may be determined which application has been run last time.
As an example, after the user unlocks the electronic device, the navigation application is opened, the video application is opened after a period of time, the chat application is opened after a period of time, and then the chat application is returned to the system desktop from the chat application, the applications are recorded in the task recording stack according to the sequence of the navigation application, the video application and the chat application, and when the user executes the sideslip gesture operation, the electronic device can determine a certain application running before in the task recording stack according to the gesture of the user and switch to the application. For example, in the above example, if the user switches to the last running application through the lateral gesture operation, the electronic device opens the chat application, and if the user switches to the next to last running application through the lateral gesture operation, the electronic device opens the video application.
When the last running application needs to be determined, the latest recorded application is directly searched from the task record stack.
The kernel layer is a layer between hardware and software. In the application, the kernel layer at least comprises a touch driving module and a display driving module.
The display driving module is used for displaying corresponding images on the touch screen according to the modules of the application framework layer and the image data provided by the application programs of the application layer. For example, the video application communicates a frame of image data of the video to a display driver module, which displays a frame of image of the video on the touch screen based on the image data. The SystemUI transmits the image data of the shielding image to the display driving module, and the display driving module displays the shielding image in the designated area of the hole digging screen according to the image data of the shielding image.
The touch control driving module is used for monitoring capacitance values of all areas of the touch screen. When a user clicks or slides on the touch screen, the capacitance value of the clicked or slid area can change, the touch control driving module can monitor the change of the capacitance value of each area on the touch screen and send a capacitance value change message to the input management module, and the capacitance value change message carries information such as the change amplitude of the capacitance value (or a capacitance sampling value) of each area of the touch screen and the change time.
The input management module can determine touch operation according to the reported capacitance value change message, and then sends the identified touch operation to other modules. The touch operation herein may include a click operation, a drag operation, and a specific gesture operation (e.g., a slide-up gesture operation, a slide-down gesture operation, etc.).
For example, in fig. 3 (1), after the user slides laterally from the left side to the right side of the screen, the input management module identifies a sliding gesture according to the reported capacitance value change message, and then reports the sliding gesture to the desktop, so as to trigger the electronic device to execute an instruction for switching the latest application.
Although the Android system is taken as an example for explanation, the basic principle of the embodiment of the present application is equally applicable to electronic devices based on iOS, windows, and other operating systems.
The above technical architecture exemplifies modules and devices in an electronic device that may be involved in the present application. In practical applications, the electronic device may include all or part of the modules and devices of the above technical architecture, and other modules and devices not mentioned in the above technical architecture, and of course, may also include only the modules and devices of the above technical architecture, which is not limited in this embodiment.
The following describes a specific implementation manner of the display optimization method during application switching provided in the embodiment of the present application with reference to the technical architecture of the electronic device shown in fig. 6.
Fig. 7 is a timing chart of a display optimization method during application switching according to an embodiment of the present application.
A01, starting a first application.
An application management service module (hereinafter abbreviated as AMS) executes step a01 to start a first application in response to a user operation.
The first application may be any type of application installed on the electronic device. In connection with the foregoing example, the first application may be a chat application.
When using the electronic device, a user may open an application installed by the electronic device in a variety of ways, for example, clicking on an application icon on a desktop, clicking on a notification message of an application in a message notification bar, and so on.
Taking an application icon of a clicked desktop as an example, after a user clicks one application icon, the input management module identifies the clicking operation of the user, then reports the clicking operation to the desktop, the desktop determines the clicked application icon according to the clicking operation of the user, then finds the application identifier of the corresponding application according to the clicked application icon, and then sends the application identifier to the AMS, so that the AMS starts the clicked application.
As before, in step a01, the AMS may specifically switch the application corresponding to the clicked application icon to the foreground operation, and create an application stack corresponding to the application.
Taking the chat application as an example, a user clicks an icon of the chat application on the desktop, the desktop identifies that the icon of the chat application is clicked according to the reported click operation, then sends an application identifier (for example, an application name) of the chat application to the AMS, and after the AMS receives the application identifier, the AMS executes step a01 to switch the chat application to a foreground operation and creates an application stack of the chat application.
A02, notifying the start window.
After the AMS starts the first application, step a02 is performed to a window management service module (hereinafter, WMS), thereby triggering the WMS to create a window.
In a02, the AMS may send a window-initiation notification to the WMS, where the notification carries an application identifier of the first application initiated by the AMS. After the WMS receives the notification, a window corresponding to the started first application may be created according to the carried application identifier.
A03, notifying the system that the user interface displays the occlusion image.
In step a03, the WMS may first query the first application's occlusion image display policy, and then determine, according to the first application's occlusion image display policy, that an occlusion image needs to be displayed on the screen when the interface of the first application is displayed, so that the WMS sends a message to the system user interface to notify the system user interface to display the occlusion image.
After the window corresponding to the first application is started, the first application which is switched to the foreground operation sends the image data of the application interface to the display driving module, and the display driving module can display the application interface of the started application on the touch screen according to the image data of the application interface.
The WMS records an occlusion image display policy for each application installed by the electronic device, where the occlusion image display policy for each application corresponds to an application identifier for the application. The applied occlusion image display policy is used to indicate whether the interface of the application is adapted to the borehole screen of the electronic device, and by executing a03, the WMS may determine whether the occlusion image needs to be displayed in the top and side regions of the borehole screen when displaying the application interface.
For an application supporting a horizontal screen mode and a vertical screen mode, the interface of the application in the horizontal screen mode and the interface of the application in the vertical screen mode are often different, so that the shielding image display strategy of the application can simultaneously comprise whether the interface of the application horizontal screen mode is suitable for the hole digging screen and whether the interface of the application vertical screen mode is suitable for the hole digging screen.
For an application supporting a horizontal screen mode and a vertical screen mode, in step A03, the WMS can determine whether an interface after the application is started is an interface of the horizontal screen mode or an interface of the vertical screen mode according to whether the electronic equipment is in the horizontal screen state or the vertical screen state currently, so as to query corresponding shielding image display strategies under different modes of the application.
If the application interface displayed after the application is started is not suitable for the hole digging screen, displaying a shielding image in the top area and/or the side area of the hole digging screen when the application interface is displayed; if the application interface displayed after the application is started is matched with the hole digging screen, hiding a shielding image on the hole digging screen when the application interface is displayed.
In some alternative embodiments, for an application interface not adapted to the hole digging screen, the applied occlusion image display policy may specifically indicate an area where an occlusion image needs to be displayed, and the WMS controls the occlusion image display and hiding of the corresponding position according to the occlusion image display policy.
For example, for a waterfall screen, an applied occlusion image display policy may indicate that the interface of the landscape screen mode of the application is not adapted to a hole digging screen, and indicate that an occlusion image needs to be displayed in the top area.
Continuing with the previous example, the first application may be a chat application, and in step a03, the WMS may query an occlusion image display policy of the chat application.
The occlusion image display policy of the chat application may be that the chat application does not adapt to the hole digging screen at the interface of the vertical screen mode, and when displaying the chat application at the interface of the vertical screen mode, the occlusion image needs to be displayed at the top area and the side area of the screen.
After the WMS receives the notification of the window for starting the chat application, it determines that the chat application is started in the vertical screen mode according to the current state of the electronic device, and then determines that black bars as shown in (3) of fig. 3 need to be displayed in the top area and the side area of the screen when the interface of the vertical screen mode of the chat application is displayed based on the above-mentioned occlusion image display policy of chat.
The applied occlusion image display policy may be determined in a variety of ways, and the specific determination manner is not limited in this embodiment.
As one example, the WMS may determine the applied occlusion image display policy as follows:
after the application is installed, the WMS may obtain, through the interface of the application, an adaptation of the interface of the application to the hole digging screen. After the application is installed, the WMS can obtain information of each Activity of the application, namely task information (Activity Inform), wherein the task information comprises the adaptation condition of the interface corresponding to the Activity to the hole digging screen, namely whether the interface corresponding to each Activity is adapted to the hole digging screen or not.
For an application interface that does not fit into a hole-digging screen, the WMS may determine the area where the occlusion image needs to be displayed based on system default configuration information. For example, the configuration information may be that a black edge needs to be displayed in a top area when the application interface of the unadapted hole digging screen is displayed, or that a black edge needs to be displayed in a top area and a side area when the application interface of the unadapted hole digging screen is displayed, or that a black edge needs to be displayed in a side area when the application interface of the unadapted hole digging screen is displayed.
In summary, the WMS may determine the occlusion image display policy of the application according to the adaptation condition of the interface corresponding to the Activity in the task information of the application and the default configuration information.
A04, displaying the occlusion image.
The system user interface performs step a04 to display an occlusion image in response to the notification of WMS in a 03.
In step a04, the system user interface may send the occlusion image data of the WMS designated area to the display driving module of the kernel layer, where the display driving module displays the occlusion image in the corresponding area according to the occlusion image data.
Continuing with the foregoing example, after the WMS determines that it is necessary to display black bars in the top and side regions of the screen when displaying the interface of the chat application portrait mode, the WMS sends a notification to the system user interface to display the top black bars and side black bars, and the system user interface sends image data of the top black bars and side black bars to the display driving module in response to the notification, and the display driving module displays the top black bars and side black bars on the screen as shown in (1) of fig. 4 according to the image data of the top black bars and side black bars.
And A05, reporting a horizontal sliding touch gesture.
During the running of the application, the touch driving module can report the message to the input management module, and the input management module identifies the touch operation executed by the user according to the reported message and then reports the identified touch operation to the desktop.
When the user clicks the screen with a finger (or a touch pen) and starts to slide, the input management module detects a lateral sliding touch gesture operation of the user, executes step A05 and reports the lateral sliding touch gesture to the desktop.
The input management module may be configured with an identifier for indicating each touch operation, and in a specific implementation manner of a05, after the input management module identifies that the user performs the operation of the lateral sliding touch gesture, the input management module sends a message to the desktop, where the message carries the identifier for indicating the lateral sliding touch gesture, and in this way, the input management module can report the lateral sliding touch gesture to the desktop.
A06, inquiring the display strategy of the occlusion image of the application which is possibly switched.
An embodiment of step a06 may be that the desktop determines applications that may be switched according to the user's lateral-sliding touch gesture, and then the WMS queries an occlusion image display policy of the applications that may be switched according to the identification.
Note that a06 may be performed in real time before the end of the swipe gesture operation, that is, before the input management module reports the swipe lift gesture. That is, during the duration of the sideslip touch gesture, the applications that may be switched may change with the sliding of the user, and the desktop may determine the latest applications that may be switched according to the sideslip touch gesture of the user in real time, so as to send the corresponding identifiers to the WMS, so that the WMS queries the occlusion image display policy of the latest applications that may be displayed in real time.
In a06, the desktop specifically may determine the application that may be switched according to the information such as the sliding direction and the sliding distance of the user's lateral sliding touch gesture, where the information such as the sliding direction and the sliding distance may be reported to the desktop by the input management module.
For example, if the sliding direction is sliding to the right, the desktop may determine the previous application as the application that may be switched, and if the sliding direction is sliding to the left, the desktop may determine the next application as the application that may be switched. The former application refers to an application which is recorded in the task recording stack and is operated before the first application which is currently operated, and the latter application refers to an application which is recorded in the task recording stack and is operated after the first application which is currently operated. For example, the electronic device is recorded in the task recording stack to run the navigation application, the video application and the chat application successively, wherein the former application is the navigation application and the latter application is the chat application for the video application.
Continuing the above example, if the user performs the horizontal sliding touch gesture during the running of the chat application by the electronic device, the sliding direction is sliding to the right, then it is determined that the application that may be switched is the video application, and if the user performs the horizontal sliding touch gesture again after switching to the video application, then it is determined that the application that may be switched is the later application in the task recording stack, that is, the chat application.
And A07, reporting a horizontal sliding lifting gesture.
When the user stops sliding on the screen and lifts the finger (or the touch pen) clicking the screen, the input management module detects a lateral sliding lifting gesture of the user, executes step A07 and reports the lateral sliding lifting gesture to the desktop. For a specific embodiment of a07, see a05, that is, the input management module may send a message to the desktop, where the message carries an identifier indicating the sideslip lifting gesture, so as to complete reporting of the sideslip lifting gesture.
And A08, notifying the application management service to start the second application.
In this embodiment, the second application refers to an application that needs to be switched after the user performs the sideslip gesture operation. In connection with the example of fig. 4, during the running of the chat application by the electronic device, the user performs a sideslip gesture operation to switch to the video application, where the chat application in the scene is the first application, and the video application is the second application.
In a08, the desktop may first determine which application the second application is specifically, and then send the corresponding application identification to the AMS, so that the AMS starts the second application. For example, if the desktop determines that the video application is the second application, the desktop sends an application identification of the video application to the AMS in a08, so that the AMS starts the video application.
In some alternative embodiments, the desktop may determine the newly determined application that was potentially switched before the input management module reported the swipe-lift gesture as the second application.
For example, the newly determined application that may be switched before the input management module reports the pan lift gesture is a video application, and after the input management module reports the pan lift gesture, the desktop may determine that the video application is a second application.
And A09, notifying a window for starting the second application.
After the AMS receives the notification of the desktop, it performs step a09 to notify the WMS of a window message that the second application needs to be started. In a09, the AMS may specifically send the application identifier of the second application to the WMS, or may send other messages except for the application identifier of the second application, which is not limited in this embodiment.
Continuing with the previous example, upon receiving a startup application notification carrying an application identifier of a video application, the AMS executes a09 to forward the application identifier of the video application to the WMS.
In some alternative embodiments, the desktop may also directly notify the WMS to launch a window of the second application.
The implementation of steps a05 to a09 is described below in connection with the example of fig. 4:
during the operation of the chat application, the user executes a lateral sliding touch gesture sliding rightward, the input management module executes A05 after detecting the lateral sliding touch gesture, and the lateral sliding touch gesture is reported to the desktop, and meanwhile, the sliding direction is also reported.
The desktop responds to the horizontal sliding touch gesture, and displays the moving effect of the card of the application running in the last period of time, that is, after the input management module reports the horizontal sliding touch gesture, the desktop can sequentially display the card of the application running in the last period of time on the screen along with the sliding of the user.
In a06, the desktop determines that the application that may be switched is the previous application according to the horizontal touch gesture and the sliding direction thereof, so that the desktop informs the WMS to query the previous application for the occlusion image display policy, and the WMS knows that the previous application is the video application according to the task recording stack, so that the WMS queries the video application for the occlusion image display policy.
When the screen of the electronic device displays the card corresponding to the video application, the user stops sliding and lifts the finger contacting the screen, and after the input management module detects the action, the input management module executes A07 and reports the horizontal sliding lifting gesture to the desktop.
When the input management module reports the horizontal sliding lifting gesture, the application which is possibly switched is still a video application, so that the intention corresponding to the horizontal sliding gesture of the desktop user is to switch to the video application, namely, the video application is determined to be a second application, then the desktop executes step A08, and an application identifier of the video application is sent to the AMS, so that the AMS is informed to start the video application.
After the AMS receives the notification, the AMS forwards the application identifier of the video application to the WMS so as to trigger the WMS to start the window of the video application.
A10, obtaining an occlusion image display strategy of the second application.
After the WMS receives the notification of starting the second application window, on the one hand, the corresponding window may be started, and on the other hand, step a10 may be executed to obtain the occlusion image display policy of the second application.
In step a06, the WMS may cache the queried occlusion image display policy when querying the occlusion image display policy of the possibly switched application each time, and the second application is the newly determined possibly switched application before reporting the sideslip lifting gesture. It can be understood that, in this case, the occlusion image display policy that is newly queried and cached by the WMS before the input management module reports the sideslip lifting gesture is the occlusion image display policy applied in the second step a 10.
So while executing a10, WMS may directly read the occlusion image display policy of the second application cached while executing a 06.
The benefit of querying and caching the second applied occlusion image display policy in advance in a06 is that when executing step a10, whether to hide or display the occlusion image can be quickly determined according to the cached occlusion image display policy, so that the system user interface can start hiding the occlusion image as soon as possible, and further shorten the time difference between hiding the occlusion image and ending the application interface switching.
According to an occlusion image display policy of the second application, the WMS may determine whether the second application to be started is adapted to the borehole screen, and further determine whether to display an occlusion image on the borehole screen or to hide the occlusion image on the borehole screen when displaying an interface of the second application.
Similar to a03, if the second application corresponds to two shielding image display strategies, namely a horizontal screen mode and a vertical screen mode, in a10, the WMS may determine whether the current state of the electronic device is horizontal or vertical, and further obtain the corresponding shielding image display strategy.
Continuing with the foregoing example, the occlusion image display policy of the video application may be that the video application adapts the stencil at the interface in portrait mode and the video application does not adapt the stencil at the interface in landscape mode. After receiving the application identifier of the video application sent by the AMS, the WMS determines that the electronic equipment is currently in a vertical screen state, and searches for and obtains an occlusion image display strategy of the vertical screen mode of the video application according to the application identifier of the video application. Because the occlusion image display strategy indicates that the interface of the video application in the portrait mode is adapted to the stencil, when the WMS can determine to display the interface of the video application through a10, the occlusion image on the stencil needs to be hidden.
A11, notifying the system that the user interface conceals the occlusion image.
After determining that the hidden occlusion image is needed when the interface of the second application is displayed, the WMS executes a11, and sends a notification of the hidden occlusion image to the system user interface to trigger the system user interface to hide the occlusion image.
Continuing the previous example, after determining that the hidden occlusion image is needed when the interface of the video application is displayed, the WMS executes a11 to send a notification of the hidden occlusion image to the system user interface to trigger the system user interface to hide the top black bar and the side black bars on the hole digging screen when the interface of the chat application is displayed.
A12, hiding the occlusion image.
After the system user interface receives the notification of the WMS, a12 is executed to hide the occlusion image displayed on the hole-digging screen when the interface of the first application is displayed, and taking fig. 4 as an example, in a12, the system user interface may hide the top black bar and the side black bar of the hole-digging screen.
In step a12, the system user interface may hide the occlusion image on the screen when the interface of the first application is displayed in a plurality of ways, and the embodiment is not limited to a specific way.
In some alternative embodiments, the system user interface may hide the occlusion image displayed on the screen entirely, immediately after notification by the WMS.
In some alternative embodiments, the system user interface may also gradually reduce the size of the occlusion image displayed on the screen after the notification of the WMS is received, that is, reduce the size of the occlusion image once at regular intervals after the notification of the WMS is received, until the occlusion image completely disappears.
In some alternative embodiments, the system user interface may also gradually increase the transparency of the occlusion image displayed on the screen after notification by the WMS, i.e., reduce the size of the occlusion image at regular intervals after notification by the WMS until the occlusion image is completely transparent.
The shielding image is hidden by adopting the mode of gradually reducing the size and gradually improving the transparency, so that the abrupt sense caused by the sudden disappearance of the shielding image can be avoided, and the visual experience of a user is improved.
A13, starting the second application.
The specific start-up procedure of the second application in step a13 may be referred to as step a01.
It should be noted that, the step a13 may be executed simultaneously with the step a10, or may be executed after the step a10 is executed, or may be executed before the step a10, so long as the step a10 is executed before the step a15, and the specific execution sequence is not limited in this embodiment. That is, the AMS may first transmit the application identifier of the second application to the WMS and then start the second application, or may transmit the application identifier of the second application to the WMS in a notification of starting the second application.
The specific embodiment of a13 refers to step a01, and will not be described again.
And A14, playing the application switching animation effect.
In step a14, the WMS may play any form of application switching animation effect according to the user configuration or default setting of the system, which is not limited in this embodiment.
Illustratively, the application switching animation effect played by the WMS in a14 may be as shown in fig. 4.
A specific implementation manner of step a14 may be that the WMS controls the desktop playing application to switch the animation effect by calling a specific function.
The embodiment has the following beneficial effects:
before the application switching animation effect is played, the desktop informs the WMS to query the shielding image display strategy of the second application in advance, so that the WMS can inform the system user interface to hide the shielding image in advance, therefore, in the embodiment, when the electronic equipment is switched from the currently running application to the last running application, the shielding image can be hidden before the application switching animation effect is played, the time difference between the shielding image hiding and the application interface switching ending is shortened, visual blocking caused by shielding image hiding during application switching is relieved, and the use experience of a user is improved.
Furthermore, after the desktop determines the second application to be switched, the system user interface starts to hide the shielding image, and the shielding image is not hidden until the desktop receives the reported horizontal sliding lifting gesture, so that the situation that the shielding image is frequently changed, namely repeatedly appears and disappears during the process of switching from the first application to the second application is avoided, and the visual effect of interface shake caused by the repeated appearance and disappearance of the shielding image during the process of switching the application of the electronic equipment is relieved.
It should be noted that, in the embodiment shown in fig. 7, taking the first application not adapting to the hole digging screen and the second application adapting to the hole digging screen as an example, a method for hiding the occlusion image when the electronic device switches from the first application to the second application in response to the lateral gesture operation is described. It will be appreciated that the method may be equally applicable to a process in which an electronic device switches from a first application that adapts to a hole digging screen to a second application that does not.
For example, in the embodiment shown in fig. 7, only the step a03 is modified to notify the system user interface to hide the occlusion image, the step a04 is modified to hide the occlusion image, the step a11 is modified to notify the system user interface to display the occlusion image, and the step a12 is modified to display the occlusion image, so that a procedure of switching the electronic device from the first application of the adaptive hole digging screen to the second application of the non-adaptive hole digging screen can be obtained, and other steps in the procedure of switching from the first application of the adaptive hole digging screen to the second application of the non-adaptive hole digging screen can be referred to the embodiment shown in fig. 7 and will not be repeated.
When switching from the first application of the adaptive hole-digging screen to the second application of the non-adaptive hole-digging screen, the system user interface can display the shielding image in various modes, and the embodiment is not limited to a specific mode.
In some alternative embodiments, the system user interface may display the occlusion image on the hole-digging screen immediately after notification by the WMS. In connection with the example of fig. 3, the system user interface may display the top black bar and the side black bar in the top and side regions of the screen, respectively, immediately upon notification of the WMS.
In some alternative embodiments, the system user interface may also display the progressively larger occlusion image in the designated area after notification by the WMS until the occlusion image is fully displayed, i.e., until the occlusion image reaches the set point.
In connection with the example of fig. 3, after receiving notification of the WMS, the system user interface may first display narrower top black bars and side black bars in the top and side regions of the screen, and then successively increase the widths of the top black bars and side black bars until the widths of the top black bars and side black bars reach the set values, so that the top black bars and side black bars achieve a visual progressive effect.
In some alternative embodiments, the system user interface may also display the progressively lower transparency occlusion image in the designated area upon notification of the WMS until the occlusion image is completely opaque, i.e., until the transparency of the occlusion image is reduced to 0%.
In connection with the example of fig. 3, after notification of the WMS, the system user interface may first display top black bars and side black bars with higher transparency, for example, top black bars and side black bars with 80% transparency, in the top and side regions of the perforated screen, and then successively decrease the transparency of the top black bars and side black bars until the transparency of the top black bars and side black bars reaches 0%, i.e., completely opaque, so that the top black bars and side black bars reach a visual fade-in effect.
The shielding image is displayed in a mode of gradually increasing the size and gradually reducing the transparency, so that abrupt feeling caused by the sudden appearance of the shielding image can be avoided, and the visual experience of a user is improved.
In general, interactions between modules in an electronic device, and the implementation of the functions of the modules themselves, depend on the invocation of functions in the system. In order to further understand the display optimization method provided by the application, a scenario in which the electronic device shown in fig. 4 is switched from an application interface of an unadapted hole digging screen to an application interface of an adaptive hole digging screen is taken as an example, and a function call relationship inside the electronic device in the process is described below.
Fig. 8 is a signaling diagram of a display optimization method during application switching according to an embodiment of the present application.
As shown in fig. 8, the WMS may specifically include the following components:
the first task management component is also called actigityiskmanager service; an interface information recording component, also called actiglyrecord; a display content component, also known as DisplayContent; the remote animation component is also called RemoteAnimation, the second task management component is also called HwActivityTaskManagerServiceEx, and the telephone window management component is also called HwPhonWindowManager.
When a user touches a screen, the input management module calls 1 a touch event, also called ontouch event () processes an event triggered by the user touching the screen, so that the operation executed by the user is identified as a horizontal touch gesture, and then the input management module calls 2 a touch gesture recognition function, also called detectgesture_down (), and reports the horizontal touch gesture to a desktop.
The procedure of calls 1 and 2 can be regarded as a specific implementation of step a05 in fig. 7.
After receiving the reported horizontal sliding touch gesture, the desktop determines that the intention of the user is to display the latest task, then calls 3, starts the latest task function, also called startreccentActivity (), notifies the first task management component of the WMS of the intention of the user by calling the latest task function, then calls 4, called makevisual (), and sets the application recorded in the interface information recording component as visual by calling the visual function, so that the electronic device can display the application recorded in the interface information recording component on the screen along with the sliding of the user.
After the desktop calls the function 3, the desktop further calls 5 to notify the desktop behavior function, which is also called notify countenaction (), as described above, during the user performs the lateral sliding touch gesture, the desktop determines whether the user intends to switch to the previous application or the next application according to the sliding direction, the sliding distance, and other information, that is, determines whether the application that may be switched in step a06 is the previous application or the next application. And by invoking the notify desktop behavior function, the desktop can notify the first task management component of information to switch to the previous application or the next application.
The first task management component finds an application identifier of a previous application or a next application in the task record stack according to the information provided by the desktop, and then sends the application identifier to the second task management component. And after receiving the application identifier of the application which is possibly switched, the second task management component calls 6 to inquire a top state function, which is also called as queryCutoutStatus (), so that the occlusion image display strategy of the application which is possibly switched can be inquired.
The desktop determines that the application which is possibly switched is the previous application according to the sliding direction of the horizontal sliding touch gesture, then invokes a notification desktop behavior function to transmit the information to a first task management component, the first task management component determines that the previous application is a video application according to task record stack query, then the first task management component sends an application identifier of the video application to a second task management component, and the second task management component invokes a query top state function to query an occlusion image display strategy of the video application.
The procedure of calls 5 and 6 can be regarded as a specific implementation of step a06 in fig. 7.
When the user slides, and the finger leaves the screen, the input management module calls 7, the touch event processes the event triggered by the object leaving the screen, so that the operation executed by the user is identified as a horizontal sliding lifting gesture, and then, the input management module calls 8, a lifting gesture recognition function, also called detectgestme_up (), and reports the horizontal sliding lifting gesture to the desktop.
The procedure of calls 7 and 8 can be regarded as a specific implementation of step a07 in fig. 7.
After receiving the reported horizontal sliding lifting gesture, the desktop calls 9 to start a subsequent task function, also called startnextpositactivity (), so as to inform the first task management component to start the newly determined application which is possible to be switched, that is, start the second application in the step a 08.
In response to the notification of the desktop, the first task management component invokes 10 a visualization function to set the window of the second application to visible, the interface information recording component invokes 11 a switch window focus function, also known as updatefocuswindowlock () switch window focus function, for causing the interface of the second application to be launched to obtain the focus of the screen, and the wms may create and display a window for displaying the interface of the second application on the screen of the electronic device by invoking 10 and 11.
After focus is switched, the display content component invokes 12 an animation function, also known as startAnimation (), which the display content component notifies the remote animation component to initiate remote animation playback.
After the remote animation component obtains the notice of starting the remote animation play, call 13, start the remote animation function, also called startRemoteAnimation (), and through call 13, the remote animation component controls the host to start playing the animation effect switched from the first application to the second application. That is, the animation effect of switching from the first application to the second application starts playing from the time of the call 13.
In this embodiment, the calling process of the functions 12 and 13 can be regarded as a specific implementation of the foregoing step a 14.
After the focus is switched, the display content component also calls 14, obtains a top state function, also called getcutstatus (), and through calling function 14, the display content component obtains an occlusion image display policy of a second application from the second task management component, wherein the occlusion image display policy of the second application is queried by the second task management component when calling function 6.
The process of call 14 may be considered a specific implementation of step a10 described above.
It should be noted that the display content component may be called 12 first, then 14, or may be called 14 first, then 12, or may be called 12 and 14 simultaneously, and the specific order of the embodiment is not limited.
After obtaining the occlusion image display policy of the second application, the display content component determines, according to the occlusion image display policy, that the occlusion image needs to be hidden when the interface of the second application is displayed, and then calls 15 a screen edge filter function, also known as notify control filter for screen (), to notify the phone window management component to hide the occlusion image. The phone window management component invokes 16 a screen edge visualization function, setscreen SideBoxVisiability animation (), in response to the notification, thereby informing the system that the user interface is hiding the occlusion image.
The procedure of calls 15 and 16 can be seen as a specific implementation of step a11 in the embodiment shown in fig. 7.
After the notification of the hidden shielding image is obtained, the system user interface calls 17, opens a hidden animation function, also called StartFadeanimation (), and through calling 17, the system user interface hides the black bar displayed on the top of the screen according to a preset hiding mode, and after the hiding is completed, calls 18, a hidden animation completion function, also called Fadeanimation end (), so as to inform that the black bar on the top of the desktop is completely hidden.
The procedure of calls 17 and 18 can be seen as a specific implementation of step a12 in the embodiment shown in fig. 7.
In this embodiment, before the desktop starts playing the application switching animation effect, that is, before the function 13 is invoked, the display content component notifies the system user interface to start hiding the occlusion image, so that the process of hiding the occlusion image and the process of playing the application switching animation effect can be performed simultaneously, thereby shortening the time difference between hiding the occlusion image and the end of application interface switching, and improving the visual effect when the hole digging screen is switched from the application not adapting to the hole digging screen to the application adapting to the hole digging screen.
According to the foregoing embodiment, a method for optimizing display during application switching may be obtained, and please refer to fig. 9, which is a flowchart of a method for optimizing display during application switching provided in the embodiments of the present application.
S801, displaying an interface of a first application.
Taking fig. 4 as an example, the first application may be a chat application that does not fit into a hole-digging screen. The electronic device displays the occlusion image on the screen while displaying chat applications that do not fit the screen.
Specific embodiments of step S801 may be referred to steps a01 to a04 shown in fig. 7.
S802, responding to the application switching operation, and switching to an interface of a second application, wherein the adaptation states of the first application and the second application to the hole digging screen are different.
Taking fig. 4 as an example, the application switching operation may be a swipe gesture operation performed by the user. The second application may be a video application adapted to a hole digging screen.
Specific embodiments of step S802 can be seen from steps a05 to a09, and steps a13 and a14 shown in fig. 7.
S803, before switching to the interface of the second application, updating the display state of the occlusion image on the hole digging screen.
Taking fig. 4 as an example, the electronic device may hide the occlusion image on the stencil screen before successfully switching to the interface of the video application.
Specific implementation of step S803 can be seen from steps a10 to a12 of the example shown in fig. 7.
The beneficial effects of the above method are the same as those of the embodiment shown in fig. 7, and will not be described again.
Embodiments of the present application provide an electronic device including a memory and one or more processors.
The memory is used for storing a computer program.
The one or more processors are configured to execute the computer program, and in particular, to implement a display optimization method at application switching provided in any embodiment of the present application.
Other structures of the above electronic device may be referred to in fig. 1, and will not be described again.
The embodiment of the application also provides a computer storage medium for storing a computer program, which is specifically used for realizing the display optimization method during application switching provided by any embodiment of the application when being executed.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The plurality of the embodiments of the present application refers to greater than or equal to two. It should be noted that, in the description of the embodiments of the present application, the terms "first," "second," and the like are used for distinguishing between the descriptions and not necessarily for indicating or implying a relative importance, or alternatively, for indicating or implying a sequential order.

Claims (9)

1. A display optimization method when switching applications, wherein the method is applied to an electronic device provided with a hole digging screen, the electronic device comprises a display driving module, a desktop, a window management service and a system user interface, and the method comprises the following steps:
The display driving module displays an interface of a first application;
after the desktop responds to the horizontal sliding touch gesture, the window management service queries and caches the shielding image display strategy of the application which is possibly switched in real time; the application of the possible switching is determined according to the horizontal sliding touch gesture;
if the first application is not adapted to the hole digging screen, the system user interface continuously displays a shielding image on the hole digging screen before the desktop responds to the horizontal sliding lifting gesture;
after the desktop responds to the horizontal sliding lifting gesture, the window management service starts a window of a second application; the second application is an application which is determined to be possibly switched when responding to the horizontal sliding lifting gesture;
the window management service plays an application switching animation effect;
the system user interface displays or hides an occlusion image on the screen before the window management service switches to the interface of the second application, depending on whether the second application is adapted to the screen.
2. The method of claim 1, wherein the first application adapts the scoop screen and the second application does not adapt the scoop screen;
the displaying or hiding an occlusion image on the stencil prior to the window management service switching to the interface of the second application includes:
And displaying an occlusion image on the hole digging screen before the window management service is switched to the interface of the second application.
3. The method of claim 1, wherein the first application does not adapt the scoop screen and the second application adapts the scoop screen;
the interface for displaying the first application comprises:
displaying an interface of a first application, and displaying a shielding image on the hole digging screen;
the displaying or hiding an occlusion image on the stencil prior to the window management service switching to the interface of the second application includes:
hiding an occlusion image on the stencil prior to the window management service switching to the interface of the second application.
4. A method according to claim 3, wherein hiding the occlusion image on the screen comprises:
and gradually reducing the size of the shielding image displayed on the hole digging screen until the shielding image is hidden.
5. A method according to claim 3, wherein hiding the occlusion image on the screen comprises:
and gradually improving the transparency of the shielding image displayed on the hole digging screen until the shielding image is hidden.
6. The method of claim 3, wherein the electronic device comprises a window management service and a system user interface;
hiding an occlusion image on the hole-digging screen before the window management service is switched to the interface of the second application, including:
before the window management service plays the application to switch the animation effect, obtaining an occlusion image display strategy of the second application;
the window management service informs the system of hiding the shielding image of the user interface according to the shielding image display strategy of the second application;
the system user interface conceals the occlusion image in response to the notification of the window management service.
7. The method of claim 1, wherein the electronic device comprises a desktop, an application management service, and a window management service;
after the desktop responds to the horizontal sliding lifting gesture, the window management service starts a window of a second application, and the method comprises the following steps:
the desktop responds to the horizontal sliding lifting gesture to inform the application management service to start the second application;
in response to the notification of the desktop, the application management service notifies the window management service to launch a window of the second application.
8. An electronic device comprising a memory and one or more processors;
the memory is used for storing a computer program;
the one or more processors are configured to execute the computer program, in particular to implement the display optimization method at application switching according to any one of claims 1 to 7.
9. A computer storage medium storing a computer program, which, when executed, is adapted to carry out the display optimization method at application switching according to any one of claims 1 to 7.
CN202210484262.4A 2022-05-06 2022-05-06 Display optimization method, device and storage medium during application switching Active CN114637451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210484262.4A CN114637451B (en) 2022-05-06 2022-05-06 Display optimization method, device and storage medium during application switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210484262.4A CN114637451B (en) 2022-05-06 2022-05-06 Display optimization method, device and storage medium during application switching

Publications (2)

Publication Number Publication Date
CN114637451A CN114637451A (en) 2022-06-17
CN114637451B true CN114637451B (en) 2023-06-20

Family

ID=81953103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210484262.4A Active CN114637451B (en) 2022-05-06 2022-05-06 Display optimization method, device and storage medium during application switching

Country Status (1)

Country Link
CN (1) CN114637451B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016709B (en) * 2022-08-09 2022-12-09 荣耀终端有限公司 Display method of application interface, electronic equipment and storage medium
CN115658213B (en) * 2022-12-02 2023-06-09 荣耀终端有限公司 Display method, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874288A (en) * 2018-06-05 2018-11-23 Oppo广东移动通信有限公司 Application programe switch-over method, device, terminal and storage medium
CN114168031A (en) * 2022-02-11 2022-03-11 荣耀终端有限公司 Display optimization method and device for hole digging screen and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7730401B2 (en) * 2001-05-16 2010-06-01 Synaptics Incorporated Touch screen with user interface enhancement
CN104615362A (en) * 2013-11-05 2015-05-13 英业达科技有限公司 Touch device capable of realizing on the basis of sliding gesture switching program and method thereof
TW201519072A (en) * 2013-11-14 2015-05-16 Inventec Corp Touch device for switching application to execute based on gesture and method thereof
CN106855777A (en) * 2016-12-19 2017-06-16 深圳天珑无线科技有限公司 Interface operation method, device and terminal
CN108446068A (en) * 2018-03-29 2018-08-24 维沃移动通信有限公司 A kind of interface switching method and mobile terminal
CN112748894A (en) * 2019-10-30 2021-05-04 北京小米移动软件有限公司 Hole digging screen display method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874288A (en) * 2018-06-05 2018-11-23 Oppo广东移动通信有限公司 Application programe switch-over method, device, terminal and storage medium
CN114168031A (en) * 2022-02-11 2022-03-11 荣耀终端有限公司 Display optimization method and device for hole digging screen and storage medium

Also Published As

Publication number Publication date
CN114637451A (en) 2022-06-17

Similar Documents

Publication Publication Date Title
JP7114633B2 (en) Screen mirroring method, device, terminal and storage medium
CN114637451B (en) Display optimization method, device and storage medium during application switching
CN109062479B (en) Split screen application switching method and device, storage medium and electronic equipment
WO2021063074A1 (en) Method for split-screen display and electronic apparatus
CN114168031B (en) Display optimization method and device for hole digging screen and storage medium
US9280263B2 (en) Mobile terminal and control method thereof
WO2020038169A1 (en) Icon display method and apparatus, terminal and storage medium
US11138956B2 (en) Method for controlling display of terminal, storage medium, and electronic device
CN111381739B (en) Application icon display method and device, electronic equipment and storage medium
EP3940519A1 (en) Method for displaying application identifier, and terminal apparatus
US20210247888A1 (en) Method and device for controlling a touch screen, terminal and storage medium
CN110147191B (en) Method and device for controlling window and storage medium
CN111597000A (en) Small window management method and terminal
WO2019047187A1 (en) Navigation bar control method and device
CN111708471B (en) Control processing method and related device
CN112764891A (en) Electronic terminal and method for controlling application
CN115963929A (en) VR display method, device and storage medium
CN111045540A (en) Screen touch response method, device, equipment and computer readable medium
CN116028148A (en) Interface processing method and device and electronic equipment
CN114741361A (en) Processing method, intelligent terminal and storage medium
WO2021018248A1 (en) Interface display method and electronic device
WO2021068112A1 (en) Method and apparatus for processing touch event, mobile terminal and storage medium
CN115361468B (en) Display optimization method and device during screen rotation and storage medium
CN116055611B (en) Execution method of drawing operation, electronic device and readable medium
CN116301416B (en) Touch scanning method, touch screen and electronic equipment

Legal Events

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