Processing method, device and program product

By obtaining the display area information of the application page, determining the overlapping area with the status bar and title bar, and sending notification messages to ensure the priority of display, it solves the problem of conflict between the status bar and title bar display in Android system, improving the user experience.

CN119718510APending Publication Date: 2025-03-28LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411753464.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The status bar and title bar in the Android system are two independent components. If they occupy a common area, they will cause display conflicts, such as inconsistent background colors, which will affect the user experience.

Method used

By obtaining the first display area information of the application page to be displayed, it is determined that there is a target area where the application page and the first display component overlap the display area, and send a notification message to the target application to notify it to draw the target area by the application corresponding to the first display component, ensuring that the display priority is greater than the application page.

Benefits of technology

It solves the problem of conflicts in the status bar and title bar display in the common area, realizes background color coordination, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718510A_ABST
    Figure CN119718510A_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and device and a program product, and the method comprises the steps: obtaining first display region information of a to-be-displayed application page; based on the first display area information, determining that the application page and a first display component have a target area with overlapped display areas; a first notification message is sent to a target application program corresponding to the application page, and the first notification message is used for notifying the target application program that the target area is drawn by a first application program corresponding to the first display component or notifying the target application program to draw the target area; wherein the display priority of the first display component is greater than that of the application page; and displaying the drawn target area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic technology, and relate to but are not limited to a processing method, device, and program product. Background Art

[0002] The system-level windows of the Android system include a status bar, a navigation bar, a caption bar, a task bar, and the like.

[0003] The status bar is an important system component used to display the current system status, notifications, etc.

[0004] The title bar is used to control the activation (Activity) page of a certain application, for example, switching the activation page between different window modes such as floating window, split screen, full screen, etc.; minimizing the activation page, etc.

[0005] As two independent components, if the status bar and title bar occupy the same area, there will be display conflicts in different scenarios, such as black borders and inconsistent background colors. How to solve the above problems has become a technical issue that needs to be solved urgently. Summary of the invention

[0006] In view of this, embodiments of the present application provide a processing method, an apparatus, and a program product.

[0007] The technical solution of the embodiment of the present application is implemented as follows:

[0008] In a first aspect, an embodiment of the present application provides a processing method, including:

[0009] Obtaining first display area information of the application page to be displayed;

[0010] Determine, based on the first display area information, a target area where the display area of ​​the application page overlaps with the first display component;

[0011] Sending a first notification message to a target application corresponding to the application page, wherein the first notification message is used to notify the target application that a target area is drawn by a first application corresponding to a first display component, or to notify the target application to draw the target area; wherein a display priority of the first display component is greater than a display priority of the application page;

[0012] Displays the target area where painting is completed.

[0013] In a second aspect, an embodiment of the present application provides a processing device, including:

[0014] A first acquisition module, used to acquire first display area information of an application page to be displayed;

[0015] A first determination module, configured to determine, based on the first display area information, a target area where the display area of ​​the application page overlaps with the display area of ​​the first display component;

[0016] A first message sending module, used to send a first notification message to a target application corresponding to the application page, wherein the first notification message is used to notify the target application that a target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page;

[0017] The display module is used to display the target area after the drawing is completed.

[0018] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, the memory storing a computer program that can be run on the processor, and the processor executing the program to obtain first display area information of an application page to be displayed; determining a target area where the display area of ​​the application page overlaps with that of a first display component based on the first display area information; sending a first notification message to a target application corresponding to the application page, wherein the first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page; and displaying the target area where the drawing is completed.

[0019] In a fourth aspect, an embodiment of the present application provides a storage medium storing executable instructions for obtaining first display area information of an application page to be displayed when executed by a processor; determining a target area where the display area of ​​the application page overlaps with that of a first display component based on the first display area information; sending a first notification message to a target application corresponding to the application page, wherein the first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page; and displaying the target area after the drawing is completed.

[0020] In a fifth aspect, a computer program product includes a computer program or instructions, which, when executed by a processor, achieves obtaining first display area information of an application page to be displayed; determining a target area where the display area of ​​the application page overlaps with that of a first display component based on the first display area information; sending a first notification message to a target application corresponding to the application page, wherein the first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page; and displaying the target area after the drawing is completed. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1A A schematic diagram of an electronic device interface display provided in an embodiment of the present application;

