[go: up one dir, main page]

CN114637451A - 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
CN114637451A
CN114637451A CN202210484262.4A CN202210484262A CN114637451A CN 114637451 A CN114637451 A CN 114637451A CN 202210484262 A CN202210484262 A CN 202210484262A CN 114637451 A CN114637451 A CN 114637451A
Authority
CN
China
Prior art keywords
application
screen
interface
hole
occlusion image
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.)
Granted
Application number
CN202210484262.4A
Other languages
Chinese (zh)
Other versions
CN114637451B (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

Landscapes

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

Abstract

本申请实施例提供一种应用切换时的显示优化方法、设备和存储介质,应用于配置有挖孔屏的电子设备,方法包括:显示第一应用的界面;响应于应用切换操作,向第二应用的界面切换,第一应用和第二应用对挖孔屏的适配状态不同;在切换至第二应用的界面之前,在挖孔屏上更新遮挡图像的显示状态。本实施例中,电子设备在切换至第二应用的界面之前就开始更新挖孔屏上遮挡图像的显示状态,从而缩短了隐藏遮挡图像和应用界面切换结束之间的时间差,缓解了切换应用时隐藏遮挡图像而导致的视觉上的卡顿,改善用户的使用体验。

Figure 202210484262

Embodiments of the present application provide a display optimization method, device, and storage medium during application switching, which are applied to an electronic device configured with a hole-digging screen. The method includes: displaying an interface of a first application; When the interface of the application is switched, the first application and the second application have different adaptation states to the hole-digging screen; before switching to the interface of the second application, the display state of the occlusion image is updated on the hole-digging screen. In this embodiment, the electronic device starts to update the display state of the occlusion image on the hole-digging screen before switching to the interface of the second application, thereby shortening the time difference between hiding the occlusion image and the end of the application interface switching, and easing the need for switching applications. Hide visual stutters caused by occluded images to improve user experience.

Figure 202210484262

Description

应用切换时的显示优化方法、设备和存储介质Display optimization method, device and storage medium when switching applications

技术领域technical field

本申请涉及屏幕显示技术领域,尤其涉及一种应用切换时的显示优化方法、设备和存储介质。The present application relates to the technical field of screen display, and in particular, to a display optimization method, device and storage medium during application switching.

背景技术Background technique

挖孔屏是目前手机等电子设备中经常使用的一种屏幕结构,对于挖孔屏设备(即具有挖孔屏的电子设备),若当前显示的应用界面和挖孔屏不适配,挖孔屏设备可以在屏幕顶部区域和/或侧边区域显示遮挡图像,例如挖孔屏顶部和侧边的黑条,从而遮挡对应区域,屏幕上未被遮挡的区域和当前显示的应用界面适配。Hole-digging screen is a screen structure that is often used in electronic devices such as mobile phones. For hole-digging screen devices (that is, electronic devices with hole-digging screens), if the currently displayed application interface does not fit the hole-digging screen, the hole-digging screen will not be used. The screen device can display occlusion images in the top area and/or side area of the screen, such as black bars on the top and side of the digging screen, so as to block the corresponding area, and the unobstructed area on the screen is adapted to the currently displayed application interface.

电子设备在不同应用间切换时,需要根据切换后的应用界面是否适配挖孔屏来显示或隐藏遮挡图像。例如,从不适配挖孔屏的应用切换到适配挖孔屏的应用时,需要隐藏遮挡图像,从适配挖孔屏的应用切换到不适配挖孔屏的应用时,需要显示遮挡图像。When the electronic device switches between different applications, it is necessary to display or hide the occlusion image according to whether the switched application interface is adapted to the hole-digging screen. For example, when switching from an application that is not suitable for the hole-digging screen to an application that is suitable for the hole-digging screen, the occlusion image needs to be hidden, and when switching from an application that is suitable for the hole-digging screen to an application that is not suitable for the hole-digging screen, it is necessary to display the occlusion. image.

目前的电子设备中,显示或隐藏遮挡图像和应用界面切换之间有较长的时间差,给用户造成不好的使用体验。In the current electronic device, there is a long time difference between displaying or hiding the occlusion image and switching the application interface, which causes a bad use experience to the user.

发明内容SUMMARY OF THE INVENTION

本申请提供了一种应用切换时的显示优化方法、设备和存储介质,以改善电子设备调整遮挡图像时的视觉体验。The present application provides a display optimization method, device and storage medium during application switching, so as to improve the visual experience of the electronic device when adjusting the occlusion image.

本申请第一方面提供一种应用切换时的显示优化方法,应用于配置有挖孔屏的电子设备,所述方法包括:A first aspect of the present application provides a display optimization method during application switching, which is applied to an electronic device equipped with a punch-hole screen, and the method includes:

显示第一应用的界面;displaying the interface of the first application;

响应于应用切换操作,向第二应用的界面切换;In response to the application switching operation, switching to the interface of the second application;

根据所述第二应用是否适配所述挖孔屏,在切换至所述第二应用的界面之前在所述挖孔屏上显示或隐藏遮挡图像。According to whether the second application is adapted to the hole-digging screen, the occlusion image is displayed or hidden on the hole-digging screen before switching to the interface of the second application.

示例性的,若第一应用为适配挖孔屏的视频应用,第二应用为未适配挖孔屏的聊天应用,则本实施例中电子设备在从视频应用的界面切换至聊天应用的界面之前在挖孔屏上显示遮挡图像;若第一应用为未适配挖孔屏的聊天应用,第二应用为适配挖孔屏的视频应用,则本实施例中电子设备在从聊天应用的界面切换至视频应用的界面之前在挖孔屏上隐藏遮挡图像。Exemplarily, if the first application is a video application adapted to the hole-digging screen, and the second application is a chat application that is not adapted to the hole-digging screen, in this embodiment, the electronic device switches from the interface of the video application to the chat application. The occlusion image is displayed on the hole-digging screen before the interface; 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, in this embodiment, the electronic device is running from the chat application. The occlusion image is hidden on the hole-digging screen before switching to the interface of the video application.

本实施例的有益效果在于,电子设备在不同应用的界面之间切换时,能够在完成应用界面的切换之前提前在挖孔屏上显示或隐藏遮挡图像,从而缓解切换应用界面时的卡顿感。The beneficial effect of this embodiment is that when the electronic device switches between the interfaces of different applications, it can display or hide the occlusion image on the hole-digging screen in advance before switching the application interface is completed, thereby alleviating the feeling of stuck when switching the application interface. .

在一些可选的实施例中,所述第一应用适配所述挖孔屏,所述第二应用未适配所述挖孔屏;In some optional embodiments, the first application is adapted to the hole-digging screen, and the second application is not adapted to the hole-digging screen;

所述在切换至所述第二应用的界面之前在所述挖孔屏上显示或隐藏遮挡图像,包括:The displaying or hiding the occlusion image on the hole-digging screen before switching to the interface of the second application includes:

在切换至所述第二应用的界面之前在所述挖孔屏上显示遮挡图像。Before switching to the interface of the second application, an occlusion image is displayed on the punching screen.

也就是说,在从适配挖孔屏的应用向未适配挖孔屏的应用切换时,电子设备在切换至未适配挖孔屏的应用的界面之前提前在挖孔屏上显示遮挡图像。That is to say, when switching from an application adapted to the hole-digging screen to an application not adapted to the hole-digging screen, the electronic device displays the occlusion image on the hole-digging screen in advance before switching to the interface of the application that is not adapted to the hole-digging screen .

在一些可选的实施例中,所述第一应用未适配所述挖孔屏,所述第二应用适配所述挖孔屏;In some optional embodiments, the first application is not adapted to the hole-digging screen, and the second application is adapted to the hole-digging screen;

所述显示第一应用界面,包括:The displaying the first application interface includes:

显示第一应用界面,并在所述挖孔屏上显示遮挡图像;displaying the first application interface, and displaying the occlusion image on the hole-digging screen;

所述在切换至所述第二应用的界面之前在所述挖孔屏上显示或隐藏遮挡图像,包括:The displaying or hiding the occlusion image on the hole-digging screen before switching to the interface of the second application includes:

在切换至所述第二应用的界面之前在所述挖孔屏上隐藏遮挡图像。The occlusion image is hidden on the hole-punch screen before switching to the interface of the second application.

也就是说,在从未适配挖孔屏的应用向适配挖孔屏的应用切换时,电子设备在切换至适配挖孔屏的应用的界面之前提前在挖孔屏上隐藏遮挡图像。That is to say, when switching from an application not adapted to the punching screen to an application adapted to the punching screen, the electronic device hides the occlusion image on the punching screen in advance before switching to the interface of the application adapted to the punching screen.

在一些可选的实施例中,所述在所述挖孔屏上隐藏遮挡图像,包括:In some optional embodiments, the hiding the occlusion image on the hole-digging screen includes:

逐次缩小所述挖孔屏上显示的所述遮挡图像的尺寸,直至所述遮挡图像被隐藏。The size of the occlusion image displayed on the hole-digging screen is successively reduced until the occlusion image is hidden.

在一些可选的实施例中,所述在所述挖孔屏上隐藏遮挡图像,包括:In some optional embodiments, the hiding the occlusion image on the hole-digging screen includes:

逐次提高所述挖孔屏上显示的所述遮挡图像的透明度,直至所述遮挡图像被隐藏。The transparency of the occlusion image displayed on the hole-digging screen is successively increased until the occlusion image is hidden.

上述实施例中,通过逐次缩小尺寸或逐次提高透明度的方式隐藏遮挡图像的好处在于:可以缓解遮挡图像突然消失造成的突兀感,改善用户的视觉体验。In the above embodiment, the advantage of hiding the occlusion image by successively reducing the size or increasing the transparency is that the obtrusiveness caused by the sudden disappearance of the occlusion image can be alleviated, and the user's visual experience can be improved.

在一些可选的实施例中,所述电子设备的操作系统包括窗口管理服务和系统用户界面;In some optional embodiments, the operating system of the electronic device includes a window management service and a system user interface;

所述在切换至所述第二应用的界面之前在所述挖孔屏上隐藏遮挡图像,包括:The hiding the occlusion image on the hole-digging screen before switching to the interface of the second application includes:

所述窗口管理服务播放应用切换动画效果之前,获得所述第二应用的遮挡图像显示策略;Before the window management service plays the application switching animation effect, obtain the occlusion image display strategy of the second application;

所述窗口管理服务根据所述第二应用的遮挡图像显示策略,通知所述系统用户界面隐藏遮挡图像;The window management service notifies the system user interface to hide the occlusion image according to the occlusion image display policy of the second application;

所述系统用户界面响应所述窗口管理服务的通知,隐藏所述遮挡图像。The system user interface hides the occlusion image in response to a notification from the window management service.

在一些可选的实施例中,所述应用切换操作为横滑手势操作,所述横滑手势操作包括横滑触碰手势和横滑抬起手势;In some optional embodiments, the application switching operation is a horizontal sliding gesture operation, and the horizontal sliding gesture operation includes a horizontal sliding touch gesture and a horizontal sliding lift gesture;

所述电子设备的操作系统还包括桌面;The operating system of the electronic device also includes a desktop;

所述响应于应用切换操作,向第二应用的界面切换,包括:The switching to the interface of the second application in response to the application switching operation includes:

所述桌面响应所述横滑触碰手势,触发所述窗口管理服务查询并缓存所述第二应用的遮挡图像显示策略;The desktop responds to the horizontal sliding touch gesture, triggering the window management service to query and cache the occlusion image display policy of the second application;

所述桌面响应所述横滑抬起手势,触发所述窗口管理服务启动所述第二应用的窗口;The desktop responds to the horizontal slide up gesture, triggering the window management service to start the window of the second application;

所述窗口管理服务播放应用切换动画效果。The window management service plays an application switching animation effect.

在一些可选的实施例中,所述电子设备的操作系统还包括应用管理服务;In some optional embodiments, the operating system of the electronic device further includes an application management service;

所述桌面响应所述横滑抬起手势,触发所述窗口管理服务启动所述第二应用的窗口,包括:The desktop, in response to the lateral slide up gesture, triggers the window management service to start the window of the second application, including:

所述桌面响应所述横滑抬起手势,通知所述应用管理服务启动所述第二应用;The desktop responds to the horizontal slide up gesture, notifying the application management service to start the second application;

响应于所述桌面的通知,所述应用管理服务通知所述窗口管理服务启动所述第二应用的窗口。In response to the notification from 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, including a memory and one or more processors;

所述存储器用于存储计算机程序;the memory is used to store computer programs;

所述一个或多个处理器用于执行所述计算机程序,具体用于实现本申请第一方面任意一项所提供的应用切换时的显示优化方法。The one or more processors are configured to execute the computer program, and are specifically configured to implement the display optimization method during application switching provided in any one of the first aspect of this application.

本申请第三方面提供一种计算机存储介质,用于存储计算机程序,所述计算机程序被执行时,具体用于实现本申请第一方面任意一项所提供的应用切换时的显示优化方法。A third aspect of the present application provides a computer storage medium for storing a computer program, and when the computer program is executed, it is specifically used to implement the display optimization method during application switching provided in any one of the first aspect of the present application.

为了实现上述目的,本申请提供了以下技术方案:In order to achieve the above purpose, the application provides the following technical solutions:

本申请实施例提供一种应用切换时的显示优化方法、设备和存储介质,应用于配置有挖孔屏的电子设备,方法包括:显示第一应用的界面;响应于应用切换操作,向第二应用的界面切换,第一应用和第二应用对挖孔屏的适配状态不同;在切换至第二应用的界面之前,在挖孔屏上更新遮挡图像的显示状态。本实施例中,电子设备在切换至第二应用的界面之前就开始更新挖孔屏上遮挡图像的显示状态,从而缩短了隐藏遮挡图像和应用界面切换结束之间的时间差,缓解了切换应用时隐藏遮挡图像而导致的视觉上的卡顿,改善用户的使用体验。Embodiments of the present application provide a display optimization method, device, and storage medium during application switching, which are applied to an electronic device configured with a punch-hole screen. The method includes: displaying an interface of a first application; When the interface of the application is switched, the first application and the second application have different adaptation states to the hole-digging screen; before switching to the interface of the second application, the display state of the occlusion image is updated on the hole-digging screen. In this embodiment, the electronic device starts to update the display state of the occlusion image on the hole-digging screen before switching to the interface of the second application, thereby shortening the time difference between hiding the occlusion image and the end of the application interface switching, and easing the need for switching applications. Hide visual stutters caused by occluded images to improve user experience.

附图说明Description of drawings

图1为本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;

图2为本申请实施例提供的一种电子设备的用户界面示意图;2 is a schematic diagram of a user interface of an electronic device provided by an embodiment of the present application;

图3为本申请实施例提供的另一种电子设备的用户界面示意图;3 is a schematic diagram of a user interface of another electronic device provided by an embodiment of the present application;

图4为本申请实施例提供的再一种电子设备的用户界面示意图;FIG. 4 is a schematic diagram of a user interface of still another electronic device provided by an embodiment of the present application;

图5为本申请实施例提供的又一种电子设备的用户界面示意图;5 is a schematic diagram of a user interface of another electronic device provided by an embodiment of the present application;

图6为本申请实施例提供的一种电子设备的技术架构示意图;6 is a schematic diagram of a technical architecture of an electronic device provided by an embodiment of the present application;

图7为本申请实施例提供的一种挖孔屏的显示优化方法的时序图;7 is a sequence diagram of a display optimization method for a hole-digging screen provided by an embodiment of the present application;

图8为本申请实施例提供的一种挖孔屏的显示优化方法的信令图;FIG. 8 is a signaling diagram of a display optimization method for a hole-digging screen provided by an embodiment of the present application;

图9为本申请实施例提供的一种挖孔屏的显示优化方法的流程图。FIG. 9 is a flowchart of a display optimization method for a hole-digging screen according to an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the following embodiments are for the purpose of describing particular embodiments only, and are not intended to be limitations of the present application. As used in the specification of this application and the appended claims, the singular expressions "a," "an," "the," "above," "the," and "the" are intended to also Expressions such as "one or more" are included unless the context clearly dictates otherwise. It should also be understood that, in this embodiment of the present application, "one or more" refers to one, two or more; "and/or", which describes the association relationship of associated objects, indicates that there may be three kinds of relationships; for example, A and/or B can mean that A exists alone, A and B exist simultaneously, and B exists independently, wherein A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship.

为了便于理解本申请,首先对本申请可能涉及的术语进行说明。In order to facilitate the understanding of the present application, the terms that may be involved in the present application are first explained.

全面屏设备,是指通过缩小边框的尺寸而获得较高的屏占比的电子设备,屏占比,是指屏幕面积和电子设备正面(一般以屏幕所在的一面为正面)的面积的比值,通过缩小边框的宽度,全面屏设备的屏占比可以达到约80%至90%。A full-screen device refers to an electronic device that obtains a higher screen ratio by reducing the size of the frame. The screen ratio refers to the ratio of the screen area to the area of the front of the electronic device (generally the side where the screen is located is the front). By reducing the width of the bezel, the screen-to-body ratio of a full-screen device can reach about 80% to 90%.

瀑布屏设备,是在全面屏设备的基础上进一步改进后的产物。瀑布屏设备的屏幕侧边具有一定的弧度,因而与全面屏设备相比,瀑布屏设备能够完全取消屏幕两侧的边框,进一步提高了屏占比,使得瀑布屏设备的屏占比可以达到90%以上。The waterfall screen device is the product of further improvement on the basis of the full screen device. The side of the screen of the waterfall screen device has a certain arc, so compared with the full screen device, the waterfall screen device can completely cancel the borders on both sides of the screen, further improving the screen ratio, so that the screen ratio of the waterfall screen device can reach 90. %above.

一般的,全面屏和瀑布屏设备的屏幕上可以设置有挖孔区域,该挖孔区域的形状可以是圆形、圆角矩形或其他不规则形状,挖孔区域可以位于屏幕的一角(一般位于靠近左上角的位置),也可以位于屏幕顶部中央的位置,本实施例对挖孔区域的位置和形状均不做限定。电子设备上需要安装在正面的器件,例如前置摄像头,接近光传感器等可以安装在挖孔区域内。因此,设置有挖孔区域的上述全面屏和瀑布屏,可以统称为挖孔屏,配置的屏幕为挖孔屏的电子设备可以称为挖孔屏设备。Generally, the screen of the full-screen and waterfall screen devices can be provided with a punching area. The shape of the punching area can be a circle, a rectangle with rounded corners or other irregular shapes, and the punching area can be located at a corner of the screen (generally located at position close to the upper left corner), or it may be located at the top center of the screen, and the position and shape of the hole-digging area are not limited in this embodiment. Devices that need to be installed on the front of electronic equipment, such as front-facing cameras, proximity light sensors, etc., can be installed in the hole-drilling area. Therefore, the above-mentioned full screen and waterfall screen provided with a hole-digging area may be collectively referred to as a hole-digging screen, and an electronic device equipped with a hole-digging screen may be referred to as a hole-digging screen device.

横滑手势操作,为电子设备中常用的一种切换应用的手势。电子设备可以响应于用户的横滑手势操作,在之前运行过的多个应用之间切换。The horizontal swipe gesture operation is a gesture commonly used in electronic devices to switch applications. The electronic device can switch between multiple previously run applications in response to the user's lateral swipe gesture operation.

用户执行横滑手势操作时,先用手指(或触控笔)接触屏幕并在屏幕上横向滑动,随着用户的滑动,电子设备可以依次在屏幕上显示最近一段时间内运行过的应用的卡片,例如,电子设备解锁后,依次运行过天气,导航,视频和聊天应用,则用户接触屏幕并滑动时,电子设备依次显示聊天,视频,导航和天气应用对应的卡片(按运行先后顺序显示,最后运行的应用的卡片最先显示),当用户停止滑动并从屏幕抬起手指(或触控笔)时,电子设备切换至当前显示的卡片对应的应用。例如,用户抬起手指时电子设备显示视频应用的卡片,则电子设备从当前的界面切换至视频应用的界面。When a user performs a horizontal swipe gesture operation, first touch the screen with a finger (or a stylus) and swipe horizontally on the screen. As the user swipes, the electronic device can sequentially display the cards of the applications that have been running in the recent period on the screen. , for example, after the electronic device is unlocked, the weather, navigation, video and chat applications have been run in sequence, then when the user touches the screen and swipes, the electronic device displays the cards corresponding to the chat, video, navigation and weather applications in sequence (displayed in the running order, The card of the last running application is displayed first), when the user stops swiping and lifts his finger (or stylus) from the screen, the electronic device switches to the application corresponding to the currently displayed card. For example, when the user lifts the finger, the electronic device displays the card of the video application, and the electronic device switches from the current interface to the interface of the video application.

为了便于说明,横滑手势操作可以分为横滑触碰手势和横滑抬起手势,其中横滑触碰手势包括手指(或触控笔)接触屏幕并横向滑动的动作,横滑抬起手势则包括手指(或触控笔)停止滑动并从屏幕抬起的动作。For the convenience of description, the horizontal swipe gesture operation can be divided into a horizontal swipe touch gesture and a horizontal swipe up gesture. This includes the movement of the finger (or stylus) to stop sliding and lift off the screen.

本申请实施例提供一种电子设备100,其具体可以是手机,平板电脑等设备。The embodiment of the present application provides an electronic device 100, which may specifically be a mobile phone, a tablet computer, and other devices.

如图1所示,电子设备100可以包括:处理器110,外部存储器120,内部存储器(也称“内存”)121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identificationmodule,SIM)卡接口195等。其中传感器模块180可以任意一种或多种传感器,如包括压力传感器,陀螺仪传感器,气压传感器,触摸传感器,环境光传感器等。As shown in FIG. 1 , the electronic device 100 may include: a processor 110 , an external memory 120 , an internal memory (also referred to as “memory”) 121 , a universal serial bus (USB) interface 130 , a 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, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191 , indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include any one or more sensors, such as a pressure sensor, a gyroscope sensor, an air pressure sensor, a touch sensor, an ambient light sensor, and the like.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),通信处理器(communication processor,CP,也可以称为调制解调器),图形处理器(graphics processing unit,GPU)等。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a communication processor (communication processor, CP, also referred to as a modem), a graphics processor (graphics processor) processing unit, GPU), etc.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.

