Window display method and device, electronic equipment and storage medium
By dividing the window area on the display screen and adapting it to the height and width of the application window, the problem of embedded camera and sensor areas obstructing the display screen is solved, achieving full display of the application and improving the user experience.
Patent Information
- Application Number
- CN202410931165.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2026-01-13
AI Technical Summary
In existing electronic devices, the areas where cameras and sensors are embedded obstruct the display screen, resulting in incomplete display of application windows.
The first window area is divided on the display screen. The height and width of the application window are adapted to avoid the non-display area based on the rotation direction of the electronic device and the position of the non-display area. The display position and size of the window are determined by constructing a screen coordinate system.
It achieves full display of the application window, avoids obscuring non-display areas, and improves user experience and visual effects.
Smart Images

Figure CN121326451A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic equipment technology, and in particular to a window display method, apparatus, electronic device, and storage medium. Background Technology
[0002] To enhance user experience and visual appeal, most electronic devices nowadays strive for a larger screen-to-body ratio, which is the ratio of the screen area to the front panel area. To ensure a higher screen-to-body ratio while avoiding the placement of cameras and sensors on the front panel, an increasing number of electronic devices embed these devices within the screen itself. However, this approach can lead to the cameras and sensors obstructing the view during use. Summary of the Invention
[0003] To overcome the problems existing in the related technologies, this disclosure provides a window display method, apparatus, electronic device and storage medium.
[0004] According to a first aspect of the present disclosure, a window display method is provided, comprising:
[0005] In response to an electronic device detecting a need to display an application window on a display screen, a first window area is determined in the display area of the display screen, wherein the display screen includes the display area and a non-display area embedded in the display area for hardware avoidance;
[0006] The application window is adapted to be displayed in the first window area, wherein the height of the application window adapted to be displayed in the first window area is the same as the height of the display screen, and the width of the application window adapted to be displayed in the first window area is the difference between the width of the display screen and the width of the non-display area; or the width of the application window adapted to be displayed in the first window area is the same as the width of the display screen, and the height of the application window adapted to be displayed in the first window area is the difference between the height of the display screen and the height of the non-display area.
[0007] In some embodiments, determining the first window area in the display area of the display screen includes:
[0008] The height of the display screen is defined as the height of the first window area, and the difference between the width of the display screen and the width of the non-display area is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the first aspect ratio of the first window area. Alternatively, the difference between the width of the display screen and the width of the non-display area is defined as the height of the first window area, and the height of the display screen is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the second aspect ratio of the first window area.
[0009] Based on the rotation direction of the electronic device, the display position of the first window area is determined, wherein the display position of the first window area avoids the non-display area in the corresponding rotation direction;
[0010] The display area at the display position corresponding to the first aspect ratio or the second aspect ratio is determined as the first window area.
[0011] In some embodiments, when the electronic device is rotated with the top facing upwards, the first window area is located to the right of the non-display area;
[0012] When the electronic device is rotated so that the top faces right, the first window area is located below the non-display area;
[0013] When the electronic device is rotated so that the top is facing down, the first window area is located to the left of the non-display area;
[0014] When the electronic device is rotated so that the top faces left, the first window area is located above the non-display area.
[0015] In some embodiments, adapting the display of the application window in the first window area includes:
[0016] The width and height of the application window are determined based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio.
[0017] Based on the display position of the first window area, and the width and height of the application window, window display information for the application window to be adapted for display in the first window area is obtained;
[0018] According to the window display information, the application window is adapted to be displayed in the first window area.
[0019] In some embodiments, determining the width and height of the application window based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio includes:
[0020] The initial height and initial width of the application window are determined based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio.
[0021] Based on the scaling factor, the initial height and initial width of the application window are scaled proportionally to obtain the width and height of the application window.
[0022] In some embodiments, determining the initial height and initial width of the application window based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio includes:
[0023] When the electronic device is rotated to the top-up or top-down direction, the initial height and initial width of the application window are determined based on the first aspect ratio, wherein the ratio between the initial height and the initial width is the first aspect ratio;
[0024] When the electronic device is rotated to the top left or the top right, the initial height and initial width of the application window are determined based on the second aspect ratio, wherein the ratio between the initial height and the initial width is the second aspect ratio.
[0025] In some embodiments, obtaining the window display information for the application window to be adapted for display in the first window area based on the display position of the first window area and the width and height of the application window includes:
[0026] Based on the current rotation direction of the electronic device, a screen coordinate system is constructed, wherein the upper left corner of the display screen under the current rotation direction of the electronic device is the circle point of the screen coordinate system, the long side or wide side of the display screen to the right of the circle point is the positive direction of the X-axis, and the long side or wide side of the display screen below the circle point is the positive direction of the Y-axis.
[0027] When the electronic device is rotated with the top facing upwards, the coordinates of the four vertices of the application window on the display screen are (width of the non-display area, 0), (width of the display screen, 0), (width of the display screen, height of the display screen), and (width of the non-display area, height of the display screen).
[0028] When the electronic device is rotated so that the top faces right, the coordinates of the four vertices of the application window on the display screen are (0, width of the non-display area), (height of the display screen, width of the non-display area), (height of the display screen, width of the display screen), and (0, width of the display screen).
[0029] When the electronic device is rotated with the top facing down, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the difference between the width of the display screen and the width of the non-display area, 0), (the difference between the width of the display screen and the width of the non-display area, the height of the display screen), and (0, the height of the display screen).
[0030] When the electronic device is rotated to the top-left, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the height of the display screen, 0), (the height of the display screen, the difference between the width of the display screen and the width of the non-display area), and (0, the difference between the width of the display screen and the width of the non-display area).
[0031] In some embodiments, it also includes:
[0032] The desktop component program window is displayed in a second window area, which is a different display area from the first window area.
[0033] According to a second aspect of the present disclosure, a window display device is provided, comprising:
[0034] A region partitioning module is used to determine a first window region in the display area of the display screen in response to the electronic device detecting that an application window needs to be displayed on the display screen, wherein the display screen includes the display area and a non-display area embedded in the display area for hardware avoidance;
[0035] An adaptation display module is provided, which is used to adapt and display the application window in the first window area, wherein the height of the application window adapted and displayed in the first window area is the same as the height of the display screen, and the width of the application window adapted and displayed in the first window area is the difference between the width of the display screen and the width of the non-display area; or the width of the application window adapted and displayed in the first window area is the same as the width of the display screen, and the height of the application window adapted and displayed in the first window area is the difference between the height of the display screen and the height of the non-display area.
[0036] In some embodiments, the region segmentation module is used to determine a first window region in the display area of the display screen in the following manner:
[0037] The height of the display screen is defined as the height of the first window area, and the difference between the width of the display screen and the width of the non-display area is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the first aspect ratio of the first window area. Alternatively, the difference between the width of the display screen and the width of the non-display area is defined as the height of the first window area, and the height of the display screen is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the second aspect ratio of the first window area.
[0038] Based on the rotation direction of the electronic device, the display position of the first window area is determined, wherein the display position of the first window area avoids the non-display area in the corresponding rotation direction;
[0039] The display area at the display position corresponding to the first aspect ratio or the second aspect ratio is determined as the first window area.
[0040] In some embodiments, the region segmentation module is used to determine a first window region in the display area of the display screen in the following manner:
[0041] When the electronic device is rotated with the top facing upwards, the first window area is located to the right of the non-display area;
[0042] When the electronic device is rotated so that the top faces right, the first window area is located below the non-display area;
[0043] When the electronic device is rotated so that the top is facing down, the first window area is located to the left of the non-display area;
[0044] When the electronic device is rotated so that the top faces left, the first window area is located above the non-display area.
[0045] In some embodiments, the adaptive display module is configured to adapt and display the application window in the first window area in the following manner:
[0046] The width and height of the application window are determined based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio.
[0047] Based on the display position of the first window area, and the width and height of the application window, window display information for the application window to be adapted for display in the first window area is obtained;
[0048] According to the window display information, the application window is adapted to be displayed in the first window area.
[0049] In some embodiments, the adaptive display module is used to determine the width and height of the application window based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio:
[0050] The initial height and initial width of the application window are determined based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio.
[0051] Based on the scaling factor, the initial height and initial width of the application window are scaled proportionally to obtain the width and height of the application window.
[0052] In some embodiments, the adaptive display module is configured to determine the initial height and initial width of the application window based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio in the following manner:
[0053] When the electronic device is rotated to the top-up or top-down direction, the initial height and initial width of the application window are determined based on the first aspect ratio, wherein the ratio between the initial height and the initial width is the first aspect ratio;
[0054] When the electronic device is rotated to the top left or the top right, the initial height and initial width of the application window are determined based on the second aspect ratio, wherein the ratio between the initial height and the initial width is the second aspect ratio.
[0055] In some embodiments, the region segmentation module is used to obtain window display information for the application window to be displayed in the first window region based on the display position of the first window region and the width and height of the application window:
[0056] Based on the current rotation direction of the electronic device, a screen coordinate system is constructed, wherein the upper left corner of the display screen under the current rotation direction of the electronic device is the circle point of the screen coordinate system, the long side or wide side of the display screen to the right of the circle point is the positive direction of the X-axis, and the long side or wide side of the display screen below the circle point is the positive direction of the Y-axis.
[0057] When the electronic device is rotated with the top facing upwards, the coordinates of the four vertices of the application window on the display screen are (width of the non-display area, 0), (width of the display screen, 0), (width of the display screen, height of the display screen), and (width of the non-display area, height of the display screen).
[0058] When the electronic device is rotated so that the top faces right, the coordinates of the four vertices of the application window on the display screen are (0, width of the non-display area), (height of the display screen, width of the non-display area), (height of the display screen, width of the display screen), and (0, width of the display screen).
[0059] When the electronic device is rotated with the top facing down, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the difference between the width of the display screen and the width of the non-display area, 0), (the difference between the width of the display screen and the width of the non-display area, the height of the display screen), and (0, the height of the display screen).
[0060] When the electronic device is rotated to the top-left, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the height of the display screen, 0), (the height of the display screen, the difference between the width of the display screen and the width of the non-display area), and (0, the difference between the width of the display screen and the width of the non-display area).
[0061] In some embodiments, the adaptive display module is used for:
[0062] The desktop component program window is displayed in a second window area, which is a different display area from the first window area.
[0063] According to a third part of the embodiments of this disclosure, an electronic device is provided, comprising:
[0064] processor;
[0065] Memory used to store processor-executable instructions;
[0066] The processor is configured to execute the window display method described in any one of the first aspects above.
[0067] According to a fourth part of the embodiments of this disclosure, a storage medium is provided that, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the window display method described in any of the first aspects above.
[0068] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: by adapting the display of the application window in the first window area, the displayed application window can be fully displayed, avoiding obstruction of the non-display area.
[0069] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0070] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0071] Figure 1 This is a schematic diagram of a display screen in related technologies.
[0072] Figure 2 This is a flowchart illustrating a window display method according to an exemplary embodiment.
[0073] Figure 3 This is a schematic diagram illustrating a window display according to an exemplary embodiment.
[0074] Figure 4 This is a schematic diagram illustrating the rotation direction of a display screen according to an exemplary embodiment.
[0075] Figure 5 This is a flowchart illustrating a method for determining a first window region in the display area of a display screen according to an exemplary embodiment.
[0076] Figure 6 This is a flowchart illustrating a method for determining a first window region in the display area of a display screen according to an exemplary embodiment.
[0077] Figure 7 This is a flowchart illustrating a method for adapting and displaying an application window in a first window area according to an exemplary embodiment.
[0078] Figure 8 This is a flowchart illustrating a method for determining the width and height of an application window based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio, according to an exemplary embodiment.
[0079] Figure 9 This is a block diagram illustrating a window display device according to an exemplary embodiment.
[0080] Figure 10 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0081] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0082] The electronic devices involved in this disclosure, also referred to as terminals, terminal devices, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc., are devices that provide voice and / or data connectivity to users. For example, electronic devices can be handheld devices with wireless connectivity, in-vehicle devices, etc. Currently, examples of electronic devices include: smartphones (Mobile Phones), pocket personal computers (PPCs), handheld computers, personal digital assistants (PDAs), laptops, tablets, wearable devices, or in-vehicle devices. Furthermore, when it is a vehicle-to-everything (V2X) communication system, the electronic device can also be an in-vehicle device. It should be understood that the embodiments of this disclosure do not limit the specific technology or device form used in the terminal.
[0083] To enhance user experience and visual appeal, most electronic devices nowadays strive for a larger screen-to-body ratio, which is the ratio of the display screen area to the front panel area. To ensure a higher screen-to-body ratio while avoiding the placement of cameras and sensors on the front panel, an increasing number of electronic devices are embedding these devices within the display screen itself. However, this approach can lead to the cameras and sensors obstructing the view during use.
[0084] For electronic devices equipped with large cameras or sensors, the obstruction of the display screen is more severe. For example... Figure 1 This is a schematic diagram of a display screen in related technologies, such as... Figure 1 As shown, for electronic devices with a display screen on one side of the rear camera, such as foldable smartphones, it includes an inner screen for folding and an outer screen located on the same side as the rear camera. The outer screen includes a display area for displaying image information, i.e. Figure 1The display area consists of a central 10-inch area and a non-display area used to avoid the rear camera. The non-display area is embedded in the display area, resulting in an irregular shape for the display area. For applications, the display area used to display image information is a complete rectangular area, i.e., the entire outer screen. However, for users, the rear camera is embedded in the outer screen. If the application still uses the display area as the full screen, the rear camera will obstruct the application's interface.
[0085] To solve the above-mentioned technical problems, this disclosure provides a window display method, apparatus, electronic device, and storage medium.
[0086] This embodiment of the disclosure divides the display screen into a first window area, so that the first window area avoids the non-real areas on the display screen, and the first window area can fully display the application window, thereby avoiding the non-display area from obscuring the application window.
[0087] Figure 2 This is a flowchart illustrating a window display method according to an exemplary embodiment. For example... Figure 2 As shown, this window display method is used in electronic devices and includes the following steps.
[0088] In step S11, in response to the electronic device detecting that an application window needs to be displayed on the display screen, a first window area is determined in the display area of the display screen, wherein the display screen includes a display area and a non-display area embedded in the display area for hardware avoidance.
[0089] like Figure 1 As shown, the non-display area is embedded within the display area. The non-display area is used to avoid obstructing hardware such as cameras, sensors, and speakers. When no applications are running, the entire display area is used to display current image information, such as the screensaver and system desktop.
[0090] In step S12, the application window is adapted to be displayed in the first window area. The height of the application window adapted to be displayed in the first window area is the same as the height of the display screen, and the width of the application window adapted to be displayed in the first window area is the difference between the width of the display screen and the width of the non-display area. Alternatively, the width of the application window adapted to be displayed in the first window area is the same as the width of the display screen, and the height of the application window adapted to be displayed in the first window area is the difference between the height of the display screen and the height of the non-display area.
[0091] By adapting the application window to the first window area, the application window can be fully displayed, avoiding obstruction from non-display areas.
[0092] Figure 3This is a schematic diagram illustrating a window display according to an exemplary embodiment, such as... Figure 3 As shown in the figure, area 20 is the first window area, and area 20 is the non-display area.
[0093] Figure 5 This is a flowchart illustrating a method for determining a first window region in the display area of a screen according to an exemplary embodiment. Figure 5 As shown, determining the first window area in the display area of the screen includes the following steps.
[0094] In step S21, the height of the display screen is determined as the height of the first window area, the difference between the width of the display screen and the width of the non-display area is taken as the width of the first window area, and the ratio between the height of the first window area and the width of the first window area is determined as the first aspect ratio of the first window area.
[0095] In step S22, the display position of the first window area is determined based on the rotation direction of the electronic device, wherein the display position of the first window area avoids the non-display area in the corresponding rotation direction.
[0096] In step S23, the display area corresponding to the first aspect ratio at the display position is determined as the first window area.
[0097] In other words, the first window area is determined according to the rotation direction of the electronic device, and the application window is displayed vertically. At this time, the height of the first window area is the height of the display screen, and the width of the first window area is part of the width of the display screen, so that the first window area avoids the non-display area in the display screen.
[0098] Figure 6 This is a flowchart illustrating a method for determining a first window region in the display area of a screen according to an exemplary embodiment. Figure 6 As shown, determining the first window area in the display area of the screen includes the following steps.
[0099] In step S31, the difference between the width of the display screen and the width of the non-display area is taken as the height of the first window area, and the height of the display screen is determined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is determined as the second aspect ratio of the first window area.
[0100] In step S32, the display position of the first window area is determined based on the rotation direction of the electronic device, wherein the display position of the first window area avoids the non-display area in the corresponding rotation direction.
[0101] In step S33, the display area corresponding to the second aspect ratio at the display position is determined as the first window area.
[0102] In other words, the first window area is determined according to the rotation direction of the electronic device, and the application window is displayed horizontally. At this time, the height of the first window area is the width of part of the display screen, and the width of the first window area is the height of the display screen, so that the first window area avoids the non-display area in the display screen.
[0103] In some embodiments, when the electronic device rotates to the left or right (i.e., 315° to 45° or 135° to 225°), the initial height and initial width of the application window are determined based on a first aspect ratio, wherein the ratio between the initial height and the initial width is the first aspect ratio. When the electronic device rotates to the top or bottom (i.e., 45° to 135° or 225° to 315°), the initial height and initial width of the application window are determined based on a second aspect ratio, wherein the ratio between the initial height and the initial width is the second aspect ratio.
[0104] Figure 4 This is a schematic diagram illustrating the rotation direction of a display screen according to an exemplary embodiment, such as... Figure 4 The diagram shows the initial state of the display screen at 0°, the state after rotating 90° clockwise, the state after rotating 180° clockwise, and the state after rotating 270° clockwise, representing the top-up, top-right, top-down, and top-left directions of the electronic device, respectively. When the electronic device rotates 315° to 45°, for example, 0°, the first window area is located to the right of the non-display area. When the electronic device rotates 45° to 135°, for example, 90°, the first window area is located below the non-display area. When the electronic device rotates 135° to 225°, for example, 180°, the first window area is located to the left of the non-display area. When the electronic device rotates 225° to 315°, for example, 270°, the first window area is located above the non-display area.
[0105] During the use of electronic devices, due to different gripping methods or usage scenarios, electronic devices will be used in different directions, that is, different rotation directions of electronic devices. The current gravity information, that is, the angle between the gravity direction and the initial state of the display screen, is obtained through the gravity sensor or gyroscope configured in the electronic device.
[0106] Figure 7 This is a flowchart illustrating a method for adapting and displaying an application window in a first window area according to an exemplary embodiment. For example... Figure 7 As shown, when adapting the application window to the first window area, the following steps are included.
[0107] In step S41, the width and height of the application window are determined based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio.
[0108] In step S42, based on the display position of the first window area and the width and height of the application window, window display information for the application window to be displayed in the first window area is obtained.
[0109] In step S43, the application window is adapted and displayed in the first window area according to the window display information.
[0110] Based on the display position of the first window area and the width and height of the application window, the window display information adapted for display in the first window area is obtained, including: constructing a screen coordinate system based on the current rotation direction of the electronic device, wherein the upper left corner of the display screen under the current rotation direction of the electronic device is the point of the screen coordinate system, the positive direction of the X-axis is the long or wide side of the display screen to the right of the point, and the positive direction of the Y-axis is the long or wide side of the display screen below the point. When the electronic device rotates from 315° to 45°, the window display information in the screen coordinate system is represented as [(width of non-display area, 0), (width of display screen, 0), (width of display screen, height of display screen), (width of non-display area, height of display screen)]. When the electronic device rotates from 45° to 135°, the window display information in the screen coordinate system is represented as [(0, width of non-display area), (height of display screen, width of non-display area), (height of display screen, width of display screen), (0, width of display screen)]. When the electronic device rotates from 135° to 225°, the window display information is represented in the screen coordinate system as [(0, 0), (difference between the width of the display screen and the width of the non-display area, 0), (difference between the width of the display screen and the width of the non-display area, display screen height), (0, display screen height)]. When the electronic device rotates from 225° to 315°, the window display information is represented in the screen coordinate system as [(0, 0), (display screen height, 0), (display screen height, difference between the width of the display screen and the width of the non-display area), (0, difference between the width of the display screen and the width of the non-display area)].
[0111] For example, such as Figure 4 As shown, the rectangular display area has lengths and widths of A1 and B1, respectively. The non-display area is the outer rectangle of the area that avoids hardware, with lengths and widths of A2 and B2, respectively. Based on the direction of gravity, the top left corner of the display area is taken as the origin of the display coordinate system. Figure 4Taking 0° as an example, the first aspect ratio is A1 / B1-B2, the upper left corner of the display area is the origin of the screen coordinate system, the first window area is a rectangle, and the vertex coordinates of the first window area are (B2, 0), (B1, 0), (B2, A1), (B1, A1). Figure 6 Taking a 90° rotation as an example, the top left corner of the display area is the origin of the screen coordinate system, the second aspect ratio is B1-B2 / A1, and the vertex coordinates of the first window area are (0, B2), (A1, B2), (0, B1-B2), and (A1, B1). Similarly, the display coordinates for 180° and 270° are constructed, which will not be elaborated here. Thus, the window display information of the first window area in different rotation directions of the electronic device is determined.
[0112] Figure 8 This is a flowchart illustrating a method for determining the width and height of an application window based on the current rotation direction of the electronic device, a preset scaling factor, and a first or second aspect ratio, according to an exemplary embodiment. Figure 8 As shown, the method includes the following steps.
[0113] In step S51, the initial height and initial width of the application window are determined based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio.
[0114] In step S52, the initial height and initial width of the application window are scaled proportionally based on the scaling factor to obtain the width and height of the application window.
[0115] The scaling factor is the ratio of the actual application window's height to the height of the first window area, or the ratio of the actual application window's width to the width of the first window area. Currently, most applications are poorly adapted to smaller screens, resulting in display problems such as overlapping cropping and excessively large icon fonts. This embodiment adjusts the application's interface to match the application window with the first window area, effectively improving the application's display effect within the first window area.
[0116] In some embodiments, determining the initial height and initial width of an application window based on the rotation direction of the electronic device and a first aspect ratio or a second aspect ratio includes: when the rotation direction of the electronic device is top-up or top-down, determining the initial height and initial width of the application window based on the first aspect ratio, wherein the ratio between the initial height and the initial width is the first aspect ratio; when the rotation direction of the electronic device is top-left or top-right, determining the initial height and initial width of the application window based on the second aspect ratio, wherein the ratio between the initial height and the initial width is the second aspect ratio.
[0117] In some embodiments, such as Figure 3 As shown, it also includes displaying the desktop component program window in a second window area, which is a different display area from the first window area. Figure 3 The middle 30 area is the second window area.
[0118] The desktop widgets displayed in the second window area can be small applications provided by the operating system, used to display real-time information or provide specific functions in the second window area. Desktop widgets can display practical information such as weather, calendar, clock, and battery level, and can also provide quick access links, system monitoring, and other functions.
[0119] It should be noted that the method for constructing a second window area within the display area is similar to the method for constructing a first window area within the display area, and will not be repeated here.
[0120] Taking an Android-based electronic device as an example, when the device configuration changes in the Android system (onConfigurationChanged), such as when the electronic device rotates, the configuration of the application component (Activity) can be modified by changing the ResolvedOverrideConfiguration, allowing the application to be displayed correctly within the first window area. A preset scaling factor is set to the state and attributes (WindowState) of the corresponding application window, making the application's interface adaptable to the first window area. Some applications will adapt specifically for the first window area; the application itself can do so by adding metadata configuration to the AndroidManifest file. This embodiment can be achieved by modifying either the Activity or the Application configuration, with Activity having higher priority.
[0121] Based on the same concept, embodiments of this disclosure also provide a window display device.
[0122] It is understood that the window display device provided in this disclosure includes hardware structures and / or software modules corresponding to each function in order to achieve the above-mentioned functions. In conjunction with the units and algorithm steps of the various examples disclosed in this disclosure, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of this disclosure.
[0123] Figure 9 This is a block diagram illustrating an application window display device according to an exemplary embodiment. (Refer to...) Figure 9 The device includes a region division module 121 and an adaptive display module 122.
[0124] The region segmentation module 121 is configured to determine a first window region in the display area of the display screen in response to the electronic device detecting that an application window needs to be displayed on the display screen, wherein the display screen includes a display area and a non-display area embedded in the display area for hardware avoidance.
[0125] The adaptive display module 122 is configured to adapt and display an application window in a first window area, wherein the height of the application window adapted and displayed in the first window area is the same as the height of the display screen, and the width of the application window adapted and displayed in the first window area is the difference between the width of the display screen and the width of the non-display area; or the width of the application window adapted and displayed in the first window area is the same as the width of the display screen, and the height of the application window adapted and displayed in the first window area is the difference between the height of the display screen and the height of the non-display area.
[0126] In some embodiments, the region division module 121 is used to determine a first window region in the display area of the display screen in the following manner: determining the height of the display screen as the height of the first window region, and using the difference between the width of the display screen and the width of the non-display area as the width of the first window region, and determining the ratio between the height of the first window region and the width of the first window region as the first aspect ratio of the first window region; or using the difference between the width of the display screen and the width of the non-display area as the height of the first window region, determining the height of the display screen as the width of the first window region, and determining the ratio between the height of the first window region and the width of the first window region as the second aspect ratio of the first window region. The display position of the first window region is determined based on the rotation direction of the electronic device, wherein the display position of the first window region avoids the non-display area in the corresponding rotation direction. The display area corresponding to the first aspect ratio or the second aspect ratio at the display position is determined as the first window region.
[0127] In some embodiments, the region division module 121 is used to determine a first window region in the display area of the display screen in the following manner: when the rotation direction of the electronic device is top-up, the first window region is located to the right of the non-display area; when the rotation direction of the electronic device is top-right, the first window region is located below the non-display area; when the rotation direction of the electronic device is top-down, the first window region is located to the left of the non-display area; and when the rotation direction of the electronic device is top-left, the first window region is located above the non-display area.
[0128] In some embodiments, the adaptation display module 122 is configured to adapt and display the application window in the first window area as follows: Based on the current rotation direction of the electronic device and a preset scaling factor, and a first aspect ratio or a second aspect ratio, determine the width and height of the application window. Based on the display position of the first window area, and the width and height of the application window, obtain window display information for the application window to be adapted and displayed in the first window area. According to the window display information, adapt and display the application window in the first window area.
[0129] In some embodiments, the adaptive display module 122 is configured to determine the width and height of the application window based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio, in the following manner: Based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio, determine the initial height and initial width of the application window. Based on the scaling factor, scale the initial height and initial width of the application window proportionally to obtain the width and height of the application window.
[0130] In some embodiments, the adaptive display module 122 is configured to determine the initial height and initial width of the application window based on the rotation direction of the electronic device and a first aspect ratio or a second aspect ratio in the following manner: when the rotation direction of the electronic device is top-up or top-down, the initial height and initial width of the application window are determined based on the first aspect ratio, wherein the ratio between the initial height and the initial width is the first aspect ratio. When the rotation direction of the electronic device is top-left or top-right, the initial height and initial width of the application window are determined based on the second aspect ratio, wherein the ratio between the initial height and the initial width is the second aspect ratio.
[0131] In some embodiments, the region segmentation module 121 is used to obtain window display information for the application window to be adapted for display in the first window area based on the display position of the first window area and the width and height of the application window: A screen coordinate system is constructed based on the current rotation direction of the electronic device, wherein the upper left corner of the display screen under the current rotation direction of the electronic device is the center point of the screen coordinate system, the positive X-axis is the long or wide side of the display screen to the right of the center point, and the positive Y-axis is the long or wide side of the display screen below the center point. When the rotation direction of the electronic device is top-up, the coordinates of the four vertices of the application window on the display screen are (width of the non-display area, 0), (width of the display screen, 0), (width of the display screen, height of the display screen), and (width of the non-display area, height of the display screen). When the rotation direction of the electronic device is top-right, the coordinates of the four vertices of the application window on the display screen are (0, width of the non-display area), (height of the display screen, width of the non-display area), (height of the display screen, width of the display screen), and (0, width of the display screen). When the electronic device is rotated with the top facing down, the coordinates of the application window's four vertices on the screen are (0, 0), (the difference between the screen width and the width of the non-display area, 0), (the difference between the screen width and the width of the non-display area, screen height), and (0, screen height). When the electronic device is rotated with the top facing left, the coordinates of the application window's four vertices on the screen are (0, 0), (screen height, 0), (screen height, the difference between the screen width and the width of the non-display area), and (0, the difference between the screen width and the width of the non-display area).
[0132] In some embodiments, the adaptive display module 122 is used to: display a desktop component program window in a second window area, wherein the second window area is a different display area from the first window area in the display area.
[0133] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0134] Based on the same concept, this disclosure also provides an electronic device 800. Figure 10 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0135] Reference Figure 10 The electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.
[0136] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0137] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0138] Power component 806 provides power to various components of electronic device 800. Power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0139] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0140] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0141] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0142] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0143] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0144] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0145] In an exemplary embodiment, a storage medium is also provided, such as a memory 804 including instructions that can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0146] It is understood that in this disclosure, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0147] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this disclosure, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.
[0148] It is further understood that the terms “center,” “longitudinal,” “lateral,” “front,” “rear,” “up,” “down,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” and “outer,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation.
[0149] It can be further understood that, unless otherwise specified, "connection" includes both direct connections where no other components exist between the two parties and indirect connections where other components exist between them.
[0150] It is further understood that although operations are described in a specific order in the accompanying drawings in the embodiments of this disclosure, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the shown operations to be performed to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.
[0151] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0152] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A window display method for use in a foldable screen terminal with an outer screen, characterized in that, include: In response to an electronic device detecting a need to display an application window on a display screen, a first window area is determined in the display area of the display screen, wherein the display screen includes the display area and a non-display area embedded in the display area for hardware avoidance; The application window is adapted to be displayed in the first window area, wherein the height of the application window adapted to be displayed in the first window area is the same as the height of the display screen, and the width of the application window adapted to be displayed in the first window area is the difference between the width of the display screen and the width of the non-display area; or the width of the application window adapted to be displayed in the first window area is the same as the width of the display screen, and the height of the application window adapted to be displayed in the first window area is the difference between the height of the display screen and the height of the non-display area.
2. The window display method according to claim 1, characterized in that, Determining the first window area in the display area of the display screen includes: The height of the display screen is defined as the height of the first window area, and the difference between the width of the display screen and the width of the non-display area is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the first aspect ratio of the first window area. Alternatively, the difference between the width of the display screen and the width of the non-display area is defined as the height of the first window area, and the height of the display screen is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the second aspect ratio of the first window area. Based on the rotation direction of the electronic device, the display position of the first window area is determined, wherein the display position of the first window area avoids the non-display area in the corresponding rotation direction; The display area at the display position corresponding to the first aspect ratio or the second aspect ratio is determined as the first window area.
3. The window display method according to claim 2, characterized in that, When the electronic device is rotated with the top facing upwards, the first window area is located to the right of the non-display area; When the electronic device is rotated so that the top faces right, the first window area is located below the non-display area; When the electronic device is rotated so that the top is facing down, the first window area is located to the left of the non-display area; When the electronic device is rotated so that the top faces left, the first window area is located above the non-display area.
4. The window display method according to any one of claims 2 or 3, characterized in that, The step of adapting and displaying the application window in the first window area includes: The width and height of the application window are determined based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio. Based on the display position of the first window area, and the width and height of the application window, window display information for the application window to be adapted for display in the first window area is obtained; According to the window display information, the application window is adapted to be displayed in the first window area.
5. The window display method according to claim 4, characterized in that, The determination of the width and height of the application window based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio includes: The initial height and initial width of the application window are determined based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio. Based on the scaling factor, the initial height and initial width of the application window are scaled proportionally to obtain the width and height of the application window.
6. The window display method according to claim 5, characterized in that, Determining the initial height and initial width of the application window based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio includes: When the electronic device is rotated to the top-up or top-down direction, the initial height and initial width of the application window are determined based on the first aspect ratio, wherein the ratio between the initial height and the initial width is the first aspect ratio; When the electronic device is rotated to the top left or the top right, the initial height and initial width of the application window are determined based on the second aspect ratio, wherein the ratio between the initial height and the initial width is the second aspect ratio.
7. The window display method according to claim 4, characterized in that, The step of obtaining window display information for the application window to be adapted for display in the first window area based on the display position of the first window area and the width and height of the application window includes: Based on the current rotation direction of the electronic device, a screen coordinate system is constructed, wherein the upper left corner of the display screen under the current rotation direction of the electronic device is the circle point of the screen coordinate system, the long side or wide side of the display screen to the right of the circle point is the positive direction of the X-axis, and the long side or wide side of the display screen below the circle point is the positive direction of the Y-axis. When the electronic device is rotated with the top facing upwards, the coordinates of the four vertices of the application window on the display screen are (width of the non-display area, 0), (width of the display screen, 0), (width of the display screen, height of the display screen), and (width of the non-display area, height of the display screen). When the electronic device is rotated so that the top faces right, the coordinates of the four vertices of the application window on the display screen are (0, width of the non-display area), (height of the display screen, width of the non-display area), (height of the display screen, width of the display screen), and (0, width of the display screen). When the electronic device is rotated with the top facing down, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the difference between the width of the display screen and the width of the non-display area, 0), (the difference between the width of the display screen and the width of the non-display area, the height of the display screen), and (0, the height of the display screen). When the electronic device is rotated to the top-left, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the height of the display screen, 0), (the height of the display screen, the difference between the width of the display screen and the width of the non-display area), and (0, the difference between the width of the display screen and the width of the non-display area).
8. The window display method according to claim 4, characterized in that, Also includes: The desktop component program window is displayed in a second window area, which is a different display area from the first window area.
9. A window display device, characterized in that, include: A region partitioning module is used to determine a first window region in the display area of the display screen in response to the electronic device detecting that an application window needs to be displayed on the display screen, wherein the display screen includes the display area and a non-display area embedded in the display area for hardware avoidance; An adaptation display module is provided, which is used to adapt and display the application window in the first window area, wherein the height of the application window adapted and displayed in the first window area is the same as the height of the display screen, and the width of the application window adapted and displayed in the first window area is the difference between the width of the display screen and the width of the non-display area; or the width of the application window adapted and displayed in the first window area is the same as the width of the display screen, and the height of the application window adapted and displayed in the first window area is the difference between the height of the display screen and the height of the non-display area.
10. The window display device according to claim 9, characterized in that, The region division module is used to determine the first window region in the display area of the display screen in the following manner: The height of the display screen is defined as the height of the first window area, and the difference between the width of the display screen and the width of the non-display area is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the first aspect ratio of the first window area. Alternatively, the difference between the width of the display screen and the width of the non-display area is defined as the height of the first window area, and the height of the display screen is defined as the width of the first window area. The ratio between the height of the first window area and the width of the first window area is defined as the second aspect ratio of the first window area. Based on the rotation direction of the electronic device, the display position of the first window area is determined, wherein the display position of the first window area avoids the non-display area in the corresponding rotation direction; The display area at the display position corresponding to the first aspect ratio or the second aspect ratio is determined as the first window area.
11. The window display device according to claim 10, characterized in that, The region division module is used to determine the first window region in the display area of the display screen in the following manner: When the electronic device is rotated with the top facing upwards, the first window area is located to the right of the non-display area; When the electronic device is rotated so that the top faces right, the first window area is located below the non-display area; When the electronic device is rotated so that the top is facing down, the first window area is located to the left of the non-display area; When the electronic device is rotated so that the top faces left, the first window area is located above the non-display area.
12. The window display device according to any one of claims 10 or 11, characterized in that, The adaptive display module is used to adapt and display the application window in the first window area in the following manner: The width and height of the application window are determined based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio. Based on the display position of the first window area, and the width and height of the application window, window display information for the application window to be adapted for display in the first window area is obtained; According to the window display information, the application window is adapted to be displayed in the first window area.
13. The window display device according to claim 12, characterized in that, The adaptive display module is used to determine the width and height of the application window based on the current rotation direction of the electronic device, a preset scaling factor, and a first aspect ratio or a second aspect ratio, in the following manner: The initial height and initial width of the application window are determined based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio. Based on the scaling factor, the initial height and initial width of the application window are scaled proportionally to obtain the width and height of the application window.
14. The window display device according to claim 13, characterized in that, The adaptive display module is used to determine the initial height and initial width of the application window based on the rotation direction of the electronic device and the first aspect ratio or the second aspect ratio in the following manner: When the electronic device is rotated to the top-up or top-down direction, the initial height and initial width of the application window are determined based on the first aspect ratio, wherein the ratio between the initial height and the initial width is the first aspect ratio; When the electronic device is rotated to the top left or the top right, the initial height and initial width of the application window are determined based on the second aspect ratio, wherein the ratio between the initial height and the initial width is the second aspect ratio.
15. The window display device according to claim 12, characterized in that, The region segmentation module is used to obtain the window display information of the application window adapted to be displayed in the first window region based on the display position of the first window region and the width and height of the application window in the following manner: Based on the current rotation direction of the electronic device, a screen coordinate system is constructed, wherein the upper left corner of the display screen under the current rotation direction of the electronic device is the circle point of the screen coordinate system, the long side or wide side of the display screen to the right of the circle point is the positive direction of the X-axis, and the long side or wide side of the display screen below the circle point is the positive direction of the Y-axis. When the electronic device is rotated with the top facing upwards, the coordinates of the four vertices of the application window on the display screen are (width of the non-display area, 0), (width of the display screen, 0), (width of the display screen, height of the display screen), and (width of the non-display area, height of the display screen). When the electronic device is rotated so that the top faces right, the coordinates of the four vertices of the application window on the display screen are (0, width of the non-display area), (height of the display screen, width of the non-display area), (height of the display screen, width of the display screen), and (0, width of the display screen). When the electronic device is rotated with the top facing down, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the difference between the width of the display screen and the width of the non-display area, 0), (the difference between the width of the display screen and the width of the non-display area, the height of the display screen), and (0, the height of the display screen). When the electronic device is rotated to the top-left, the coordinates of the four vertices of the application window on the display screen are (0, 0), (the height of the display screen, 0), (the height of the display screen, the difference between the width of the display screen and the width of the non-display area), and (0, the difference between the width of the display screen and the width of the non-display area).
16. The window display device according to claim 12, characterized in that, The adaptive display module is used for: The desktop component program window is displayed in a second window area, which is a different display area from the first window area.
17. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the window display method according to any one of claims 1 to 8.
18. A storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the window display method according to any one of claims 1 to 8.