[0022] Figure 1B A schematic diagram of an implementation flow of a processing method provided in an embodiment of the present application;

[0023] Figure 2A A schematic diagram of an implementation flow of a method for processing an application page provided in an embodiment of the present application;

[0024] Figure 2B A schematic diagram of a screen display of an electronic device provided in an embodiment of the present application;

[0025] Figure 2C A schematic diagram of an implementation flow of a method for processing an application page provided in an embodiment of the present application;

[0026] Figure 3 A schematic diagram of an implementation flow of a method for displaying sub-page information provided in an embodiment of the present application;

[0027] Figure 4 A schematic diagram of a flow chart of a page drawing method provided in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of the structure of a processing device provided in an embodiment of the present application;

[0029] Figure 6 A hardware entity schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the embodiments of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0031] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0032] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0034] Figure 1A A schematic diagram of an electronic device interface display provided in an embodiment of the present application, such as Figure 1A As shown, the display interface of the electronic device simultaneously displays the first display component display area 11 and the application page display area 12, wherein:

[0035] The first display component includes two independent components, a status bar and a title bar, which occupy a common area, namely, the first display component display area 11 of the screen occupied by the first display component. When the application page display area 12 overlaps with the first display component display area 11, since the drawing subject of the common area is unclear, that is, it is unclear whether the system program or the application program is responsible for drawing, conflicts such as inconsistent background colors may occur in different scenarios.

[0036] like Figure 1A The background of the display area 11 of the first display component at the top of the window appears black due to the color conflict caused by the overlapping settings of the application page, the status bar and the title bar, resulting in the user not being able to see the icons displayed in the first display component. In addition, since the display area 11 of the first display component appears black, it is not coordinated with the color of the entire window, which affects the user experience.

[0037] The present application embodiment provides a processing method, such as Figure 1B As shown, the method includes:

[0038] Step S110, obtaining first display area information of the application page to be displayed;

[0039] Here, an application page refers to a page in a user interface (UI) or application that is displayed on an electronic device by an application to perform a specific function or display specific information. In a mobile application (such as an iOS or Android application) or a desktop application (such as a Windows, macOS or Linux application), an application page refers to an independent screen or view displayed by the application to display specific information or allow the user to perform a specific operation. For example, a shopping application may have a "home" to display product recommendations, a "search" page to find products, and a "shopping cart" page to view and manage the user's shopping list. In a web application, an application page generally refers to one or more Hypertext Markup Language (HTML) pages on a website that are presented to the user through a browser. A web application can contain multiple pages, each of which performs a different function or provides different information. For example, an online banking application may have a "login" page to authenticate the user, an "account overview" page to display the user's financial status, and a "transfer" page to allow the user to transfer money to other accounts.

[0040] The page is displayed in the display area of ​​the electronic device, that is, the screen of the electronic device. The first display area information of the application page refers to the size of the space occupied by the web page or application page on the screen of the electronic device, including the width and height of the page. The first display area information can also be represented by the coordinates of the application page, which include: left coordinate (left), top coordinate (top), right coordinate (right) and bottom coordinate (bottom).

[0041] During implementation, when the application page is not yet displayed in the display area of ​​the electronic device, the first display area information of the application page can be obtained, including: page width information, page height information, and the area where the page is displayed. For example, when the screen size of the electronic device is 6 inches, that is, about 13.28 cm long and about 7.47 cm wide, if the application page is displayed in full screen, the length of the application page is also about 13.28 cm and the width is about 7.47 cm.

[0042] Step S120: determining a target area where the display area of ​​the application page overlaps with the display area of ​​the first display component based on the first display area information;

[0043] Here, the first display component can be a system-level display component. For example, in the Android system, the system-level display component can have a higher level and cover the application page of other applications. These system-level display components are created and managed by system services and are used to display system-level notifications, floating windows, system dialog boxes, etc. Including the status bar (StatusBar), which is used to display system information such as time, battery status, signal strength, and notifications. The navigation bar (NavigationBar), which includes navigation buttons such as the home button, the return button, and the multitasking button, is convenient for users to switch pages and return. Input method window: a window displayed when the virtual keyboard pops up, used to enter text. The title bar (caption bar) is an important element in the application interface, which is used to display the title of the current page, the name (or icon) of the application, and possible operation buttons (such as the return button, menu button, etc.). Notification bar (Notificationshade): The notification center displayed by pulling down from the top of the screen is used to display notifications and reminders of the application. Quick settings panel (Quick Settings): The quick settings options displayed after further pulling down the notification bar allow users to quickly adjust settings such as screen brightness, volume, network connection, etc. Overlay Windows: Some applications can request to create overlay windows to display additional information or functions on the interface of other applications. These overlay windows are also a type of system-level display component.