摄像头193可以包括一个或多个摄像头,例如,摄像头193可以包括安装于电子设备背面的一个或多个后置摄像头,以及安装于电子设备正面(以屏幕所在的一面为正面)的一个或多个前置摄像头。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 cameras mounted on the front of the electronic device (with the side where the screen is located as the front) Front camera.

显示屏194可以包含一个或多个屏幕。电子设备通过屏幕显示视频,图像以及一系列图形用户界面。在一些实施例中,显示屏194可以和触摸传感器组合为触摸屏,用户可以通过(用手指或触控笔)在触摸屏上点击或者滑动的方式和电子设备交互。Display 194 may contain one or more screens. Electronic devices display video, images, and a series of graphical user interfaces through a screen. In some embodiments, the display screen 194 can be combined with a touch sensor to form a touch screen, and the user can interact with the electronic device by clicking or swiping on the touch screen (with a finger or a stylus).

以上是以电子设备100为例对本申请实施例作出的具体说明。应该理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件,软件,或硬件和软件的组合中实现。The above is a specific description of the embodiments of the present application by 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 . Electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. 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.

本申请实施例提供的电子设备可以是用户设备(user equipment,UE),例如可以为移动终端(例如用户手机)、平板电脑、桌面型、膝上型笔记本电脑、手持计算机、上网本、个人数字助理(personal digital assistant,PDA)等设备。The electronic equipment provided by the embodiments of the present application may be user equipment (UE), for example, may be a mobile terminal (such as a user mobile phone), a tablet computer, a desktop computer, a laptop computer, a handheld computer, a netbook, and a personal digital assistant (personal digital assistant, PDA) and other equipment.

另外,在上述部件之上,运行有操作系统。例如苹果公司所开发的iOS操作系统,谷歌公司所开发的Android开源操作系统,微软公司所开发的Windows操作系统等。在该操作系统上可以安装运行应用程序。In addition, an operating system runs on the above-mentioned components. For example, the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. Applications can be installed and run on this operating system.

电子设备100的操作系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。The operating system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.

例如,上述电子设备可以安装运行导航应用,音乐应用,聊天应用,游戏应用和视频应用等。For example, the above-mentioned electronic device can be installed to run a 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 adapt to the hole-digging screen differently.

有一些应用的应用界面适配挖孔屏,这些应用的应用界面能占满整个挖孔屏,因此电子设备在显示这些应用的应用界面时不需要在屏幕的顶部区域和侧边区域显示遮挡图像。The application interface of some applications is adapted to the hole-punch screen. The application interface of these applications can occupy the entire hole-punch screen. Therefore, when displaying the application interface of these applications, the electronic device does not need to display occlusion images in the top area and side area of the screen. .

而另一些应用的应用界面则不适配挖孔屏,不适配挖孔屏的应用界面在挖孔屏上显示时,应用界面不能占满整个屏幕,因此电子设备在显示这些不适配挖孔屏的应用界面时,会在屏幕顶部区域和/或侧边区域显示遮挡图像,使屏幕上未被遮挡的可视区域和应用界面适配。The application interface of other applications is not suitable for the hole-digging screen. When the application interface that is not suitable for the hole-digging screen is displayed on the hole-digging screen, the application interface cannot occupy the entire screen. When the application interface of the hole screen is used, an occlusion image will be displayed in the top area and/or side area of the screen, so that the unobstructed visible area on the screen can be adapted to the application interface.

遮挡图像是指,电子设备在屏幕的顶部区域和/或侧边区域显示的用于遮挡对应区域的图像。遮挡图像的样式和尺寸,可以基于系统的默认配置确定,也可以基于用户设置确定。The occlusion image refers to an image displayed by the electronic device on the top area and/or the side area of the screen to occlude the corresponding area. The style and size of the occlusion image can be determined based on the default configuration of the system or based on user settings.

以图2为示例,为本申请提供的一种电子设备在挖孔屏上显示未适配挖孔屏的应用界面以及遮挡图像的示意图。可以看出,电子设备100的屏幕上设置有挖孔区域201,挖孔区域201内安装有前置摄像头。屏幕顶部,即挖孔区域201所在的区域为挖孔屏的顶部区域202,屏幕两侧的长条形区域为挖孔屏的侧边区域。Taking FIG. 2 as an example, a schematic diagram of an electronic device displaying an application interface not adapted to the hole-digging screen and blocking images on a hole-digging screen provided by the present 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, that is, the area where the punching area 201 is located is the top area 202 of the punching screen, and the strip-shaped areas on both sides of the screen are the side areas of the punching screen.

电子设备100开启并运行聊天应用时,电子设备的挖孔屏上显示图示的聊天应用的界面。由于聊天应用的界面未适配挖孔屏,电子设备在显示聊天应用的界面的同时,在挖孔屏的顶部区域202显示如图2所示的顶部黑条204,在挖孔屏的侧边区域203显示如图2侧边黑条205,图2所示的顶部黑条204和侧边黑条205,即是本申请所述的遮挡图像的一种具体实现形式。When the electronic device 100 starts and runs the chat application, the illustrated interface of the chat application is displayed on the hole-digging screen of the electronic device. Since the interface of the chatting application is not adapted to the hole-digging screen, while displaying the interface of the chatting application, the electronic device displays the top black bar 204 as shown in FIG. 2 in the top area 202 of the hole-digging screen. The area 203 displays the side black bars 205 shown in FIG. 2 , the top black bars 204 and the side black bars 205 shown in FIG. 2 , which is a specific implementation form of the occlusion image described in this application.

除图2所示的场景以外,在实际应用中,显示未适配挖孔屏的应用界面时,根据应用界面在挖孔屏上覆盖的区域,电子设备可以同时在顶部区域和侧边区域显示遮挡图像,或者可以仅在顶部区域显示遮挡图像,还可以仅在侧边区域显示遮挡图像。总之,显示遮挡图像的具体位置可以根据当前显示的应用界面决定,本实施例对此不做限定。In addition to the scenario shown in Figure 2, in practical applications, when displaying an application interface that is not adapted to the hole-digging screen, the electronic device can display the top area and the side area at the same time according to the area covered by the application interface on the hole-digging screen. The occlusion image, or the occlusion image can be displayed only in the top area, and the occlusion image can be displayed only in the side area. In a word, the specific position where the occlusion image is displayed 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 the application adapted to the punching screen to the application that is not adapted to the punching screen, the occlusion image is displayed on the screen. When the application of the hole-punch screen is used, the occlusion image displayed on the screen is hidden.

相关技术中,电子设备跟随不同应用的切换而显示或隐藏遮挡图像时,存在如下的问题:In the related art, when the electronic device displays or hides the occlusion image following the switching of different applications, there are the following problems:

目前的电子设备在从一个应用向另一个应用切换时,都是在应用切换效果播放结束之后再调整屏幕上遮挡图像的显示或隐藏,这类电子设备在切换应用时,用户看到的视觉效果一般是,应用切换效果播放完后,屏幕上显示的界面发生跳变,从显示遮挡图像的界面直接切换为隐藏遮挡图像的界面,或者从隐藏遮挡图像的界面切换为显示遮挡图像的界面。这种在应用切换效果播放完后的跳变,会造成视觉上的卡顿感,即用户感觉电子设备切换应用的过程发生卡顿和闪屏。When current electronic devices switch from one application to another, they adjust the display or hide of the occluded image on the screen after the application switching effect is played. Generally, after the application switching effect is played, the interface displayed on the screen jumps, from the interface displaying the occlusion image to the interface for hiding the occlusion image, or from the interface for hiding the occlusion image to the interface for displaying the occlusion image. This kind of jump after the application switching effect is played will cause a visual stutter, that is, the user feels that the electronic device has stuttering and screen splashes in the process of switching applications.

进一步的,由于目前的电子设备在播放应用切换效果期间就默认隐藏屏幕上的遮挡图像,在播放完应用切换效果后在根据切换后的应用界面的适配情况决定是否添加遮挡图像,导致在整个应用切换过程中,存在至多两次,至少一次的跳变(闪屏)。Further, since the current electronic device hides the occlusion image on the screen by default during the playback of the application switching effect, after the application switching effect is played, it is determined whether to add the occlusion image according to the adaptation of the switched application interface, resulting in During the application switching process, there are at most two jumps (splash screen) at least once.

针对上述问题,本申请提供一种应用切换时的显示优化方法,以改善电子设备切换应用时造成的卡顿感和闪烁感,改善用户的使用体验。In view of the above problems, the present application provides a display optimization method when switching applications, so as to improve the feeling of stuttering and flickering caused by switching applications of electronic devices, and improve the user experience.

下面以智能手机这一具体的电子设备为示例,说明应用本申请的显示优化方法的手机切换应用时的场景。The following takes a specific electronic device, a smart phone, as an example to describe a scenario in which the mobile phone switches applications to which the display optimization method of the present application is applied.

请参见图3,为本申请提供的一种手机从适配挖孔屏的应用向未适配挖孔屏的应用切换的场景示例。Please refer to FIG. 3 , which is an example of a scenario in which a mobile phone switches from an application adapted to the hole-digging screen to an application not adapted to the hole-digging screen provided by the present application.

手机处于竖屏状态时,用户打开手机安装的视频应用,手机响应用户操作开始运行视频应用,并显示如图3的(1)所示的竖屏模式下视频应用的界面。竖屏模式的视频应用界面适配挖孔屏,因此显示竖屏模式的视频应用界面时,挖孔屏上未显示遮挡图像。When the mobile phone is in the vertical screen state, the user opens the video application installed on the mobile phone, the mobile phone starts to run the video application in response to the user operation, and displays the interface of the video application in the vertical screen mode as shown in (1) of Figure 3. The video application interface in portrait mode is adapted to the hole-digging screen. Therefore, when the video application interface in portrait mode is displayed, the occlusion image is not displayed on the hole-digging screen.

运行视频应用期间,用户执行如图3的(1)所示的横滑手势操作,手机响应横滑手势操作,从视频应用向最近一次运行的另一应用切换,在本示例中,也就是从视频应用向聊天应用切换。During the running of the video application, the user performs the horizontal swipe gesture operation as shown in (1) of Figure 3, and the mobile phone responds to the horizontal swipe gesture operation and switches from the video application to another application that was run most recently. Switch from video app to chat app.

在手机从一个应用向另一个应用切换时,可以播放预设的应用切换动画效果,也可以不播放应用切换动画效果,应用切换动画效果的具体形式可以为系统默认设置的形式,也可以是用户指定的形式,本实施例对是否播放应用切换动画效果,以及应用切换动画效果的具体形式均不做限定。When the mobile phone switches from one application to another, the preset application switching animation effect can be played, or the application switching animation effect can not be played. The specific form of the application switching animation effect can be the default setting of the system, or the user The specified form, this embodiment does not limit whether to play the application switching animation effect, and the specific form of the application switching animation effect.

示例性的,手机从视频应用向聊天应用切换时,可以播放如图3的(2)所示的应用切换动画效果,也就是将被切走的视频应用的界面向右侧逐渐移出屏幕,直至视频应用的界面消失,同时将切入的聊天应用的界面从左侧移入屏幕,直至聊天应用的界面在屏幕上完全显示。Exemplarily, when the mobile phone switches from a video application to a chat application, the application switching animation effect shown in (2) of Figure 3 can be played, that is, the interface of the video application that has been cut off is gradually moved out of the screen to the right until The interface of the video application disappears, and at the same time, the interface of the entered chat application is moved into the screen from the left until the interface of the chat application is completely displayed on the screen.

由于竖屏模式的聊天应用界面未适配挖孔屏,手机在显示竖屏模式下的聊天应用界面时,在挖孔屏上显示遮挡图像,即显示图3的(3)所示的顶部黑条和侧边黑条。Since the chat application interface in portrait mode is not adapted to the hole-punch screen, when the mobile phone displays the chat application interface in portrait mode, the occlusion image is displayed on the hole-punch screen, that is, the black top shown in (3) of Figure 3 is displayed. bar and side black bars.

请参见图4,为本申请提供的一种手机从未适配挖孔屏的应用界面向适配挖孔屏的应用界面切换的场景示例。Please refer to FIG. 4 , which is an example of a scenario in which a mobile phone switches from an application interface that is not adapted to the hole-digging screen to an application interface that is adapted to the hole-digging screen provided by the present application.

手机处于竖屏状态时,用户打开手机安装的聊天应用,手机响应用户操作开始运行聊天应用,并显示如图4的(1)所示的竖屏模式下聊天应用的界面。竖屏模式的聊天应用界面未适配挖孔屏,因此显示竖屏模式的聊天应用界面时,手机在挖孔屏上显示遮挡图像,即图4的(1)所示的顶部黑条和侧边黑条。When the mobile phone is in the 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 displays the interface of the chat application in the vertical screen mode as shown in (1) of FIG. 4 . The chat application interface in portrait mode is not adapted to the hole-punch screen, so when the chat application interface in portrait mode is displayed, the mobile phone displays an occluded image on the hole-punch screen, that is, the top black bars and side bars shown in (1) of Figure 4. Side black bars.

运行聊天应用期间,用户执行如图4的(1)所示的横滑手势动作,手机响应该动作,从聊天应用向最近一次运行的另一应用切换,在本示例中,也就是从聊天应用向视频应用切换。During the running of the chat application, the user performs a horizontal swipe gesture as shown in (1) of Figure 4, and the mobile phone responds to this action and switches from the chat application to another application that was run most recently, in this example, from the chat application. Switch to the video app.

示例性的,手机从聊天应用向视频应用切换时,可以播放如图4的(2)所示的应用切换动画效果,也就是将被切走的聊天应用的界面向右侧逐渐移出屏幕,直至聊天应用的界面消失,同时将切入的视频应用的界面从左侧移入屏幕,直至用户松手,横滑手势结束后,视频应用的界面在屏幕上完全显示。Exemplarily, when the mobile phone is switched from a chat application to a video application, the application switching animation effect shown in (2) of FIG. The interface of the chat application disappears, and at the same time, the interface of the video application is moved to the screen from the left until the user releases the hand. After the horizontal swipe gesture ends, the interface of the video application is completely displayed on the screen.

由于竖屏模式的视频应用界面适配挖孔屏,手机在显示竖屏模式下的视频应用界面时,隐藏挖孔屏上的遮挡图像,即隐藏图4的(1)所示的顶部黑条和侧边黑条。Since the video application interface in portrait mode is adapted to the hole-punch screen, when the mobile phone displays the video application interface in portrait mode, the occluded image on the hole-punch screen is hidden, that is, the top black bar shown in (1) of Figure 4 is hidden. and side black bars.

请参见图5,为本申请提供的一种手机从未适配挖孔屏的应用界面向未适配挖孔屏的应用界面切换的场景示例。Please refer to FIG. 5 , which is an example of a scenario in which a mobile phone switches from an application interface that is not adapted to the hole-digging screen to an application interface that is not adapted to the hole-digging screen provided by the present application.

手机处于竖屏状态时,用户打开手机安装的聊天应用,手机响应用户操作开始运行聊天应用,并显示如图5的(1)所示的竖屏模式下聊天应用的界面。竖屏模式的聊天应用界面未适配挖孔屏,因此显示竖屏模式的聊天应用界面时,手机在挖孔屏上显示遮挡图像,即图5的(1)所示的顶部黑条和侧边黑条。When the mobile phone is in the 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 displays the interface of the chat application in the vertical screen mode as shown in (1) of FIG. 5 . The chat application interface in portrait mode is not adapted to the hole-punch screen, so when the chat application interface in portrait mode is displayed, the mobile phone displays an occluded image on the hole-punch screen, that is, the black bars at the top and the sides shown in (1) of Figure 5. Side black bars.

运行聊天应用期间,用户执行如图5的(1)所示的横滑手势动作,手机响应该动作,从聊天应用向最近一次运行的另一应用切换,在本示例中,也就是从聊天应用向购物应用切换。During the running of the chat application, the user performs a horizontal swipe gesture as shown in (1) of Figure 5, and the mobile phone responds to this action and switches from the chat application to another application that was run most recently, in this example, from the chat application. Switch to shopping app.

示例性的,手机从聊天应用向购物应用切换时,可以播放如图5的(2)所示的应用切换动画效果,也就是将被切走的聊天应用的界面向右侧逐渐移出屏幕,直至聊天应用的界面消失,同时将切入的购物应用的界面从左侧移入屏幕,直至用户松手,横滑手势结束后,购物应用的界面在屏幕上完全显示。Exemplarily, when the mobile phone is switched from a chat application to a shopping application, the application switching animation effect shown in (2) of FIG. The interface of the chat application disappears, and at the same time, the interface of the entered shopping application is moved into the screen from the left until the user releases the hand. After the horizontal swipe gesture ends, the interface of the shopping application is completely displayed on the screen.

由于竖屏模式的购物应用界面未适配挖孔屏,手机在显示竖屏模式下的购物应用界面时,仍然显示挖孔屏上的遮挡图像,即显示图5的(1)所示的顶部黑条和侧边黑条。Since the shopping application interface in portrait mode is not adapted to the hole-punch screen, when the mobile phone displays the shopping application interface in portrait mode, the occluded image on the hole-punch screen is still displayed, that is, the top shown in (1) of Figure 5 is displayed. Black bars and side black bars.

从图5的(2)可以看到,在从聊天应用切换至购物应用的过程中,手机在用户松手之前持续显示顶部黑条和侧边黑条,在用户松手,屏幕上显示完整的购物应用的界面后,由于购物应用的界面未适配挖孔屏,手机继续显示顶部黑条和侧边黑条。也就是说,当手机在两个未适配挖孔屏的应用界面之间切换时,应用本方案可以避免遮挡图像(即前述顶部黑条和侧边黑条)在用户松手前消失然后又在用户松手后出现,防止应用切换时发生卡顿和闪屏。It can be seen from (2) in Figure 5 that during the process of switching from the chat application to the shopping application, the mobile phone continues to display the top black bar and the side black bar before the user lets go, and the complete shopping application is displayed on the screen when the user lets go. After the interface is displayed, because the interface of the shopping application is not adapted to the punch-hole screen, the mobile phone continues to display the top black bar and the side black bar. That is to say, when the mobile phone switches between two application interfaces that are not adapted to the hole-digging screen, applying this solution can avoid blocking the image (that is, the aforementioned top black bars and side black bars) disappearing before the user lets go and then reappearing on the screen. Appears after the user lets go, preventing freezes and screen splashes when switching applications.

本申请中,作为一种示例,本申请中默认以横滑手势操作作为切换最近应用的操作,也就是说,当电子设备检测到用户执行了横滑手势操作时,电子设备确定用户意图为切换最近应用。切换最近应用,是指,电子设备从当前运行的应用切换到最近一次运行过的另一个应用,例如,电子设备先运行A应用一段时间,然后运行B应用,运行B应用期间,用户执行横滑手势操作,则电子设备切换回A应用。In this application, as an example, the horizontal swipe gesture operation is used as the operation of switching recent applications by default, that is, when the electronic device detects that the user performs the horizontal swipe gesture operation, the electronic device determines that the user's intention is to switch Recently applied. Switching the most recent application means that the electronic device switches from the currently running application to another application that has been run most recently. For example, the electronic device runs the A application for a period of time, and then runs the B application. During the running of the B application, the user performs a horizontal swipe Gesture operation, the electronic device switches back to the A application.

在一些可选的实施例中,除上述横滑手势操作以外,电子设备也可以被配置为响应用户的其他动作而切换最近应用,例如点击屏幕上的虚拟按键,或者其他的手势操作,本实施例对切换最近应用操作的具体形式不做限定。In some optional embodiments, in addition to the above-mentioned horizontal swipe gesture operation, the electronic device can also be configured to switch recent applications in response to other actions of the user, such as clicking a virtual button on the screen, or other gesture operations. The example does not limit the specific form of the operation of switching the most recent application.

为了更清楚的说明本申请实施例提供的挖孔屏的显示优化方法,下面以分层架构的Android系统为例,示例性说明电子设备100的技术架构。In order to more clearly illustrate the display optimization method of the hole-digging screen provided by the embodiments of the present application, the following uses the Android system with a layered architecture as an example to illustrate the technical architecture of the electronic device 100 as an example.

请参见图6,为本申请提供的电子设备100的技术架构示意图。Please refer to FIG. 6 , which is a schematic diagram of the technical structure of the electronic device 100 provided in the present application.

电子设备可以包括硬件层和软件层,其中,分层架构的Android系统可以包括包括应用层,应用框架层,内核层。在一些可选的实施例中,电子设备的系统还可以包括上述技术架构未提及的层级,如安卓运行时(Android Runtime)和系统库。The electronic device may include a hardware layer and a software layer, wherein the Android system of the layered architecture may include an application layer, an application framework layer, and a kernel layer. In some optional embodiments, the system of the electronic device may further include layers not mentioned in the above-mentioned technical architecture, such as an Android runtime (Android Runtime) and a system library.

应用程序层可以包括一系列应用程序包,如导航应用,音乐应用和视频应用等。如图3所示,应用程序包可以包括视频,聊天,桌面(launcher),系统用户界面(SystemUI)。The application layer can include a series of application packages, such as navigation applications, music applications and video applications. As shown in Figure 3, the application package can 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, users use video apps to watch videos and chat apps to chat with other users.

桌面用于显示电子设备安装的部分或全部应用的应用图标,用户可以通过点击应用图标打开对应的应用,例如桌面显示视频应用的应用图标,用户点击视频应用的图标可以打开视频应用。The desktop is used to display the application icons of some or all of the applications installed on the electronic device. The user can click the application icon to open the corresponding application. For example, the desktop displays the application icon of the video application, and the user can click the icon of the video application to open the video application.

SystemUI用于管理电子设备的人机交互界面(User Interface,UI),在本申请中,SystemUI用于管理挖孔屏边缘区域的遮挡图像的显示和隐藏。The SystemUI is used to manage the user interface (User Interface, UI) of the electronic device. In this application, the SystemUI is used to manage the display and hiding of the occlusion images in the edge area of the hole-digging screen.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图3所示,应用程序框架层可以包括窗口管理服务模块(Window Manage Service,WMS),输入管理模块(又称Input)和应用管理服务模块(Application Manage Service,AMS)等。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions. As shown in Figure 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.

WMS用于管理窗口程序。窗口管理器可以获取屏幕大小,判断是否有状态栏,锁定屏幕,截取屏幕等。本申请中,WMS可以创建并管理应用对应的窗口。WMS is used to manage window programs. The window manager can get the screen size, determine whether there is a status bar, lock the screen, take screenshots, etc. In this application, the WMS can create and manage windows corresponding to applications.