[0044] During the implementation process, the display area information of the first display component can be determined first. Here, the first display component is usually located at a specific position on the screen of the electronic device, such as the status bar is located at the top of the screen and the navigation bar is located at the bottom of the screen. These positions can be fixed to ensure that users can easily access and use these functions. For example, the status bar: located at the top of the screen, displays information such as time, battery status, signal strength, etc. Users can view more notifications and setting options by pulling down the status bar. The title bar is usually located at the top of the screen, and can be set to be immediately below the status bar, or it can be set to occupy a common area with the status bar. Navigation bar: located at the bottom of the screen, including navigation buttons such as the return key, home key, and multitasking key. These buttons help users switch between different applications and return to the main interface. Notification bar: an area displayed by pulling down from the top of the screen, used to display notifications and reminders of the application. Users can view and operate notifications here, such as replying to messages, deleting notifications, etc. Input method window: when the user needs to enter text, the input method window will pop up and cover the current application window. The input method window contains input elements such as keyboards and candidate words to help users complete text input. Floating window: Some applications can request to create a floating window to display additional information or functions on the interface of other applications. These floating windows are also a kind of system-level display components and can be created and displayed with user authorization.

[0045] After determining the display area of ​​the first display component, the target area where the display area of ​​the application page overlaps with the first display component can be determined based on the first display area. For example, if the display area of ​​the first display component is located in the top area of ​​the screen, it can be determined based on the first display area information of the application page whether the application page also has an area displayed in the same top area of ​​the screen. If the display area of ​​the first display component is the area occupied by the status bar and the title bar, it is determined whether the application page has an area overlapping with the status bar and the title bar.

[0046] Step S130: Send a first notification message to a target application corresponding to the application page, wherein the first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page;

[0047] Here, display priority refers to the relative importance of different elements or interface components displayed on the screen. It determines which element will be placed in the forefront or most prominent position when multiple elements need to be displayed at the same time. The display priority of the first display component is greater than the display priority of the application page, that is, the first display component is located above the application page in the display hierarchy. This represents that even if the application page is the interface that the user is currently interacting with, the first display component can still visually cover or partially cover the application page. The display priority setting may be controlled by the operating system, the developer of the application, or user-defined settings. For example, on a mobile device, the operating system may allow the user to control which display components have a high display priority by adjusting the notification settings.

[0048] In some embodiments, the first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component. Here, when the first display component is a system-level component, the first display component is created and managed by a system service (such as a notification manager, a window manager, etc.), and the layout and drawing of the system-level display component are the responsibility of the system service, which ensures the consistency and stability of the system-level window while reducing the impact of the application on system resources. During implementation, the first application can be a system program, and further can be a process in the system program. For example, the first notification message can notify the target application that the target area is drawn by the system program, and the target application does not participate in the drawing of the target area.

[0049] In some embodiments, the first notification message is used to notify the target application to draw the target area. In the implementation process, the drawing can be performed by a process of the target application. Since the drawing is controlled by the target application, the first notification message can be sent to the target application.

[0050] Step S140: displaying the target area after drawing.

[0051] During the implementation process, the target area after the drawing is completed can be displayed on the screen of the electronic device.

[0052] In an embodiment of the present application, when it is determined based on the first display area information that there is a target area where the display area of ​​the application page overlaps with that of the first display component, a first notification message is sent to the target application corresponding to the application page, wherein the first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area. In this way, since the first notification message notifies the target application that the target area is drawn by the first application or the target application, the drawing execution subject of the target area is clear, and the target area can be drawn in a suitable display mode, thereby solving the problem of conflicts between the display component and the display page, such as inconsistent background colors.

[0053] In some embodiments, Figure 2A As shown, a method for processing an application page is provided, which can be implemented by the following steps:

[0054] Step S201: Generate a second notification message based on the second display area information of the target area;