AMS用于根据用户的操作启动特定的应用。例如,当用户点击桌面的视频应用图标时,AMS将视频应用设置为前台运行的状态,并创建视频应用对应的应用堆栈,使视频应用能够正常运行。AMS is used to launch a specific application according to the user's operation. For example, when a user clicks a video application icon on the desktop, the AMS sets the video application to the foreground running state, and creates an application stack corresponding to the video application, so that the video application can run normally.

在本申请实施例中,WMS包括一个任务记录栈,任务记录栈可以记录一段时间内电子设备运行过的应用及其先后顺序,利用任务记录栈,可以确定最近一次运行的是哪个应用。In the embodiment of the present application, the WMS includes a task record stack. The task record stack can record the applications that have been run by the electronic device for a period of time and their sequence, and the task record stack can be used to determine which application was run most recently.

作为示例,用户解锁电子设备后,打开导航应用,经过一段时间又打开视频应用,再过一段时间打开聊天应用,然后从聊天应用返回系统桌面,则任务记录栈中按导航应用→视频应用→聊天应用的顺序记录以上应用,当用户执行横滑手势操作,电子设备可以根据用户的手势在任务记录栈中确定之前运行的某个应用并切换至该应用。比如在上述示例中,若用户通过横滑手势操作切换到最近一次运行过的应用,则电子设备打开聊天应用,若用户通过横滑手势操作切换到倒数第二次运行过的应用,则电子设备打开视频应用。As an example, after the user unlocks the electronic device, opens the navigation application, opens the video application after a period of time, opens the chat application after a period of time, and then returns to the system desktop from the chat application, in the task record stack, press the navigation application → video application → chat The sequence of applications records the above applications. When the user performs a horizontal swipe gesture operation, the electronic device can determine a previously running application in the task record stack according to the user's gesture and switch to the application. For example, in the above example, if the user switches to the most recently run application through the horizontal swipe gesture operation, the electronic device opens the chat application, and if the user switches to the penultimately run application through the horizontal swipe gesture operation, the electronic device Open the Video app.

当需要确定最近一次运行的应用时,直接从任务记录栈查找最晚记录的一个应用即可。When you need to determine the most recently run application, you can directly search for the latest recorded application from the task record stack.

内核层是硬件和软件之间的层。在本申请中,内核层至少包含触控驱动模块和显示驱动模块。The kernel layer is the layer between hardware and software. In this application, the core layer at least includes a touch driving module and a display driving module.

显示驱动模块用于根据应用框架层的模块和应用层的应用程序所提供的图像数据,在触摸屏上显示对应的图像。例如,视频应用将视频的一帧图像数据传递给显示驱动模块,显示驱动模块根据该图像数据在触摸屏上显示视频中的一帧图像。SystemUI将遮挡图像的图像数据传递给显示驱动模块,显示驱动模块根据遮挡图像的图像数据在挖孔屏指定的区域显示该遮挡图像。The display driving module is used to display a corresponding image on the touch screen according to the image data provided by the module of the application framework layer and the application program of the application layer. For example, a video application transmits a frame of image data of the video to the display driving module, and the display driving module displays a frame of image in the video on the touch screen according to the image data. The SystemUI transmits the image data of the occlusion image to the display driver module, and the display driver module displays the occlusion image in the area designated by the hole-digging screen according to the image data of the occlusion image.

触控驱动模块用于监测触摸屏各区域的电容值。当用户在触摸屏上点击或滑动时,被点击或滑动的区域的电容值会发生变化,触控驱动模块能够监测到触摸屏上各区域电容值的变化,并向输入管理模块发送电容值变化消息,电容值变化消息中携带有触摸屏各个区域的电容值(或电容采样值)的变化幅度以及发生变化的时间等信息。The touch drive module is used to monitor the capacitance value of each area of the touch screen. When the user clicks or slides on the touch screen, the capacitance value of the clicked or swiped area will change. The touch drive 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. The capacitance value change message carries information such as the change range of the capacitance value (or the capacitance sample value) of each area of the touch screen and the time of the change.

输入管理模块根据上报的电容值变化消息可以确定触控操作,然后将识别到的触控操作发送给其他模块。这里的触控操作可以包括点击操作,拖拽操作,以及特定的手势操作(如上滑手势操作,横滑手势操作等)。The input management module can determine the touch operation according to the reported capacitance value change message, and then send the identified touch operation to other modules. The touch operations here may include click operations, drag operations, and specific gesture operations (such as slide up gesture operations, horizontal slide gesture operations, etc.).

例如,图3的(1)中,用户从屏幕左侧向右横滑后,输入管理模块根据上报的电容值变化消息识别出横滑手势,然后将横滑手势上报给桌面,从而触发电子设备执行切换最近应用的指令。For example, in (1) of Figure 3, after the user swipes from the left side of the screen to the right, the input management module recognizes the swipe gesture according to the reported capacitance value change message, and then reports the swipe gesture to the desktop, thereby triggering the electronic device Execute the instruction to switch recent apps.

需要说明的是,本申请实施例虽然以Android系统为例进行说明,但是其基本原理同样适用于基于iOS或Windows等操作系统的电子设备。It should be noted that although the embodiments of the present application are described by taking the Android system as an example, the basic principles thereof are also applicable to electronic devices based on operating systems such as iOS or Windows.

上述技术架构列举了电子设备中本申请可能涉及的模块和器件。在实际应用中,电子设备可以包括上述技术架构的全部或部分模块和器件,以及其他上述技术架构未提及的模块和器件,当然,也可以只包括上述技术架构的模块和器件,本实施例对此不做限定。The above technical architecture enumerates the modules and devices in the 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-mentioned technical framework, as well as other modules and devices not mentioned in the above-mentioned technical framework. Of course, it may also only include the modules and devices of the above-mentioned technical framework. This embodiment This is not limited.

下面结合图6所示的电子设备的技术架构,说明本申请实施例提供的应用切换时的显示优化方法的具体实现方式。The specific implementation of the display optimization method during application switching provided by the embodiment of the present application will be described below with reference to the technical architecture of the electronic device shown in FIG. 6 .

请参见图7,为本申请实施例提供的应用切换时的显示优化方法的时序图。Please refer to FIG. 7 , which is a sequence diagram of a display optimization method when an application is switched according to an embodiment of the present application.

A01,启动第一应用。A01, start the first application.

应用管理服务模块(以下简称AMS)响应于用户操作,执行步骤A01,启动第一应用。The application management service module (hereinafter referred to as AMS), in response to the user operation, executes step A01 to start the first application.

第一应用可以是电子设备上安装的任意一款应用。结合前述的示例,第一应用可以是聊天应用。The first application may be any application installed on the electronic device. In conjunction with the foregoing examples, the first application may be a chat application.

在使用电子设备时,用户可以通过多种方式打开电子设备安装的一个应用,例如,点击桌面上的应用图标,点击消息通知栏中应用的通知消息等。When using the electronic device, the user can open an application installed on the electronic device in various ways, for example, click the application icon on the desktop, click the notification message of the application in the message notification bar, and so on.

以点击桌面的应用图标为例,用户点击一个应用图标后,输入管理模块识别出用户的点击操作,然后将点击操作上报给桌面,桌面根据用户的点击操作确定被点击的应用图标,再根据被点击的应用图标找到对应的应用的应用标识,然后将应用标识发送给AMS,使得AMS启动被点击的应用。Taking the application icon on the desktop as an example, after the user clicks an application icon, the input management module identifies the user's click operation, and then reports the click operation to the desktop. The desktop determines the clicked application icon according to the user's click operation, and then according to the click operation The clicked application icon finds the application identifier of the corresponding application, and then sends the application identifier to the AMS, so that the AMS starts the clicked application.

如前,在步骤A01中,AMS具体可以将被点击的应用图标对应的应用切换到前台运行,并创建该应用对应的应用堆栈。As before, in step A01 , the AMS may specifically switch the application corresponding to the clicked application icon to run in the foreground, and create an application stack corresponding to the application.

以聊天应用为例,用户点击桌面的聊天应用的图标,桌面根据上报的点击操作识别出聊天应用的图标被点击,然后将聊天应用的应用标识(例如应用名称)发送给AMS,AMS收到后,执行步骤A01,将聊天应用切换为前台运行,并创建聊天应用的应用堆栈。Taking the chat application as an example, the user clicks the icon of the chat application on the desktop, the desktop recognizes that the icon of the chat application is clicked according to the reported click operation, and then sends the application identifier (such as the application name) of the chat application to the AMS. , perform step A01, switch the chat application to run in the foreground, and create an application stack of the chat application.

A02,通知启动窗口。A02, notification startup window.

AMS启动第一应用后,向窗口管理服务模块(以下简称WMS)执行步骤A02,从而触发WMS创建窗口。After the AMS starts the first application, step A02 is executed to the window management service module (hereinafter referred to as WMS), thereby triggering the WMS to create a window.

A02中,AMS可以向WMS发送一个窗口启动通知,该通知中携带有被AMS启动的第一应用的应用标识。WMS收到通知后,可以根据携带的应用标识创建被启动的第一应用对应的窗口。In A02, the AMS may send a window startup notification to the WMS, where the notification carries the application identifier of the first application started by the AMS. After the WMS receives the notification, it can create a window corresponding to the activated first application according to the carried application identifier.

A03,通知系统用户界面显示遮挡图像。A03, informing the system that the user interface displays the occlusion image.

在步骤A03中,WMS可以先查询第一应用的遮挡图像显示策略,然后根据第一应用的遮挡图像显示策略确定显示第一应用的界面时需要在屏幕上显示遮挡图像,因此WMS向系统用户界面发送消息,以通知系统用户界面显示遮挡图像。In step A03, the WMS may first query the occlusion image display strategy of the first application, and then determine that the occlusion image needs to be displayed on the screen when displaying the interface of the first application according to the occlusion image display strategy of the first application. Therefore, the WMS reports to the system user interface Send a message to notify the system user interface to display an occlusion image.

第一应用对应的窗口被启动后,切换到前台运行的第一应用将应用界面的图像数据发送给显示驱动模块,显示驱动模块即可根据应用界面的图像数据在触摸屏显示被启动的应用的应用界面。After the window corresponding to the first application is activated, switch to the first application running in the foreground to send the image data of the application interface to the display driver module, and the display driver module can display the application of the activated application on the touch screen according to the image data of the application interface. interface.

WMS记录有电子设备安装的各个应用的遮挡图像显示策略,每个应用的遮挡图像显示策略和该应用的应用标识相对应。应用的遮挡图像显示策略用于指示该应用的界面是否适配电子设备的挖孔屏,通过执行A03,查询应用的遮挡图像显示策略,WMS就可以确定在显示应用界面时是否需要在挖孔屏的顶部区域和侧边区域显示遮挡图像。The WMS records the occlusion image display strategy of each application installed on the electronic device, and the occlusion image display strategy of each application corresponds to the application identifier of the application. The application's occlusion image display strategy is used to indicate whether the application's interface is suitable for the hole-digging screen of the electronic device. By executing A03 to query the application's occlusion image display strategy, the WMS can determine whether the hole-digging screen needs to be displayed when the application interface is displayed. The top area and side area of show occlusion images.

其中,对于支持横屏模式和竖屏模式的应用,该应用在横屏模式的界面和在竖屏模式的界面往往不同,因而该应用的遮挡图像显示策略,可以同时包含该应用横屏模式的界面是否适配挖孔屏,以及该应用竖屏模式的界面是否适配挖孔屏。Among them, for an application that supports landscape mode and portrait mode, the interface of the application in landscape mode and the interface in portrait mode are often different, so the occlusion image display strategy of the application can also include the landscape mode of the application. Whether the interface is suitable for the hole-digging screen, and whether the interface of the application in portrait mode is suitable for the hole-digging screen.

对于支持横屏模式和竖屏模式的应用,WMS在步骤A03中可以根据电子设备当前处于横屏状态还是竖屏状态,确定该应用启动后的界面是横屏模式的界面还是竖屏模式的界面,从而查询该应用不同模式下对应的遮挡图像显示策略。For applications that support landscape mode and portrait mode, in step A03, the WMS can determine whether the interface after the application is started is the interface in landscape mode or the interface in portrait mode according to whether the electronic device is currently in landscape or portrait state. , so as to query the corresponding occlusion image display strategies in different modes of the application.

若应用启动后所显示的应用界面未适配挖孔屏,则显示应用界面时在挖孔屏的顶部区域和/或侧边区域显示遮挡图像;若应用启动后所显示的应用界面适配挖孔屏,则显示应用界面时隐藏挖孔屏上的遮挡图像。If the application interface displayed after the application is started is not adapted to the hole-digging screen, a blocking image will be displayed in the top area and/or side area of the hole-digging screen when the application interface is displayed; if the application interface displayed after the application is started is adapted to the hole-digging screen Hole screen, hide the occlusion image on the hole screen when the application interface is displayed.

在一些可选的实施例中,对于未适配挖孔屏的应用界面,应用的遮挡图像显示策略可以具体指示需要显示遮挡图像的区域,WMS根据遮挡图像显示策略控制对应位置的遮挡图像显示和隐藏。In some optional embodiments, for the application interface that is not adapted to the hole-digging screen, the applied occlusion image display strategy may specifically indicate the area where the occlusion image needs to be displayed, and the WMS controls the occlusion image display and display of the corresponding position according to the occlusion image display strategy. hide.

例如,对于瀑布屏,一个应用的遮挡图像显示策略可以指示该应用的横屏模式的界面未适配挖孔屏,并指示需要在顶部区域显示遮挡图像,该应用以横屏模式启动时,WMS通过查询该应用的遮挡图像显示策略,确定显示顶部的遮挡图像并隐藏侧边的遮挡图像。For example, for a waterfall screen, an application's occlusion image display policy can indicate that the application's interface in landscape mode is not adapted to the hole-punch screen, and indicate that the occlusion image needs to be displayed in the top area. When the application starts in landscape mode, WMS By querying the application's occlusion image display strategy, it is determined to display the occlusion image on the top and hide the occlusion image on the side.

续接前述示例,第一应用可以是聊天应用,在步骤A03中,WMS可以查询聊天应用的遮挡图像显示策略。Continuing the foregoing example, the first application may be a chat application, and in step A03, the WMS may query the occlusion image display policy of the chat application.

聊天应用的遮挡图像显示策略可以是,聊天应用在竖屏模式的界面未适配挖孔屏,并且显示聊天应用在竖屏模式的界面时,需要在屏幕顶部区域和侧边区域显示遮挡图像。The occlusion image display strategy of the chat application may be that the interface of the chat application in the vertical screen mode is not adapted to the punch-hole screen, and when the interface of the chat application in the vertical screen mode is displayed, the occlusion image needs to be displayed in the top area and side area of the screen.

WMS在收到启动聊天应用的窗口的通知后,根据电子设备当前的状态确定聊天应用在竖屏模式下开启,然后基于上述聊天的遮挡图像显示策略确定在显示聊天应用的竖屏模式的界面时需要在屏幕顶部区域和侧边区域显示如图3的(3)所示的黑条。After receiving the notification to start the window of the chat application, the WMS determines that the chat application is opened in the portrait mode according to the current state of the electronic device, and then determines when the interface of the chat application in the portrait mode is displayed based on the above-mentioned chat blocking image display strategy. The black bars shown in (3) of Figure 3 need to be displayed in the top area and side area of the screen.

应用的遮挡图像显示策略可以通过多种方式确定,本实施例对具体的确定方式不做限定。The applied occlusion image display strategy may be determined in various manners, and the specific determination manner is not limited in this embodiment.

作为一种示例,WMS可以按如下方式确定应用的遮挡图像显示策略:As an example, the WMS may determine the applied occlusion image display policy as follows:

WMS可以在应用安装好之后,通过该应用的接口获得该应用的界面对挖孔屏的适配情况。应用的每个界面都有其对应的任务(Activity)对象,应用安装好之后,WMS通过应用的接口可以获得该应用各个Activity的信息,即任务信息(ActivityInform),任务信息中包含Activity对应的界面对挖孔屏的适配情况,也就是包含获得各个Activity对应的界面是否适配挖孔屏。After the application is installed, the WMS can obtain the adaptation of the interface of the application to the hole-digging screen through the interface of the application. Each interface of the application has its corresponding task (Activity) object. After the application is installed, WMS can obtain the information of each activity of the application through the application interface, that is, the task information (ActivityInform). The task information contains the interface corresponding to the activity. The adaptation of the hole-digging screen, that is, whether the interface corresponding to each Activity is suitable for the hole-digging screen.

对于未适配挖孔屏的应用界面,WMS可以基于系统默认的配置信息确定需要显示遮挡图像的区域。示例性的,配置信息可以是,显示未适配挖孔屏的应用界面时需要在顶部区域显示黑边,也可以是,显示未适配挖孔屏的应用界面时需要在顶部区域和侧边区域显示黑边,还可以是,显示未适配挖孔屏的应用界面时需要在侧边区域显示黑边。For the application interface that is not adapted to the hole-digging screen, WMS can determine the area where the occluded image needs to be displayed based on the default configuration information of the system. Exemplarily, the configuration information may be that a black border needs to be displayed in the top area when displaying an application interface that is not adapted to the hole-punch screen, or that it needs to be displayed in the top area and side when displaying an application interface that is not adapted to the punch-hole screen. The area displays black borders, or it is necessary to display black borders in the side area when displaying the application interface that is not adapted to the hole-digging screen.

综上,WMS可以根据应用的任务信息中Activity对应的界面的适配情况以及上述默认的配置信息,确定应用的遮挡图像显示策略。In summary, the WMS can determine the application's occlusion image display strategy according to the adaptation of the interface corresponding to the Activity in the application's task information and the above-mentioned default configuration information.

A04,显示遮挡图像。A04, the occlusion image is displayed.

系统用户界面响应于A03中WMS的通知,执行步骤A04,显示遮挡图像。In response to the notification of the WMS in A03, the system user interface performs step A04 to display the occlusion image.

在步骤A04中,系统用户界面可以将WMS指定区域的遮挡图像数据发送给内核层的显示驱动模块,显示驱动模块根据遮挡图像数据,在对应的区域显示遮挡图像。In step A04, the system user interface may send the occlusion image data of the WMS designated area to the display driver module of the kernel layer, and the display driver module displays the occlusion image in the corresponding area according to the occlusion image data.

续接前述示例,在WMS确定显示聊天应用竖屏模式的界面时需要在屏幕顶部区域和侧边区域显示黑条后,WMS向系统用户界面发送显示顶部黑条和侧边黑条的通知,系统用户界面响应该通知,将顶部黑条和侧边黑条的图像数据发送给显示驱动模块,显示驱动模块根据顶部黑条和侧边黑条的图像数据在屏幕上显示如图4的(1)所示的顶部黑条和侧边黑条。Continuing the previous example, after WMS determines that it needs to display black bars in the top area and side area of the screen when the interface of the chat application is displayed in portrait mode, WMS sends a notification to the system user interface to display the top black bars and side black bars, and the system In response to the notification, the user interface sends the image data of the top black bars and the side black bars to the display driver module, and the display driver module displays the image data on the screen according to the image data of the top black bars and the side black bars as shown in Figure 4 (1) Top black bars and side black bars shown.

A05,上报横滑触碰手势。A05, report the horizontal swipe touch gesture.

在应用运行期间,触控驱动模块可以向输入管理模块上报消息,输入管理模块根据上报的消息识别出用户所执行的触控操作,然后将识别出的触控操作上报给桌面。During the running of the application, the touch driving module may report a message to the input management module, and the input management module identifies the touch operation performed by the user according to the reported message, and then reports the identified touch operation to the desktop.

当用户用手指(或触控笔)点击屏幕并开始滑动时,输入管理模块检测到用户的横滑触碰手势操作,执行步骤A05,上报横滑触碰手势给桌面。When the user taps the screen with a finger (or a stylus) and starts to slide, the input management module detects the user's horizontal sliding touch gesture operation, executes step A05, and reports the horizontal sliding touch gesture to the desktop.

输入管理模块可以配置有用于表示各个触控操作的标识,A05的具体实施方式可以是,当输入管理模块识别出用户做了横滑触碰手势的操作后,输入管理模块向桌面发送一条消息,消息中携带表示横滑触碰手势的标识,通过这种方式输入管理模块即可将横滑触碰手势上报给桌面。The input management module may be configured with an identifier used to represent each touch operation. The specific implementation of A05 may be that when the input management module recognizes that the user has performed a horizontal sliding touch gesture operation, the input management module sends a message to the desktop, The message carries an identifier representing the horizontal sliding touch gesture, and the horizontal sliding touch gesture can be reported to the desktop by inputting the management module in this way.

A06,查询可能切换的应用的遮挡图像显示策略。A06, query the occlusion image display strategy of the application that may be switched.

步骤A06的实施方式可以是,桌面根据用户的横滑触碰手势确定可能切换的应用,然后WMS根据标识查询可能切换的应用的遮挡图像显示策略。The implementation of step A06 may be that the desktop determines the applications that may be switched according to the user's horizontal swipe touch gesture, and then the WMS queries the occlusion image display policy of the applications that may be switched according to the identification.

需要说明的是,A06可以在横滑手势操作结束之前,也就是在输入管理模块上报横滑抬起手势之前实时执行。也就是说,在横滑触碰手势持续期间,可能切换的应用会随着用户的滑动的发生变化,而桌面可以实时地根据用户的横滑触碰手势确定最新的可能切换的应用,从而将对应的标识发送给WMS,使得WMS实时查询最新的可能显示的应用的遮挡图像显示策略。It should be noted that A06 can be executed in real time before the horizontal swipe gesture operation ends, that is, before the input management module reports the horizontal swipe up gesture. That is to say, during the duration of the horizontal swipe touch gesture, the applications that may be switched will change with the user's swipe, and the desktop can determine the latest possible switched applications according to the user's horizontal swipe gesture in real time, so as to change the The corresponding identifier is sent to the WMS, so that the WMS can query the latest occlusion image display policy of the application that may be displayed in real time.

在A06中,桌面具体可以根据用户的横滑触碰手势的滑动方向和滑动距离等信息确定可能切换的应用,滑动方向和滑动距离等信息可以由输入管理模块上报给桌面。In A06, the desktop can specifically determine the applications that may be switched according to information such as the sliding direction and sliding distance of the user's horizontal sliding touch gesture, and the information such as the sliding direction and sliding distance can be reported to the desktop by the input management module.

示例性的,若滑动方向为向右滑动,则桌面可以将前一个应用确定为可能切换的应用,若滑动方向为向左滑动,则桌面可以将后一个应用确定为可能切换的应用。其中,前一个应用,是指任务记录栈中记录的在当前运行的第一应用之前运行过的应用,后一个应用,是指任务记录栈中记录的在当前运行的第一应用之后运行过的应用。比如,任务记录栈中记录电子设备先后运行过导航应用,视频应用,聊天应用,对于视频应用,其前一个应用就是导航应用,后一个应用就是聊天应用。Exemplarily, if the sliding direction is swiping to the right, the desktop may determine the previous application as an application that may be switched, and if the sliding direction is sliding to the left, the desktop may determine the latter application as an application that may be switched. The former application refers to the application recorded in the task record stack that has run before the currently running first application, and the latter application refers to the application recorded in the task record stack that has run after the currently running first application application. For example, it is recorded in the task record stack that the electronic device has successively run a navigation application, a video application, and a chat application. For a video application, the former application is the navigation application, and the latter application is the chat application.

续接上述示例,若电子设备运行聊天应用期间用户执行横滑触碰手势,滑动方向为向右滑动,则确定可能切换的应用为视频应用,假设切换至视频应用后,用户又执行横滑触碰手势,滑动方向为向左滑动,则确定可能切换的应用为任务记录栈中的后一个应用,即聊天应用。Continuing the above example, if the user performs a horizontal swipe gesture while the electronic device is running the chat application, and the sliding direction is rightward, then it is determined that the application that may be switched is a video application, and it is assumed that after switching to a video application, the user performs a horizontal swipe Touch the gesture, and the swipe direction is swipe to the left, then it is determined that the application that may be switched is the next application in the task record stack, that is, the chat application.

A07,上报横滑抬起手势。A07, report the horizontal swipe raise gesture.

当用户停止在屏幕上滑动并抬起点击屏幕的手指(或触控笔)时,输入管理模块检测到用户的横滑抬起手势,执行步骤A07,上报横滑抬起手势给桌面。A07的具体实施方式可以参见A05,即输入管理模块可以向桌面发送一条消息,该消息携带有表示横滑抬起手势的标识,由此完成横滑抬起手势的上报。When the user stops sliding on the screen and lifts up the finger (or stylus) that taps the screen, the input management module detects the user's swipe-up gesture, executes step A07, and reports the swipe-up gesture to the desktop. For the specific implementation of A07, refer to A05, that is, the input management module can send a message to the desktop, the message carries an identifier representing the horizontal slide up gesture, thereby completing the reporting of the horizontal slide up gesture.

A08,通知应用管理服务启动第二应用。A08, notify the application management service to start the second application.

本实施例中,第二应用指代用户执行横滑手势操作后需要切换的应用。结合图4的示例,电子设备运行聊天应用期间,用户执行横滑手势操作以切换至视频应用,该场景中聊天应用即为前述第一应用,视频应用即为第二应用。In this embodiment, the second application refers to an application that needs to be switched after the user performs the horizontal swipe gesture operation. With reference to the example of FIG. 4 , during the operation of the chat application on the electronic device, the user performs a horizontal swipe gesture operation to switch to the video application. In this scenario, the chat application is the aforementioned first application, and the video application is the second application.

在A08中,桌面可以先确定第二应用具体是哪一个应用,然后将对应的应用标识发送给AMS,使得AMS启动第二应用。例如,若桌面确定视频应用为第二应用,则桌面在A08中向AMS发送视频应用的应用标识,使得AMS启动视频应用。In A08, the desktop may first determine which application the second application is, and then send the corresponding application identifier 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 the application identifier of the video application to the AMS in A08, so that the AMS starts the video application.

在一些可选的实施例中,桌面可以将输入管理模块上报横滑抬起手势之前最新确定的可能切换的应用确定为第二应用。In some optional embodiments, the desktop may determine the newly determined application that may be switched before the input management module reports the horizontal swipe raise gesture as the second application.

例如,输入管理模块上报横滑抬起手势之前最新确定的可能切换的应用为视频应用,在输入管理模块上报横滑抬起手势之后,桌面可以确定视频应用为第二应用。For example, the newly determined application that may be switched before the input management module reports the horizontal slide up gesture is a video application, and after the input management module reports the horizontal slide lift gesture, the desktop can determine that the video application is the second application.

A09,通知启动第二应用的窗口。A09, notify the window for launching the second application.

AMS收到桌面的通知后,执行步骤A09,以便将需要启动第二应用的窗口消息通知给WMS。在A09中,AMS具体可以将第二应用的应用标识发送给WMS,也可以发送除第二应用的应用标识以外的其他消息,本实施例对此不做限定。After receiving the notification from the desktop, the AMS executes step A09, so as to notify the WMS of the 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, and may also send messages other than the application identifier of the second application, which is not limited in this embodiment.

续接前述示例,在收到携带视频应用的应用标识的启动应用通知后,AMS执行A09,将视频应用的应用标识转发给WMS。Continuing the foregoing example, after receiving the application startup notification carrying the application identifier of the video application, the AMS executes A09 to forward the application identifier of the video application to the WMS.

在一些可选的实施例中,桌面也可以直接通知WMS启动第二应用的窗口。In some optional embodiments, the desktop may also directly notify the WMS to start the window of the second application.

下面结合图4的示例说明步骤A05至A09的实施过程:The following describes the implementation process of steps A05 to A09 in conjunction with the example of FIG. 4 :

电子设备运行聊天应用期间,用户执行向右滑动的横滑触碰手势,输入管理模块检测到横滑触碰手势后执行A05,将横滑触碰手势上报给桌面,同时还上报了滑动方向。During the running of the chat application on the electronic device, the user performs a horizontal swipe touch gesture of sliding to the right, and the input management module executes A05 after detecting the horizontal swipe touch gesture, and reports the horizontal swipe touch gesture to the desktop, and also reports the sliding direction.

其中,桌面响应于横滑触碰手势,显示最近一段时间内运行过的应用的卡片的动效,也就是说,输入管理模块上报横滑触碰手势后,桌面可以随着用户的滑动依次在屏幕上显示最近一段时间内运行过的应用的卡片。Among them, the desktop responds to the horizontal swipe touch gesture, and displays the dynamic effect of the card of the application that has been running in the recent period of time. That is to say, after the input management module reports the horizontal swipe touch gesture, the desktop can follow the user's sliding in order. Cards showing apps that have been running in the most recent period of time.

在A06中,桌面根据横滑触碰手势及其滑动方向确定可能切换的应用为前一个应用,于是桌面通知WMS查询前一个应用的遮挡图像显示策略,WMS根据任务记录栈知道前一个应用为视频应用,因此WMS查询视频应用的遮挡图像显示策略。In A06, the desktop determines that the application that may be switched is the previous application according to the horizontal sliding touch gesture and its sliding direction, so the desktop notifies the WMS to query the occlusion image display strategy of the previous application, and the WMS knows that the previous application is a video according to the task record stack. application, so the WMS queries the occlusion image display strategy of the video application.

当电子设备的屏幕显示视频应用对应的卡片时,用户停止滑动并抬起接触屏幕的手指,输入管理模块检测到该动作后,执行A07,将横滑抬起手势上报给桌面。When the screen of the electronic device displays the card corresponding to the video application, the user stops sliding and lifts the finger touching the screen. After the input management module detects the action, it executes A07 and reports the horizontal slide up gesture to the desktop.