[0055] Here, the second display area information of the target area can be the coordinate information corresponding to the target area, including at least one of the following coordinates: left coordinate, top coordinate, right coordinate, bottom coordinate. For example, in the Android operating system, the upper left corner of the screen is the origin (0, 0), the right is the positive direction of the x-axis, and the downward is the positive direction of the y-axis. Therefore, the y coordinate at the bottom of the status bar is the height of the status bar. The height of the status bar (assuming that the status bar is at the top of the screen), that is, the y value of the coordinate at the bottom of the status bar, can be obtained, and the y value is used as the second display area information.

[0056] During implementation, the system program may generate a second notification message based on the acquired second display area information.

[0057] Step S202: Send a second notification message to the target application, so that the target application adds a blank area to the application page based on the second display area information.

[0058] Here, you can add a blank area by adding paddingTop to the application page. Here, paddingTop is a property in Cascading Style Sheets (CSS) that is used to set the space between the content of an element and its top border. It determines the blank area between the top of the element content and its border. Among them, Cascading Style Sheets is a style sheet language used to describe the appearance and format of documents in HTML or eXtensible Markup Language (XML), including XML languages ​​such as Scalable Vector Graphics SVG and Extensible Hypertext Markup Language XHTML.

[0059] During implementation, after receiving the second notification message including the second display area information, the target application corresponding to the application page can add a blank area to the application page based on the second display area information. Figure 2B A screen display diagram of an electronic device provided in an embodiment of the present application, such as Figure 2B As shown, the screen displays the target area 21 occupied by the first display component and the application page, and the application content visible area 22. During the implementation process, after receiving the second notification message, the target application sets the target area 21 on the application page to a blank area based on the second display area information of the target area, that is, the area where the application page and the first display component overlap.

[0060] In the embodiment of the present application, a second notification message including the second display area information is sent to the target application, so that the target application adds a blank area to the application page based on the second display area information. In this way, by generating a second notification message that can carry the second display area information of the target area, the target application can add a blank area to the application based on the second display area information, thereby avoiding conflicts between the content of the application page and the display of the first display component.

[0061] In some implementations, the above method for processing an application page may also be implemented by the following steps:

[0062] Step S203: In response to the second notification message, the target application draws the blank area as a transparent display.

[0063] During implementation, the target application may also draw the blank area as a transparent display in response to the second notification message, so that the blank area can normally display the content displayed by the first display component. That is, the target application is responsible for drawing the blank area.

[0064] In some embodiments, the background of the blank area can be set to a transparent color. In this way, the area occupied by the blank area appears to be transparent visually. In the implementation process, the background below the blank area can be drawn to be transparent, or the view content below the blank area is visible.

[0065] For example, in the target application, the blank area can be drawn as transparent so that the content of the status bar and / or title bar can be displayed normally.

[0066] In some embodiments, the target application can also set the blank area to the same color as the background of the application page. Since the first display component is displayed on the blank area, the background color of the first display component can be rendered to the same color as the background of the application page. For example, if the background color of the application page is red, the target application can also render the background color of the first display component to the same red, so that the screen background color of the entire electronic device is the same.

[0067] In the embodiment of the present application, in response to the second notification message, the target application draws the blank area as a transparent display, so that the blank area can normally display the content displayed by the first display component.

[0068] In some embodiments, Figure 2C As shown, a method for processing an application page is provided, which can be implemented by the following steps:

[0069] Step S211, obtaining the second display area information of the target area;

[0070] Here, the second display area information of the target area can be the coordinate information corresponding to the target area, including at least one of the following coordinates: left coordinate, top coordinate, right coordinate, bottom coordinate. For example, in the Android operating system, the upper left corner of the screen is the origin (0, 0), the right is the positive direction of the x-axis, and the downward is the positive direction of the y-axis. Therefore, the y coordinate at the bottom of the status bar is the height of the status bar. The height of the status bar can be obtained (assuming that the status bar is at the top of the screen), that is, the y value of the coordinate at the bottom of the status bar. During implementation, the y value can be obtained as the second display area information.

[0071] Step S212: setting the first display area information of the application page to third display area information based on the second display area information, wherein the third display area information does not overlap with the second display area information, so that the target area does not display the application page.

[0072] Here, the third display area information does not overlap with the second display area information, which can be achieved by moving the application page downward or upward.

[0073] In some embodiments, when the first display component is located at the top of the screen of the electronic device, the application page can be moved down in the display area of ​​the screen based on the setting area (target area) of the first display component, so that the third display area information does not overlap with the second display area information, and the target area occupied by the first display component does not display the application page.