输入管理模块上报横滑抬起手势时,可能切换的应用仍为视频应用,于是桌面用户的横滑手势对应的意图为切换至视频应用,也就是将视频应用确定为第二应用,然后桌面执行步骤A08,将视频应用的应用标识发给AMS,从而通知AMS启动视频应用。When the input management module reports the horizontal swipe up gesture, the application that may be switched is still the video application, so the intention corresponding to the horizontal swipe gesture of the desktop user is to switch to the video application, that is, the video application is determined as the second application, and then the desktop executes Step A08: Send the application identifier of the video application to the AMS, so as to notify the AMS to start the video application.

AMS收到通知后,再将视频应用的应用标识转发给WMS,以触发WMS启动视频应用的窗口。After receiving 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,获得第二应用的遮挡图像显示策略。A10. Obtain the occlusion image display strategy of the second application.

WMS在收到启动第二应用窗口的通知后,一方面可以启动对应的窗口,另一方面可以执行步骤A10,获得第二应用的遮挡图像显示策略。After the WMS receives the notification to start the second application window, on the one hand, it can start the corresponding window, and on the other hand, it can execute step A10 to obtain the occlusion image display policy of the second application.

步骤A06中WMS每次查询可能切换的应用的遮挡图像显示策略时,可以缓存查询到的遮挡图像显示策略,而第二应用就是上报横滑抬起手势之前最新确定的可能切换的应用。可以理解,这种情况下输入管理模块上报横滑抬起手势之前WMS最新查询并缓存的遮挡图像显示策略,就是步骤A10中第二应用的遮挡图像显示策略。In step A06, each time the WMS queries the occlusion image display policy of the potentially switchable application, it can cache the queried occlusion image display policy, and the second application is the newly determined possible switch application before reporting the horizontal swipe raise gesture. It can be understood that, in this case, the occlusion image display strategy newly queried and cached by the WMS before the input management module reports the horizontal swipe raise gesture is the occlusion image display strategy of the second application in step A10.

所以在执行A10时,WMS可以直接读取在执行A06时缓存的第二应用的遮挡图像显示策略。Therefore, when executing A10, the WMS can directly read the occlusion image display policy of the second application cached when executing A06.

在A06中提前查询并缓存第二应用的遮挡图像显示策略的好处在于,在执行步骤A10时可以快速地根据缓存的遮挡图像显示策略确定是否要隐藏或显示遮挡图像,使得系统用户界面能够尽快开始隐藏遮挡图像,进一步缩短隐藏遮挡图像和应用界面切换结束之间的时间差。The advantage of querying and caching the occlusion image display strategy of the second application in advance in A06 is that when step A10 is executed, it can be quickly determined whether to hide or display the occlusion image according to the cached occlusion image display strategy, so that the system user interface can start as soon as possible Hide the occlusion image to further shorten the time difference between hiding the occlusion image and the end of the application interface switching.

根据第二应用的遮挡图像显示策略,WMS可以确定将要启动的第二应用是否适配挖孔屏,进而确定在显示第二应用的界面时,需要在挖孔屏上显示遮挡图像还是需要在挖孔屏上隐藏遮挡图像。According to the occlusion image display strategy of the second application, the WMS can determine whether the second application to be launched is adapted to the hole-digging screen, and then determine whether the occlusion image needs to be displayed on the hole-digging screen or the hole-digging screen needs to be displayed when the interface of the second application is displayed. Hidden occlusion images on the aperture screen.

和A03类似的,若第二应用对应有横屏模式和竖屏模式两种遮挡图像显示策略,则在A10中WMS可以确定电子设备当前的状态是横屏还是竖屏,进而获得对应的遮挡图像显示策略。Similar to A03, if the second application corresponds to two occlusion image display strategies in landscape mode and portrait mode, in A10, WMS can determine whether the current state of the electronic device is landscape or portrait, and then obtain the corresponding occlusion image. Show strategy.

续接前述示例,视频应用的遮挡图像显示策略可以是,视频应用在竖屏模式的界面适配挖孔屏,视频应用在横屏模式的界面未适配挖孔屏。WMS收到AMS发送的视频应用的应用标识后,确定电子设备当前处于竖屏状态,根据视频应用的应用标识,查找得到视频应用竖屏模式的遮挡图像显示策略。由于遮挡图像显示策略表明视频应用在竖屏模式的界面适配挖孔屏,WMS通过A10可以确定显示视频应用的界面时,需要隐藏挖孔屏上的遮挡图像。Continuing the previous example, the occlusion image display strategy of the video application may be that the interface of the video application in the portrait mode is adapted to the hole-punch screen, and the interface of the video application in the landscape mode is not adapted to the hole-punch screen. After receiving the application identifier of the video application sent by the AMS, the WMS determines that the electronic device is currently in a vertical screen state, and searches and obtains the occlusion image display strategy of the vertical screen mode of the video application according to the application identifier of the video application. Since the occlusion image display strategy indicates that the interface of the video application in portrait mode is adapted to the hole-punch screen, WMS can determine through A10 that the occlusion image on the hole-punch screen needs to be hidden when displaying the interface of the video application.

A11,通知系统用户界面隐藏遮挡图像。A11, Notify the system user interface to hide the occlusion image.

WMS确定显示第二应用的界面时需要隐藏遮挡图像后,执行A11,向系统用户界面发送隐藏遮挡图像的通知,以触发系统用户界面隐藏遮挡图像。After the WMS determines that the occlusion image needs to be hidden when displaying the interface of the second application, A11 is executed, and a notification of hiding the occlusion image is sent to the system user interface, so as to trigger the system user interface to hide the occlusion image.

续接前述示例,WMS确定显示视频应用的界面时需要隐藏遮挡图像后,执行A11,向系统用户界面发送隐藏遮挡图像的通知,以触发系统用户界面将显示聊天应用的界面时挖孔屏上的顶部黑条和侧边黑条隐藏。Continuing the previous example, after WMS determines that the occlusion image needs to be hidden when displaying the interface of the video application, it executes A11 to send a notification of hiding the occlusion image to the system user interface, so as to trigger the system user interface to display the interface of the chat application. Top black bars and side black bars are hidden.

A12,隐藏遮挡图像。A12, hide the occlusion image.

系统用户界面收到WMS的通知后,执行A12,将显示第一应用的界面时挖孔屏上显示的遮挡图像隐藏,以图4为示例,在A12中,系统用户界面可以将挖孔屏的顶部黑条和侧边黑条隐藏。After receiving the notification from WMS, the system user interface executes A12 to hide the occlusion image displayed on the hole-digging screen when the interface of the first application is displayed. Taking Figure 4 as an example, in A12, the system user interface can hide the occlusion image displayed on the hole-digging screen. Top black bars and side black bars are hidden.

在步骤A12中,系统用户界面可以采用多种方式将显示第一应用的界面时屏幕上的遮挡图像隐藏,本实施例对具体的方式不做限定。In step A12, the system user interface may use various methods to hide the occlusion image on the screen when the interface of the first application is displayed, and the specific method is not limited in this embodiment.

在一些可选的实施例中,系统用户界面可以在收到WMS的通知后,立即将屏幕上显示的遮挡图像全部隐藏。In some optional embodiments, the system user interface may immediately hide all the occlusion images displayed on the screen after receiving the notification from the WMS.

在一些可选的实施例中,系统用户界面也可以在收到WMS的通知后,逐次缩小屏幕上显示的遮挡图像的尺寸,也就是在收到WMS的通知后每隔一定时间缩小一次遮挡图像的尺寸,直至遮挡图像完全消失。In some optional embodiments, the system user interface can also reduce the size of the occlusion image displayed on the screen successively after receiving the notification from the WMS, that is, after receiving the notification from the WMS, the occlusion image is reduced at regular intervals size until the occluded image disappears completely.

在一些可选的实施例中,系统用户界面还可以在收到WMS的通知后,逐次提高屏幕上显示的遮挡图像的透明度,也就是在收到WMS的通知后每隔一定时间缩小一次遮挡图像的尺寸,直至遮挡图像完全透明。In some optional embodiments, the system user interface may further increase the transparency of the occlusion image displayed on the screen one by one after receiving the notification from the WMS, that is, after receiving the notification from the WMS, the occlusion image is reduced at regular intervals size until the occluded image is completely transparent.

采用逐渐缩小尺寸和逐渐提高透明度的方式隐藏遮挡图像,可以避免遮挡图像突然消失造成的突兀感,改善用户的视觉体验。By gradually reducing the size and gradually increasing the transparency, the occlusion image is hidden, which can avoid the abruptness caused by the sudden disappearance of the occlusion image, and improve the user's visual experience.

A13,启动第二应用。A13, start the second application.

步骤A13中第二应用具体的启动过程可以参见步骤A01。For a specific startup process of the second application in step A13, reference may be made to step A01.

需要说明的是,步骤A13可以和步骤A10同时执行,也可以在执行完步骤A10之后再执行,还可以在步骤A10之前执行,只要确保步骤A10在步骤A15之前执行即可,本实施例对具体执行顺序不做限定。即AMS可以先将第二应用的应用标识发送给WMS,再启动第二应用,也可以在启动第二应用的通知将第二应用的应用标识发送给WMS。It should be noted that step A13 may be performed simultaneously with step A10, or may be performed after step A10 is performed, or may be performed before step A10, as long as step A10 is ensured to be performed before step A15. The execution order is not limited. That is, the AMS may first send the application identifier of the second application to the WMS, and then start the second application, or may send the application identifier of the second application to the WMS in the notification of starting the second application.

A13的具体实施方式参见步骤A01,不再赘述。For the specific implementation of A13, refer to step A01, which will not be repeated.

A14,播放应用切换动画效果。A14, play the application switching animation effect.

在步骤A14中,WMS可以根据用户配置或者系统的默认设置播放任意形式的应用切换动画效果,本实施例对此不做限定。In step A14, the WMS may play any form of application switching animation effect according to the user configuration or the default setting of the system, which is not limited in this embodiment.

示例性的,A14中WMS所播放的应用切换动画效果,可以如图4所示。Exemplarily, the application switching animation effect played by the WMS in A14 may be as shown in FIG. 4 .

步骤A14的具体实施方式可以是,WMS通过调用特定的函数,控制桌面播放应用切换动画效果。The specific implementation of step A14 may be that the WMS controls the desktop playback application to switch the animation effect by calling a specific function.

本实施例具有如下的有益效果:This embodiment has the following beneficial effects:

桌面在播放应用切换动画效果之前,通知WMS预先查询第二应用的遮挡图像显示策略,使得WMS能够提前通知系统用户界面隐藏遮挡图像,因此在本实施例中,当电子设备从当前运行的应用切换到最近运行的前一个应用时,能够在应用切换动画效果播放完之前就开始隐藏遮挡图像,缩短了隐藏遮挡图像和应用界面切换结束之间的时间差,缓解了切换应用时隐藏遮挡图像而导致的视觉上的卡顿,改善用户的使用体验。Before playing the application switching animation effect, the desktop notifies the WMS to query the occlusion image display policy of the second application in advance, so that the WMS can notify the system user interface in advance to hide the occlusion image. Therefore, in this embodiment, when the electronic device switches from the currently running application When it comes to the last application that runs recently, the occlusion image can be hidden before the application switching animation effect is played, which shortens the time difference between hiding the occlusion image and the end of the application interface switching, and alleviates the problem caused by hiding the occlusion image when switching applications. Visual lag improves user experience.

进一步的,在桌面确定了将要切换的第二应用之后,系统用户界面才开始隐藏遮挡图像,在桌面收到上报的横滑抬起手势之前则不隐藏遮挡图像,避免了从第一应用切换至第二应用期间,遮挡图像频繁发生变化,即反复出现又消失的情况,缓解了电子设备切换应用时因为遮挡图像反复出现又消失而引起的界面抖动的视觉效果。Further, after the desktop determines the second application to be switched, the system user interface starts to hide the occlusion image, and does not hide the occlusion image until the desktop receives the reported horizontal swipe up gesture, which avoids switching from the first application to During the second application period, the occlusion image frequently changes, that is, it appears and disappears repeatedly, which alleviates the visual effect of interface jitter caused by the occlusion image repeatedly appearing and disappearing when the electronic device switches applications.

需要说明的是,图7所示的实施例以第一应用未适配挖孔屏,第二应用适配挖孔屏为示例,说明了电子设备响应横滑手势操作从第一应用切换至第二应用时隐藏遮挡图像的方法。可以理解的,该方法同样可以适用于电子设备从适配挖孔屏的第一应用向未适配挖孔屏的第二应用切换的过程。It should be noted that, in the embodiment shown in FIG. 7 , the first application is not adapted to the hole-digging screen, and the second application is adapted to the hole-digging screen as an example, which illustrates that the electronic device switches from the first application to the second application in response to the horizontal swipe gesture operation. 2. The method of hiding the occlusion image when applied. It can be understood that this method can also be applied to the process of switching the electronic device from the first application adapted to the punching screen to the second application not adapted to the punching screen.

示例性的,只需要将图7所示的实施例中,步骤A03修改为通知系统用户界面隐藏遮挡图像,步骤A04修改为隐藏遮挡图像,步骤A11修改为通知系统用户界面显示遮挡图像,步骤A12修改为显示遮挡图像,即可得到电子设备从适配挖孔屏的第一应用向未适配挖孔屏的第二应用切换的流程,从适配挖孔屏的第一应用向未适配挖孔屏的第二应用切换的流程中的其他步骤均可以参见图7所示的实施例,不再赘述。Exemplarily, in the embodiment shown in FIG. 7, step A03 is modified to notify the system user interface to hide the occlusion image, step A04 is modified to hide the occlusion image, step A11 is modified to notify the system user interface to display the occlusion image, step A12 Modified to display the occlusion image, the process of switching the electronic device from the first application adapted to the punching screen to the second application not adapted to the punching screen can be obtained, and from the first application adapted to the punching screen to the non-adapted application For other steps in the second application switching process of the hole-digging screen, reference may be made to the embodiment shown in FIG. 7 , and details are not repeated here.

从适配挖孔屏的第一应用向未适配挖孔屏的第二应用切换时,系统用户界面可以采用多种方式显示遮挡图像,本实施例对具体的方式不做限定。When switching from the first application adapted to the hole-digging screen to the second application that is not adapted to the hole-digging screen, the system user interface may display the occlusion image in various manners, and the specific manner is not limited in this embodiment.

在一些可选的实施例中,系统用户界面可以在收到WMS的通知后,立即在挖孔屏上显示遮挡图像。结合图3的示例,系统用户界面可以在收到WMS的通知后,立即在挖孔屏的顶部区域和侧边区域分别显示顶部黑条和侧边黑条。In some optional embodiments, the system user interface may display the occlusion image on the hole-digging screen immediately after receiving the notification from the WMS. With reference to the example in Figure 3, the system user interface can display top black bars and side black bars in the top area and side area of the hole-digging screen immediately after receiving the notification from the WMS.