[0074] In some embodiments, when the first display component is located at the bottom of the screen of the electronic device, the display area of ​​the application screen can be moved up based on the setting area of ​​the first component, so that the third display area information does not overlap with the second display area information, and the target area occupied by the first display component does not display the application page.

[0075] In the embodiment of the present application, the first display area information of the application page is set as the third display area information based on the second display area information, and the third area display information does not overlap with the second display area information. In this way, by changing the display area of ​​the application page, the application page is not displayed in the target area, effectively avoiding the overlapping setting of the application page and the first display component.

[0076] In some embodiments, the above method for processing an application page may also be implemented by the following steps:

[0077] Step S213, obtaining the target background color of the application page;

[0078] Here, the background color of the application page refers to the color used to fill the background of the application page in the application or web page. This color can be a solid color, a gradient color, a picture, or other graphic elements. Front-end code implementation, you can use HTML and CSS to set the background color of the page. Back-end template implementation, that is, the application page is rendered by the back-end template engine, and the background color can be set in the template file. This can be achieved by inserting appropriate CSS styles in the HTML template. Application setting implementation, that is, some applications may allow users to change the background color of the page through the settings within the application.

[0079] In some embodiments, the background color of the application page can be obtained through a front-end method, such as a browser developer tool, viewing the background color attribute of the target element in the "Style" panel; the background color can also be obtained dynamically through JavaScript. Among them, JavaScript is a lightweight, interpreted or just-in-time compiled programming language with function priority.

[0080] In some embodiments, if the application page is generated by backend rendering and the backend code has permission to access the style information of the page, the background color can be obtained in the backend code. The acquisition of the background color depends on the choice of the backend development language and framework. For example, in the Java Spring framework, the color information related to the page can be obtained through request attributes or model attributes. The Java Spring framework is an open source, lightweight application framework.

[0081] Step S214: Rendering the background color of the target area as the target background color.

[0082] Here, the background color of the target area is rendered as the target background color, and the Document Object Model (DOM) element can be manipulated in the front-end code and its CSS style can be modified.

[0083] During implementation, after determining the target area, you can write CSS styles. For example, you can directly add the following styles to the HTML document: <style>标签内编写CSS,或者在外部CSS文件中定义样式。或者通过JavaScript动态地应用样式。然后,使用JavaScript修改背景颜色,即通过JavaScript获取目标背景色,并将目标区域的背景颜色设置为目标背景色。

[0084] 在一些实施例中,以上获取应用页面的目标背景色;将目标区域的背景颜色渲染为目标背景色,可以由系统程序中的第一应用程序执行,该第一应用程序可以为第一显示组件对应的应用进程。举例来说,应用页面的背景颜色为红色,则第一应用程序可以将第一显示组件的背景颜色也渲染为相同的红色,使得整个电子设备的屏幕背景颜色统一。

[0085] 本申请实施例中,将目标区域的背景颜色渲染为目标背景色。这样,可以将目标区域渲染为与应用页面相同的背景色,使得整个电子设备的屏幕背景颜色统一。

[0086] 在一些实施例中,如图3所示,提供一种显示子页面信息的方法,可以通过以下步骤实现:

[0087] 步骤S310、发送第三通知消息至所述目标应用程序,所述第三通知消息用于获取所述应用页面的子页面信息;

[0088] 这里,应用页面的子页面信息指的是在主页面(或称为父页面)之下,用于展示具体功能、内容或数据的多个分页或视图。这些子页面可以根据应用的需求和设计风格,具有不同的结构和功能。举例来说,子页面可以为主页面的的标识栏、工具栏或导航栏,可以设置缩小按钮、放大按钮或者关闭按钮。子页面也可以设置为主页面的翻页或跳转功能。子页面还可以设置为基于主页面信息提取的摘要信息。

[0089] 在实施过程中,电子设备的系统程序可以发送用于获取应用页面的子页面信息的第三通知消息至应用页面对应的目标应用程序。

[0090] 步骤S320、基于所述应用程序发送的消息,获取所述子页面信息;

[0091] 目标应用程序在接收到第三通知消息后,可以获取子页面信息,再将子页面信息返回系统程序。系统程序基于该应用程序发送的消息,获取子页面信息。举例来说,目标应用程序可以基于第三通知消息获取子页面信息为设置的导航栏信息,则可以将该导航栏信息返回系统程序。

[0092] 步骤S330、解析所述子页面信息,显示所述子页面信息于所述第一显示组件的显示区域。

[0093] 在实施过程中,系统程序通过解析子页面信息,将子页面信息显示于第一显示组件的显示区域。

[0094] 在一些实施例中,第一显示组件可以重新布局,以同时显示原有的信息和子页面信息。举例来说,在解析子页面信息得到应用页面的导航栏信息的情况下,可以将导航栏信息与原有的信息不重叠的显示于第一显示组件。

[0095] 本申请实施例中,发送用于获取应用页面的子页面信息第三通知消息至目标应用程序;可以获取子页面信息、解析子页面信息,显示子页面信息于第一显示组件的显示区域。这样,可以实现通过发送第三通知消息,系统程序与目标应用程序交互,以获取需要显示于第一显示组件中的应用页面中的子页面信息,并通过重新布局第一显示组件中的显示内容,实现将子页面信息与第一显示组件原有的信息不重叠的显示于第一显示组件。

[0096] 在一些实施例中,在以上步骤S110"获取待显示的应用页面的第一显示区域信息”之前,上述处理方法还包括以下步骤:

[0097] 步骤S150、确定所述第一显示组件的状态位置发生变化;

[0098] 这里,第一显示组件可以包括以下至少之一的组件:状态栏、导航栏、标题栏、通知栏等。

[0099] 在一些实施例中,操作系统(如iOS或Android)的更新可能会改变状态栏的显示方式或位置。例如,在iOS中,当电子设备作为个人热点且有连接时,系统状态栏下面会多一行热点连接提示栏,这会导致状态栏位置的下移。再例如,某些第三方应用程序可能会与系统状态栏产生冲突,导致显示异常或位置变化。或者,用户在调整系统设置时,可能更改了与状态栏相关的设置,如显示选项、字体大小等,这些更改可能会影响状态栏的位置。

[0100] 在一些实施例中,当设备从竖屏切换到横屏或从横屏切换到竖屏时,导航栏的位置可能会发生变化,以适应新的屏幕方向。系统更新和第三方软件也可能影响导航栏的位置和显示方式。

[0101] 或者;

[0102] 步骤S160、确定所述应用页面在电子设备显示区域的显示方向和 / 或显示位置发生变化。

[0103] 这里,电子设备(如智能手机和平板电脑)支持屏幕旋转。当用户旋转电子设备时,应用页面也会相应地旋转,改变现实方向以适应新的屏幕方向。

[0104] 在一些实施例中,应用页面的布局可能会根据屏幕尺寸、分辨率或设备类型进行调整,显示位置也可能会变化。

[0105] 在一些实施例中,应用页面还可以响应用户对应用页面的设置发生显示方向和 / 或显示位置的变化。

[0106] 本申请实施例中,确定第一显示组件的状态位置发生变化;或者;确定应用页面在电子设备显示区域的显示方向和 / 或显示位置发生变化。这样,可以触发电子设备重新布局第一显示组件和应用页面,以实现在现实应用页面的同时能够正常显示第一显示组件,有效避免显示冲突引起的异常显示情况。

[0107] 图4为本申请实施例提供的一种页面绘制方法的流程示意图,如图4所示,可以通过以下步骤实现:

[0108] 步骤S410、系统窗口内组件或者内容发生变化;

[0109] 在实施过程中,可以确定系统窗口,例如状态栏和 / 或标题栏坐标发生变化,或者系统窗口存在显示或者隐藏等变化。

[0110] 步骤S420、计算系统窗口的边界;

[0111] 在实施过程中,可以获取变化后的窗口的边界信息,利用该边界信息确定窗口在屏幕的显示区域。

[0112] 步骤S430、窗口重新排布布局;

[0113] 这里,可以通过执行以下步骤S431和步骤S432实现窗口重新排布布局。

[0114] 步骤S431、计算并存储当前应用页面的最上层坐标(左侧坐标,顶部坐标、右侧坐标、底部坐标);

[0115] 在实施过程中,可以根据当前应用页面(View)及其子View的信息,计算当前应用页面的起始坐标,即(左侧坐标、顶部坐标)及应用页面的高度,并记录这些信息,即当前应用页面的最上层窗口(top view)坐标(左侧坐标,顶部坐标、右侧坐标、底部坐标)到当前应用页面对应的信息中。