在一些可选的实施例中,系统用户界面也可以在收到WMS的通知后,在指定区域显示尺寸逐次增大的遮挡图像,直至遮挡图像被完全显示,也就是直至遮挡图像的尺寸达到设定值。In some optional embodiments, after receiving the notification from the WMS, the system user interface may also display the occlusion image with the size gradually increasing in the designated area until the occlusion image is completely displayed, that is, until the size of the occlusion image reaches the set size. Value.

结合图3的示例,在收到WMS的通知后,系统用户界面可以先在挖孔屏的顶部区域和侧边区域显示较窄的顶部黑条和侧边黑条,然后逐次增加顶部黑条和侧边黑条的宽度,直至顶部黑条和侧边黑条的宽度达到设定值,使得顶部黑条和侧边黑条达到视觉上的渐入效果。Combined with the example in Figure 3, after receiving the notification from WMS, the system user interface can display narrower top black bars and side black bars in the top area and side area of the hole-digging screen, and then increase the top black bars and side black bars successively. The width of the side black bars until the widths of the top black bars and the side black bars reach the set value, so that the top black bars and the side black bars achieve a visual fading effect.

在一些可选的实施例中,系统用户界面还可以在收到WMS的通知后,在指定区域显示透明度逐次降低的遮挡图像,直至遮挡图像完全不透明,也就是直至遮挡图像的透明度降低至0%。In some optional embodiments, after receiving the notification from the WMS, the system user interface may further display an occlusion image whose transparency gradually decreases in a designated area until the occlusion image is completely opaque, that is, until the transparency of the occlusion image is reduced to 0% .

结合图3的示例,在收到WMS的通知后,系统用户界面可以先在挖孔屏的顶部区域和侧边区域显示透明度较高的顶部黑条和侧边黑条,例如显示80%透明度的顶部黑条和侧边黑条,然后逐次降低顶部黑条和侧边黑条的透明度,直至顶部黑条和侧边黑条的透明度达到0%,即完全不透明,使得顶部黑条和侧边黑条达到视觉上的渐入效果。Combined with the example in Figure 3, after receiving the notification from the WMS, the system user interface can first display the top and side black bars with high transparency in the top area and side area of the hole-digging screen, such as displaying 80% transparency. The top black bar and the side black bar, then reduce the transparency of the top black bar and the side black bar successively, until the transparency of the top black bar and the side black bar reaches 0%, that is, it is completely opaque, making the top black bar and the side black bar black. The bar achieves a visual fade-in effect.

采用逐渐增大尺寸和逐渐降低透明度的方式显示遮挡图像,可以避免遮挡图像突然出现造成的突兀感,改善用户的视觉体验。The occlusion image is displayed by gradually increasing the size and gradually reducing the transparency, which can avoid the sudden appearance of the occlusion image and improve the user's visual experience.

一般的,电子设备中各个模块之间的交互,以及模块自身功能的实现都依赖于对系统中各函数的调用。为了进一步理解本申请提供的显示优化方法,下面以图4所示的电子设备从未适配挖孔屏的应用界面向适配挖孔屏的应用界面切换的场景为示例,说明该过程中电子设备内部的函数调用关系。Generally, the interaction between various modules in the electronic device and the realization of the functions of the modules themselves all depend on the calling of various functions in the system. In order to further understand the display optimization method provided by this application, the following is an example in which the electronic device shown in FIG. The function call relationship inside the device.

请参见图8,为本申请实施例提供的一种应用切换时的显示优化方法的信令图。Please refer to FIG. 8 , which is a signaling diagram of a display optimization method when an application is switched according to an embodiment of the present application.

如图8所示,WMS具体可以包括如下的组件:As shown in Figure 8, the WMS can specifically include the following components:

第一任务管理组件,又称ActivityTaskManagerService;界面信息记录组件,又称ActivityRecord;显示内容组件,又称DisplayContent;远程动画组件,又称RemoteAnimation,第二任务管理组件,又称HwActivityTaskManagerServiceEx,电话窗口管理组件,又称HwPhoneWindowManager。The first task management component, also known as ActivityTaskManagerService; the interface information record component, also known as ActivityRecord; the display content component, also known as DisplayContent; the remote animation component, also known as RemoteAnimation, the second task management component, also known as HwActivityTaskManagerServiceEx, the phone window management component, Also known as HwPhoneWindowManager.

用户接触屏幕时,输入管理模块调用1,触摸事件,又称onTouchEvent()处理用户接触屏幕而触发的事件,从而识别出用户所执行的操作为横滑触碰手势,随后,输入管理模块调用2,触碰手势识别函数,又称detectGesture_Down(),将横滑触碰手势上报给桌面。When the user touches the screen, the input management module calls 1. The touch event, also known as onTouchEvent(), processes the event triggered by the user touching the screen, thereby recognizing that the operation performed by the user is a swipe touch gesture, and then the input management module calls 2 , the touch gesture recognition function, also known as detectGesture_Down(), reports the horizontal sliding touch gesture to the desktop.

调用1和2的过程,可以视为图7中步骤A05的一种具体实现方式。The process of calling 1 and 2 can be regarded as a specific implementation of step A05 in FIG. 7 .

桌面收到上报的横滑触碰手势后,确定用户的意图是显示最近任务,然后调用3,启动最近任务函数,又称startRecentActivity(),通过调用启动最近任务函数,桌面将上述用户意图通知给WMS的第一任务管理组件,然后第一任务管理组件调用4,可视化函数,又称makevisible(),通过调用可视化函数,第一任务管理组件将界面信息记录组件中记录的应用设定为可视化,由此,电子设备可以随着用户的滑动而在屏幕上显示界面信息记录组件中记录的应用。After the desktop receives the reported swipe touch gesture, it determines that the user's intention is to display the recent task, and then calls 3 to start the recent task function, also known as startRecentActivity(). The first task management component of WMS, and then the first task management component calls 4, the visualization function, also known as makevisible(). By calling the visualization function, the first task management component sets the application recorded in the interface information recording component to be visualized, Thus, the electronic device can display the application recorded in the interface information recording component on the screen as the user slides.

桌面调用函数3后,还调用5,通知桌面行为函数,又称notifyLauncherAction(),如前所述,用户执行横滑触碰手势期间,桌面根据滑动方向和滑动距离等信息确定用户的意图是切换至前一个应用还是后一个应用,也就是确定步骤A06中可能切换的应用是前一个应用还是后一个应用。而通过调用通知桌面行为函数,桌面可以将切换至前一个应用或后一个应用的信息通知给第一任务管理组件。After the desktop calls function 3, it also calls 5 to notify the desktop behavior function, also known as notifyLauncherAction(). As mentioned above, during the user's horizontal sliding touch gesture, the desktop determines that the user's intention is to switch based on information such as the sliding direction and sliding distance. To the previous application or the next application, that is, it is determined whether the application that may be switched in step A06 is the previous application or the latter application. And by calling the notification desktop behavior function, the desktop can notify the first task management component of the information of switching to the previous application or the next application.

第一任务管理组件则根据桌面提供的信息在任务记录栈中找到前一个应用或后一个应用的应用标识,然后将应用标识发送给第二任务管理组件。第二任务管理组件收到可能切换的应用的应用标识后,调用6,查询顶部状态函数,又称queryCutoutStatus(),既可以查询到可能切换的应用的遮挡图像显示策略。The first task management component finds the application identifier of the previous application or the 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. After receiving the application identifier of the application that may be switched, the second task management component calls 6 to query the top status function, also known as queryCutoutStatus(), which can query the occlusion image display strategy of the application that may be switched.

示例性的,桌面根据横滑触碰手势的滑动方向,确定可能切换的应用为前一个应用,然后调用通知桌面行为函数将该信息传递给第一任务管理组件,第一任务管理组件根据任务记录栈查询确定前一个应用为视频应用,于是第一任务管理组件将视频应用的应用标识发送给第二任务管理组件,第二任务管理组件调用查询顶部状态函数查询视频应用的遮挡图像显示策略。Exemplarily, the desktop determines that the application that may be switched is the previous application according to the sliding direction of the horizontal sliding touch gesture, and then calls the notification desktop behavior function to transfer the information to the first task management component, and the first task management component records the information according to the task. The stack query determines that the previous application is a video application, so the first task management component sends the application identifier of the video application to the second task management component, and the second task management component calls the query top state function to query the occlusion image display strategy of the video application.

调用5和6的过程,可以视为图7中步骤A06的一种具体实现方式。The process of calling 5 and 6 can be regarded as a specific implementation of step A06 in FIG. 7 .

用户滑动结束,手指离开屏幕时,输入管理模块调用7,触摸事件处理物体离开屏幕而触发的事件,从而识别出用户所执行的操作为横滑抬起手势,随后,输入管理模块调用8,抬起手势识别函数,又称detectGesture_Up(),将横滑抬起手势上报给桌面。When the user swipes and the finger leaves the screen, the input management module calls 7, and the touch event handles the event triggered by the object leaving the screen, thereby recognizing that the operation performed by the user is a horizontal swipe lift gesture, and then the input management module calls 8, lift Start the gesture recognition function, also known as detectGesture_Up(), and report the horizontal swipe up gesture to the desktop.

调用7和8的过程,可以视为图7中步骤A07的一种具体实现方式。The process of calling 7 and 8 can be regarded as a specific implementation of step A07 in FIG. 7 .

收到上报的横滑抬起手势后,桌面调用9,启动后续任务函数,又称startNextActivity(),以通知第一任务管理组件启动最新确定的可能切换的应用,也就是启动前述步骤A08中的第二应用。After receiving the reported swipe up gesture, the desktop calls 9 to start the subsequent task function, also known as startNextActivity(), to notify the first task management component to start the newly determined application that may be switched, that is, start the above-mentioned step A08. Second application.

响应于桌面的通知,第一任务管理组件调用10,可视化函数,从而将第二应用的窗口设定为可见,界面信息记录组件调用11,切换窗口焦点函数,又称updateFocusWindowLocked()切换窗口焦点函数用于使将要启动的第二应用的界面获得屏幕的焦点,通过调用10和11,WMS可以在电子设备的屏幕上创建并显示用于显示第二应用的界面的窗口。In response to the notification from the desktop, the first task management component calls 10, the visualization function, thereby setting the window of the second application to be visible, and the interface information recording component calls 11, the switch window focus function, also known as the updateFocusWindowLocked() switch window focus function For making the interface of the second application to be launched get the focus of the screen, by calling 10 and 11, the WMS can create and display a window for displaying the interface of the second application on the screen of the electronic device.

焦点被切换后,显示内容组件调用12,开启动画函数,又称startAnimation(),通过调用开启动画函数,显示内容组件通知远程动画组件启动远程动画播放。After the focus is switched, the display content component calls 12 to start the animation function, also known as startAnimation(). By calling the start animation function, the display content component notifies the remote animation component to start the remote animation playback.

远程动画组件获得启动远程动画播放的通知之后,调用13,开启远程动画函数,又称startRemoteAnimation(),通过调用13,远程动画组件控制Launcher开始播放从第一应用向第二应用切换的动画效果。也就是说,从第一应用向第二应用切换的动画效果从调用13的时刻开始播放。After the remote animation component gets the notification to start the remote animation playback, it calls 13 to start the remote animation function, also known as startRemoteAnimation(). By calling 13, the remote animation component controls the Launcher to start playing the animation effect of switching 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 moment when 13 is called.

本实施例中,对函数12和13的调用过程,可以视为前述步骤A14的一种具体实现方式。In this embodiment, the calling process of the functions 12 and 13 may be regarded as a specific implementation manner of the foregoing step A14.

焦点被切换后,显示内容组件还调用14,获得顶部状态函数,又称getCutoutStatus(),通过调用函数14,显示内容组件从第二任务管理组件获得第二应用的遮挡图像显示策略,其中,第二应用的遮挡图像显示策略由第二任务管理组件在调用函数6时查询得到。After the focus is switched, the display content component also calls 14 to obtain the top status function, also known as getCutoutStatus(). By calling function 14, the display content component obtains the occlusion image display strategy of the second application from the second task management component. The occlusion image display policy of the second application is obtained by querying the second task management component when calling function 6 .

调用14的过程,可以视为前述步骤A10的一种具体实现方式。The process of invoking 14 can be regarded as a specific implementation manner of the foregoing step A10.

需要说明,显示内容组件可以先调用12,再调用14,也可以先调用14,再调用12,还可以同时调用12和14,本实施例具体顺序不做限定。It should be noted that the display content component may call 12 first, then call 14, or call 14 first, then call 12, or call 12 and 14 at the same time, and the specific order is not limited in this embodiment.

在获得第二应用的遮挡图像显示策略后,显示内容组件根据遮挡图像显示策略确定显示第二应用的界面时需要隐藏遮挡图像,于是调用15,屏幕边沿过滤器函数,又称notifyControlFilterForSideScreen(),通知电话窗口管理组件隐藏遮挡图像。电话窗口管理组件响应该通知,调用16,屏幕边沿可视化函数,即setScreenSideBoxVisibilityAnimation(),从而通知系统用户界面隐藏遮挡图像。After obtaining the occlusion image display strategy of the second application, the display content component determines that the occlusion image needs to be hidden when displaying the interface of the second application according to the occlusion image display strategy, so call 15, the screen edge filter function, also known as notifyControlFilterForSideScreen(), to notify The phone window management component hides the occlusion image. In response to the notification, the phone window management component calls 16, the screen edge visualization function, namely setScreenSideBoxVisibilityAnimation(), thereby informing the system user interface to hide the occlusion image.

调用15和16的过程,可以视为图7所示实施例中步骤A11的一种具体实现方式。The process of calling 15 and 16 can be regarded as a specific implementation of step A11 in the embodiment shown in FIG. 7 .

获得隐藏遮挡图像的通知后,系统用户界面调17,开启隐藏动画函数,又称StartFadeAnimation(),通过调用17,系统用户界面按预定的隐藏方式将屏幕顶部显示的黑条隐藏,并在隐藏完成后,调用18,隐藏动画完成函数,又称fadeAnimationEnd(),以通知桌面顶部黑条已经完全隐藏。After getting the notification to hide the occluded image, the system user interface calls 17 to start the hide animation function, also known as StartFadeAnimation(). After that, call 18, hide the animation completion function, also known as fadeAnimationEnd(), to notify that the black bar at the top of the desktop has been completely hidden.

调用17和18的过程,可以视为图7所示实施例中步骤A12的一种具体实现方式。The process of calling 17 and 18 can be regarded as a specific implementation of step A12 in the embodiment shown in FIG. 7 .

本实施例中,显示内容组件在桌面开始播放应用切换动画效之前,即调用函数13之前,就通知系统用户界面开始隐藏遮挡图像,使得隐藏遮挡图像的过程和播放应用切换动画效果的过程能同时进行,从而缩短了隐藏遮挡图像和应用界面切换结束之间的时间差,改善了挖孔屏从未适配挖孔屏的应用切换到适配挖孔屏的应用时的视觉效果。In this embodiment, before the desktop starts to play the application switching animation effect, that is, before calling function 13, 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 simultaneously Therefore, the time difference between hiding the occlusion image and the end of the application interface switching is shortened, and the visual effect when the hole-digging screen is switched from an application that is not adapted to the hole-digging screen to an application that is adapted to the hole-digging screen is improved.

根据前述实施例,可以得到一种应用切换时的显示优化方法,请参见图9,为本申请实施例提供的一种应用切换时的显示优化方法的流程图。According to the foregoing embodiment, a display optimization method during application switching can be obtained. Referring to FIG. 9 , it is a flowchart of a display optimization method during application switching provided by an embodiment of the present application.

S801,显示第一应用的界面。S801, displaying an interface of a first application.

以图4为示例,第一应用可以是未适配挖孔屏的聊天应用。电子设备在显示未适配挖孔屏的聊天应用时,同时在挖孔屏上显示遮挡图像。Taking FIG. 4 as an example, the first application may be a chat application that is not adapted to the hole-digging screen. When the electronic device displays a chat application that is not adapted to the hole-digging screen, it simultaneously displays a blocking image on the hole-digging screen.

步骤S801的具体实施方式可以参见图7所示的步骤A01至A04。For the specific implementation of step S801, reference may be made to steps A01 to A04 shown in FIG. 7 .

S802,响应于应用切换操作,向第二应用的界面切换,第一应用和第二应用对挖孔屏的适配状态不同。S802, in response to the application switching operation, switch to the interface of the second application, and the adaptation states of the first application and the second application to the hole-digging screen are different.

以图4为示例,应用切换操作,可以是用户执行的横滑手势操作。第二应用,可以是适配挖孔屏的视频应用。Taking FIG. 4 as an example, the application switching operation may be a horizontal swipe gesture operation performed by the user. The second application may be a video application adapted to the hole-digging screen.

步骤S802的具体实施方式可以参见图7所示的步骤A05至A09,以及步骤A13和A14。For the specific implementation of step S802, reference may be made to steps A05 to A09, and steps A13 and A14 shown in FIG. 7 .

S803,在切换至第二应用的界面之前,在挖孔屏上更新遮挡图像的显示状态。S803, before switching to the interface of the second application, update the display state of the occlusion image on the hole-digging screen.

以图4为示例,电子设备可以在成功切换至视频应用的界面之前,隐藏挖孔屏上的遮挡图像。Taking FIG. 4 as an example, the electronic device can hide the occlusion image on the hole-digging screen before successfully switching to the interface of the video application.

步骤S803的具体实施方式可以参见图7所示实施例的步骤A10至A12。For the specific implementation of step S803, reference may be made to steps A10 to A12 of the embodiment shown in FIG. 7 .

上述方法的有益效果与图7所示的实施例一致,不再赘述。The beneficial effect of the above method is the same as that of the embodiment shown in FIG. 7 , and will not be repeated.

本申请实施例提供一种电子设备,包括存储器和一个或多个处理器。Embodiments of the present application provide an electronic device including a memory and one or more processors.

存储器用于存储计算机程序。Memory is used to store computer programs.

一个或多个处理器用于执行计算机程序,具体用于实现本申请任一实施例所提供的应用切换时的显示优化方法。The one or more processors are used to execute a computer program, and are specifically used to implement the display optimization method during application switching provided by any embodiment of the present application.

上述电子设备的其他结构可以参见图1,不再赘述。For other structures of the above electronic device, reference may be made to FIG. 1 , which will not be repeated.

本申请实施例还提供一种计算机存储介质,用于存储计算机程序,该计算机程序被执行时,具体用于实现本申请任一实施例所提供的应用切换时的显示优化方法。An embodiment of the present application further provides a computer storage medium for storing a computer program, and when the computer program is executed, it is specifically used to implement the display optimization method during application switching provided by any embodiment of the present application.

在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.

本申请实施例涉及的多个,是指大于或等于两个。需要说明的是,在本申请实施例的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。The multiple involved in 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, words such as "first" and "second" are only used for the purpose of distinguishing the description, and should not be interpreted as indicating or implying relative importance, nor should it be understood as indicating or implied order.

Claims (10)

1.一种应用切换时的显示优化方法,其特征在于,应用于配置有挖孔屏的电子设备,所述方法包括:1. a display optimization method during application switching, characterized in that, applied to an electronic device configured with a hole-digging screen, the method comprising: 显示第一应用的界面;displaying the interface of the first application; 响应于应用切换操作,向第二应用的界面切换;In response to the application switching operation, switching to the interface of the second application; 根据所述第二应用是否适配所述挖孔屏,在切换至所述第二应用的界面之前在所述挖孔屏上显示或隐藏遮挡图像。According to whether the second application is adapted to the hole-digging screen, the occlusion image is displayed or hidden on the hole-digging screen before switching to the interface of the second application. 2.根据权利要求1所述的方法,其特征在于,所述第一应用适配所述挖孔屏,所述第二应用未适配所述挖孔屏;2. The method according to claim 1, wherein the first application is adapted to the hole-digging screen, and the second application is not adapted to the hole-digging screen; 所述在切换至所述第二应用的界面之前在所述挖孔屏上显示或隐藏遮挡图像,包括:The displaying or hiding the occlusion image on the hole-digging screen before switching to the interface of the second application includes: 在切换至所述第二应用的界面之前在所述挖孔屏上显示遮挡图像。Before switching to the interface of the second application, an occlusion image is displayed on the punching screen. 3.根据权利要求1所述的方法,其特征在于,所述第一应用未适配所述挖孔屏,所述第二应用适配所述挖孔屏;3. The method according to claim 1, wherein the first application is not adapted to the hole-digging screen, and the second application is adapted to the hole-digging screen; 所述显示第一应用界面,包括:The displaying the first application interface includes: 显示第一应用界面,并在所述挖孔屏上显示遮挡图像;displaying the first application interface, and displaying the occlusion image on the hole-digging screen; 所述在切换至所述第二应用的界面之前在所述挖孔屏上显示或隐藏遮挡图像,包括:The displaying or hiding the occlusion image on the hole-digging screen before switching to the interface of the second application includes: 在切换至所述第二应用的界面之前在所述挖孔屏上隐藏遮挡图像。The occlusion image is hidden on the hole-punch screen before switching to the interface of the second application. 4.根据权利要求3所述的方法,其特征在于,所述在所述挖孔屏上隐藏遮挡图像,包括:4. The method according to claim 3, wherein the hiding the occlusion image on the hole-digging screen comprises: 逐次缩小所述挖孔屏上显示的所述遮挡图像的尺寸,直至所述遮挡图像被隐藏。The size of the occlusion image displayed on the hole-digging screen is successively reduced until the occlusion image is hidden. 5.根据权利要求3所述的方法,其特征在于,所述在所述挖孔屏上隐藏遮挡图像,包括:5. The method according to claim 3, wherein the hiding the occlusion image on the hole-digging screen comprises: 逐次提高所述挖孔屏上显示的所述遮挡图像的透明度,直至所述遮挡图像被隐藏。The transparency of the occlusion image displayed on the hole-digging screen is successively increased until the occlusion image is hidden. 6.根据权利要求3所述的方法,其特征在于,所述电子设备的操作系统包括窗口管理服务和系统用户界面;6. The method according to claim 3, wherein the operating system of the electronic device comprises a window management service and a system user interface; 所述在切换至所述第二应用的界面之前在所述挖孔屏上隐藏遮挡图像,包括:The hiding the occlusion image on the hole-digging screen before switching to the interface of the second application includes: 所述窗口管理服务播放应用切换动画效果之前,获得所述第二应用的遮挡图像显示策略;Before the window management service plays the application switching animation effect, obtain the occlusion image display strategy of the second application; 所述窗口管理服务根据所述第二应用的遮挡图像显示策略,通知所述系统用户界面隐藏遮挡图像;The window management service notifies the system user interface to hide the occlusion image according to the occlusion image display policy of the second application; 所述系统用户界面响应所述窗口管理服务的通知,隐藏所述遮挡图像。The system user interface hides the occlusion image in response to a notification from the window management service. 7.根据权利要求6所述的方法,其特征在于,所述应用切换操作为横滑手势操作,所述横滑手势操作包括横滑触碰手势和横滑抬起手势;7. The method according to claim 6, wherein the application switching operation is a horizontal sliding gesture operation, and the horizontal sliding gesture operation comprises a horizontal sliding touch gesture and a horizontal sliding lift gesture; 所述电子设备的操作系统还包括桌面;The operating system of the electronic device also includes a desktop; 所述响应于应用切换操作,向第二应用的界面切换,包括:The switching to the interface of the second application in response to the application switching operation includes: 所述桌面响应所述横滑触碰手势,触发所述窗口管理服务查询并缓存所述第二应用的遮挡图像显示策略;The desktop responds to the horizontal sliding touch gesture, triggering the window management service to query and cache the occlusion image display policy of the second application; 所述桌面响应所述横滑抬起手势,触发所述窗口管理服务启动所述第二应用的窗口;The desktop responds to the horizontal slide up gesture, triggering the window management service to start the window of the second application; 所述窗口管理服务播放应用切换动画效果。The window management service plays an application switching animation effect. 8.根据权利要求7所述的方法,其特征在于,所述电子设备的操作系统还包括应用管理服务;8. The method according to claim 7, wherein the operating system of the electronic device further comprises an application management service; 所述桌面响应所述横滑抬起手势,触发所述窗口管理服务启动所述第二应用的窗口,包括:The desktop, in response to the lateral slide up gesture, triggers the window management service to start the window of the second application, including: 所述桌面响应所述横滑抬起手势,通知所述应用管理服务启动所述第二应用;The desktop responds to the horizontal slide up gesture, notifying the application management service to start the second application; 响应于所述桌面的通知,所述应用管理服务通知所述窗口管理服务启动所述第二应用的窗口。In response to the notification from the desktop, the application management service notifies the window management service to launch a window of the second application. 9.一种电子设备,其特征在于,包括存储器和一个或多个处理器;9. An electronic device comprising a memory and one or more processors; 所述存储器用于存储计算机程序;the memory is used to store computer programs; 所述一个或多个处理器用于执行所述计算机程序,具体用于实现如权利要求1至8任意一项所述的应用切换时的显示优化方法。The one or more processors are configured to execute the computer program, and are specifically configured to implement the display optimization method during application switching according to any one of claims 1 to 8. 10.一种计算机存储介质,其特征在于,用于存储计算机程序,所述计算机程序被执行时,具体用于实现如权利要求1至8任意一项所述的应用切换时的显示优化方法。10 . A computer storage medium, characterized in that it is used for storing a computer program, and when the computer program is executed, it is specifically used to implement the display optimization method when an application is switched according to any one of claims 1 to 8 .
CN202210484262.4A 2022-05-06 2022-05-06 Display optimization method, device and storage medium when switching applications 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 when switching applications

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 when switching applications

Publications (2)

Publication Number Publication Date
CN114637451A true CN114637451A (en) 2022-06-17
CN114637451B 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 when switching applications

Country Status (1)

Country Link
CN (1) CN114637451B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016709A (en) * 2022-08-09 2022-09-06 荣耀终端有限公司 Display method of application interface, electronic equipment and storage medium
CN115658213A (en) * 2022-12-02 2023-01-31 荣耀终端有限公司 A display method, electronic device and storage medium
CN118519568A (en) * 2024-04-19 2024-08-20 荣耀终端有限公司 Display control method, electronic device, computer program product, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020191029A1 (en) * 2001-05-16 2002-12-19 Synaptics, Inc. 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
CN108874288A (en) * 2018-06-05 2018-11-23 Oppo广东移动通信有限公司 Application program switching method, device, terminal and storage medium
CN112748894A (en) * 2019-10-30 2021-05-04 北京小米移动软件有限公司 Hole digging screen display method and device
CN114168031A (en) * 2022-02-11 2022-03-11 荣耀终端有限公司 Display optimization method, device and storage medium for hole-digging screen

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020191029A1 (en) * 2001-05-16 2002-12-19 Synaptics, Inc. 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
CN108874288A (en) * 2018-06-05 2018-11-23 Oppo广东移动通信有限公司 Application program switching method, device, terminal and storage medium
CN112748894A (en) * 2019-10-30 2021-05-04 北京小米移动软件有限公司 Hole digging screen display method and device
CN114168031A (en) * 2022-02-11 2022-03-11 荣耀终端有限公司 Display optimization method, device and storage medium for hole-digging screen

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
三星官翻机: "一招教你快速切换应用", 《BILIBILI-HTTPS://WWW.BILIBILI.COM/VIDEO/BV1NL411N7EP?SPM_ID_FROM=333.1007.TOP_RIGHT_BAR_WINDOW_CUSTOM_COLLECTION.CONTENT.CLICK&VD_SOURCE=3FD9CDD7B3B6AB86E7A1AD2D32FC1FBF》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016709A (en) * 2022-08-09 2022-09-06 荣耀终端有限公司 Display method of application interface, electronic equipment and storage medium
CN115016709B (en) * 2022-08-09 2022-12-09 荣耀终端有限公司 Display method of application interface, electronic equipment and storage medium
CN115658213A (en) * 2022-12-02 2023-01-31 荣耀终端有限公司 A display method, electronic device and storage medium
CN118519568A (en) * 2024-04-19 2024-08-20 荣耀终端有限公司 Display control method, electronic device, computer program product, and storage medium

Also Published As

Publication number Publication date
CN114637451B (en) 2023-06-20

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 when switching applications
US20210173549A1 (en) Method for icon display, terminal, and storage medium
CN114168031B (en) Display optimization method and device for hole digging screen and storage medium
WO2019080511A1 (en) Multi-task management method and terminal device
EP3454193A1 (en) Control method and apparatus of terminal device, and storage medium
CN106919243B (en) Mobile terminal control method and device and mobile terminal
US11546457B2 (en) Electronic device and method of operating electronic device in virtual reality
WO2019128193A1 (en) Mobile terminal, and floating window operation control method and device
WO2022063022A1 (en) Video preview method and apparatus and electronic device
US11138956B2 (en) Method for controlling display of terminal, storage medium, and electronic device
KR20180004427A (en) User interface providing method and electronic device supporting the same
WO2019201140A1 (en) Application display method and apparatus, storage medium, and electronic device
CN108717345A (en) Methods of exhibiting, device, terminal and the storage medium of functionality controls
WO2020181956A1 (en) Method for displaying application identifier, and terminal apparatus
WO2019047187A1 (en) Navigation bar control method and device
CN108563416A (en) Application display method and device, storage medium and electronic equipment
EP4064016A1 (en) Interface display method of an application and apparatus
CN115361468B (en) Display optimization method, device and storage medium when screen rotates
WO2019047184A1 (en) Information display method, apparatus, and terminal
CN114461312A (en) Method for switching application and task in application and electronic equipment
WO2021159950A1 (en) Label display method and device, and computer readable medium
WO2021068112A1 (en) Method and apparatus for processing touch event, mobile terminal and storage medium
WO2020113503A1 (en) Screen recording method, flexible electronic device and computer readable storage medium
CN116048373B (en) Display method of suspension ball control, electronic equipment and storage medium

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
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address