[0116] 步骤S432、根据最上层应用窗口的坐标和系统顶部窗口的坐标,判断是否有重叠,若有重叠,则为当前最上层应用窗口添加上内边距,其数据为系统顶部窗口的高度;

[0117] 这里,上内边距(paddingTop)是层叠样式表中的一个属性,用于设置元素的内容与其上边框之间的空间大小。决定了元素内容顶部与其边框之间的空白区域。

[0118] 在实施过程中,可以通过设置在应用窗口设置空白区域,以避免应用窗口与系统顶部窗口的设置冲突。

[0119] 步骤S440、由系统程序负责重叠区域的绘制。

[0120] 在一些实施例中,还可以设置应用窗口向下移动,将系统顶部窗口的区域空出来,由系统程序(第一应用程序)执行此区重绘等操作。

[0121] 在一些实施例中,非系统窗口区域则由应用界面对应的应用程序执行重绘等操作。

[0122] 本申请实施例中,在做窗口布局计算的时候,根据当前应用页面及其子页面的信息,计算应用页面占用的屏幕区域。根据系统窗口的坐标检查是否与当前应用页面的占用屏幕区域存在重叠,如果有重叠则为当前页面添加空白区域,将系统窗口区域空出来,由系统程序执行此区重绘等操作,非系统窗口占用区域则由应用负责重绘等操作。这样,可以有效避免应用页面的占用屏幕区域与系统窗口存在重叠配色不一致或黑边问题。

[0123] 基于前述的实施例,本申请实施例提供一种处理装置,该装置包括所包括的各模块,可以通过电子设备中的处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为中央处理器(Central Processing Unit,CPU)、微处理器(Microprocessor Unit,MPU)、数字信号处理器(Digital Signal Process,DSP)或现场可编程门阵列(Field Programmable Gate Array,FPGA)等。

[0124] 图5为本申请实施例提供的处理装置的组成结构示意图,如图5所示,所述装置500包括:

[0125] 第一获取模块510,获取待显示的应用页面的第一显示区域信息;

[0126] 第一确定模块520,基于所述第一显示区域信息确定所述应用页面与第一显示组件存在显示区域重叠的目标区域;

[0127] 第一消息发送模块530,用于发送第一通知消息至所述应用页面对应的目标应用程序,其中,所述第一通知消息用于通知所述目标应用程序所述目标区域由所述第一显示组件对应的第一应用程序绘制,或者通知所述目标应用程序绘制所述目标区域;其中,所述第一显示组件的显示优先级大于所述应用页面的显示优先级;

[0128] 显示模块540,用于显示完成绘制的所述目标区域。

[0129] 在一些实施例中,所述处理装置还包括消息生成模块和第二消息发送模块,其中,所述消息生成模块,用于基于所述目标区域的第二显示区域信息生成第二通知消息;所述第二消息发送模块,用于发送第二通知消息至所述目标应用程序,以使得所述目标应用程序基于所述第二显示区域信息为所述应用页面添加空白区域。

[0130] 在一些实施例中,所述装置还包括绘制模块,用于响应所述第二通知消息,所述目标应用程序绘制所述空白区域为透明显示。

[0131] 在一些实施例中,所述装置还包括第二获取模块和设置模块,其中,所述第二获取模块,用于获取所述目标区域的第二显示区域信息;所述设置模块,用于基于所述第二显示区域信息设置所述应用页面的第一显示区域信息为第三显示区域信息,所述第三区域显示信息与所述第二显示区域信息不重叠,以使得所述目标区域不显示所述应用页面。

[0132] 在一些实施例中,所述装置还包括第三获取模块和渲染模块,其中,所述第三获取模块,用于获取所述应用页面的目标背景色;所述渲染模块,用于将所述目标区域的背景颜色渲染为所述目标背景色。

[0133] 在一些实施例中,所述装置还包括第三消息发送模块、第三获取模块和解析和显示模块,其中,所述第三消息发送模块,用于发送第三通知消息至所述目标应用程序,所述第三通知消息用于获取所述应用页面的子页面信息;所述第三获取模块,用于基于所述应用程序发送的消息,获取所述子页面信息;所述解析和显示模块,用于解析所述子页面信息,显示所述子页面信息于所述第一显示组件的显示区域。

[0134] 在一些实施例中,所述装置还包括第二确定模块,或第三确定模块,其中,所述第二确定模块,用于确定所述第一显示组件的状态位置发生变化;所述第三确定模块,用于确定所述应用页面在电子设备显示区域的显示方向和 / 或显示位置发生变化。

[0135] 以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。

[0136] 需要说明的是,本申请实施例中,如果以软件功能模块的形式实现上述方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得电子设备(可以是手机、平板电脑、笔记本电脑、台式计算机等)执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本申请实施例不限制于任何特定的硬件和软件结合。

[0137] 对应地,本申请实施例提供一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中提供的处理方法中的步骤。

[0138] 对应地,本申请实施例提供一种电子设备,图6为本申请实施例提供的电子设备的一种硬件实体示意图,如图6所示,该设备600的硬件实体包括:包括存储器601和处理器602,所述存储器601存储有可在处理器602上运行的计算机程序,所述处理器602执行所述程序时实现上述实施例中提供的处理方法中的步骤。

[0139] 存储器601配置为存储由处理器602可执行的指令和应用,还可以缓存待处理器602以及电子设备600中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random AccessMemory,RAM)实现。

[0140] 这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质和设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。

[0141] 应理解,说明书通篇中提到的"一个实施例”或"一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的"在一个实施例中”或"在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。

[0142] 需要说明的是,在本文中,术语"包括”、"包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句"包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。

[0143] 在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。

[0144] 上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。

[0145] 另外,在本申请各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。

[0146] 本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。

[0147] 或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得电子设备(可以是手机、平板电脑、笔记本电脑、台式计算机等)执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。

[0148] 本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。

[0149] 本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。

[0150] 本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。

[0151] 以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。< / style>

Claims

1. A processing method, the method comprising: Obtaining first display area information of the application page to be displayed; Determine, based on the first display area information, a target area where the display area of ​​the application page overlaps with that of the first display component; Sending a first notification message to a target application corresponding to the application page, wherein the first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page; The target area after drawing is displayed.

2. The method of claim 1, further comprising: generating a second notification message based on the second display area information of the target area; A second notification message is sent to the target application, so that the target application adds a blank area to the application page based on the second display area information.

3. The method of claim 2, further comprising: In response to the second notification message, the target application draws the blank area as a transparent display.

4. The method of claim 1, further comprising: Acquire second display area information of the target area; The first display area information of the application page is set as third display area information based on the second display area information, and the third display area information does not overlap with the second display area information, so that the target area does not display the application page.

5. The method of claim 4, further comprising: Get the target background color of the application page; The background color of the target area is rendered as the target background color.

6. The method according to any one of claims 1 to 5, further comprising: Sending a third notification message to the target application, wherein the third notification message is used to obtain sub-page information of the application page; Based on the message sent by the application, obtaining the sub-page information; The sub-page information is parsed, and the sub-page information is displayed in a display area of ​​the first display component.

7. The method according to any one of claims 1 to 5, before obtaining the first display area information of the application page to be displayed, the method further comprises: Determining that the state position of the first display component changes; or; Determine whether the display direction and / or display position of the application page in the display area of ​​the electronic device has changed.

8. A processing device, comprising: A first acquisition module, used to acquire first display area information of an application page to be displayed; A first determining module, configured to determine, based on the first display area information, a target area where the display area of ​​the application page overlaps with that of the first display component; A first message sending module, used for sending a first notification message to a target application corresponding to the application page, wherein the first notification message is used for notifying the target application that the target area is drawn by the first application corresponding to the first display component, or notifying the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page; The display module is used to display the target area after drawing.

9. The device of claim 8, further comprising: A message generating module, configured to generate a second notification message based on the second display area information of the target area; The second message sending module is used to send a second notification message to the target application, so that the target application adds a blank area to the application page based on the second display area information.

10. A computer program product, comprising a computer program or an instruction, which, when executed by a processor, implements obtaining first display area information of an application page to be displayed; determining a target area where the display area of ​​the application page overlaps with that of a first display component based on the first display area information; and sending a first notification message to a target application corresponding to the application page, wherein: The first notification message is used to notify the target application that the target area is drawn by the first application corresponding to the first display component, or to notify the target application to draw the target area; wherein the display priority of the first display component is greater than the display priority of the application page; and the target area that has been drawn is displayed.