Application window zooming method and device, electronic equipment and storage medium

By responding to user dragging operations, the scaling coefficient and direction of the application window are adaptively adjusted according to the minimum width threshold and the drag track, solving the problem of limited scaling ratio of the application window in the prior art, and improving the freedom and flexibility of scaling.

CN120215796APending Publication Date: 2025-06-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311816026.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, when scaling the application window, only supports switching between fixed three proportions of gears, which is relatively restrictive and has low freedom, making it difficult to meet the user's usage needs.

Method used

By responding to the user's dragging operation on the application window, determine the window scaling coefficient and zooming direction based on the minimum width threshold and drag track, and adaptively adjust the window size to achieve more flexible zooming.

Benefits of technology

It improves the freedom of application window scaling, reduces the limitations of scaling, and can better meet users' needs in multi-task interaction scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215796A_ABST
    Figure CN120215796A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly provides an application window zooming method and device, electronic equipment and a storage medium. The application window zooming method comprises the following steps: displaying a target application window of a target application; the target application window is a window of the target application in a small window mode; displaying the zoomed target application window in response to a dragging operation of a user for the target application window; the target application window is zoomed out or zoomed in according to the window zooming coefficient and the zooming direction; the window zooming coefficient and the zooming direction are determined according to the minimum width threshold value and the dragging track of the dragging operation. Thus, according to the minimum width threshold value and the dragging track of the dragging operation, the window zooming coefficient is adjusted in a self-adaptive mode, limitation of application window zooming is reduced, and the freedom degree of application window zooming is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method, device, electronic device, and storage medium for scaling an application window. Background Art

[0002] In the small window usage scenario of an application, for the convenience of task interaction, the size of the small window of the application (i.e., the width and height of the application window) can usually be adjusted in a certain proportion to achieve the scaling of the small window.

[0003] However, in the prior art, when scaling the small window, it usually only supports switching the scaling ratio among three fixed ratio gears, and the restriction of small window scaling is relatively large. Summary of the Invention

[0004] The purpose of the embodiments of this application is to provide a method, device, electronic device, and storage medium for scaling an application window, so as to improve the freedom of application window scaling.

[0005] On the one hand, the embodiments of this application provide a method for scaling an application window, including:

[0006] Display the target application window of the target application; the target application window is the window of the target application in the small window mode;

[0007] In response to a dragging operation of the user on the target application window, display the scaled target application window; the target application window is reduced or enlarged according to the window scaling coefficient and the scaling direction; both the window scaling coefficient and the scaling direction are determined according to the minimum width threshold and the dragging trajectory of the dragging operation.

[0008] In one implementation, in response to a dragging operation of the user on the target application window, displaying the scaled target application window includes:

[0009] In response to a dragging operation of the user on the target application window, determine the dragging trajectory;

[0010] According to the dragging trajectory, determine the first height, the first width, and the scaling direction indicated by the user through the dragging operation;

[0011] According to the first width and the minimum width threshold, determine the window scaling coefficient;

[0012] According to the window scaling coefficient, scale the first height and the first width respectively to obtain the second height and the second width;

[0013] According to the scaling direction, scale the height and width of the target application window to the second height and the second width respectively to obtain the scaled target application window.

[0014] In one implementation, determining a window scaling factor according to a first width and a minimum width threshold includes:

[0015] If the first width is not higher than the minimum width threshold, then determine the ratio of the minimum width threshold to the first width as the window scaling factor;

[0016] If the first width is higher than the minimum width threshold, then use the set scaling factor as the window scaling factor.

[0017] In one implementation, scaling the first height and the first width respectively according to the window scaling factor to obtain a second height and a second width includes:

[0018] Determine the second width according to the first product of the window scaling factor and the first width; the second width is positively correlated with the first product;

[0019] Determine the second height according to the second product of the window scaling factor and the first height; the second height is positively correlated with the second product.

[0020] In one implementation, before determining the window scaling factor according to the first width and the minimum width threshold, the method further includes:

[0021] Obtain the small window switching mode corresponding to the target application window;

[0022] If the target application window is in the landscape screen state and the small window switching mode includes the landscape screen mode, then determine the minimum width threshold according to the minimum landscape screen width value;

[0023] If the target application window is in the landscape screen state and the small window switching mode includes the landscape and portrait mode, then determine the minimum width threshold according to the minimum landscape screen width value and the minimum portrait screen width value;

[0024] If the target application window is in the portrait screen state and the small window switching mode includes the portrait screen mode, then determine the minimum width threshold according to the minimum portrait screen width value;

[0025] If the target application window is in the portrait screen state and the small window switching mode includes the landscape and portrait mode, then determine the minimum width threshold according to the minimum landscape screen width value and the minimum portrait screen width value.

[0026] In one implementation, the method further includes:

[0027] If a global setting instruction for the target application is received, then perform global configuration on the small window switching mode of the target application;

[0028] If a page setting instruction for the target application is received, configure the small window switching mode of the application page selected by the user.

[0029] On the one hand, an apparatus for scaling an application window is provided in an embodiment of the present application. The apparatus includes:

[0030] A display unit for displaying a target application window of a target application; the target application window is a window of the target application in a small window mode;

[0031] A scaling unit for displaying a scaled target application window in response to a dragging operation of a user on the target application window; the target application window is reduced or enlarged according to a window scaling factor and a scaling direction; both the window scaling factor and the scaling direction are determined according to a minimum width threshold and a dragging trajectory of the dragging operation. On the one hand, an apparatus for scaling an application window is provided in an embodiment of the present application, including:

[0032] In one implementation, the scaling unit is used to:

[0033] Determine a dragging trajectory in response to a dragging operation of a user on the target application window;

[0034] Determine a first height, a first width, and a scaling direction indicated by the user through the dragging operation according to the dragging trajectory;

[0035] Determine a window scaling factor according to the first width and the minimum width threshold;

[0036] Scale the first height and the first width respectively according to the window scaling factor to obtain a second height and a second width;

[0037] Scale the height and width of the target application window to the second height and the second width respectively according to the scaling direction to obtain a scaled target application window.

[0038] In one implementation, the scaling unit is used to:

[0039] If the first width is not higher than the minimum width threshold, determine the ratio of the minimum width threshold to the first width as the window scaling factor;

[0040] If the first width is higher than the minimum width threshold, use a set scaling factor as the window scaling factor.

[0041] In one implementation, the scaling unit is used to:

[0042] Determine a second width according to a first product of the window scaling factor and the first width; the second width is positively correlated with the first product;

[0043] Determine a second height according to a second product of the window scaling factor and the first height; the second height is positively correlated with the second product.

[0044] In one implementation, the scaling unit is further used to:

[0045] Obtain the small window switching mode corresponding to the target application window;

[0046] If the target application window is in the landscape screen state and the small window switching mode includes the landscape screen mode, determine the minimum width threshold according to the minimum landscape screen width value;

[0047] If the target application window is in the landscape screen state and the small window switching mode includes the landscape and portrait modes, determine the minimum width threshold according to the minimum landscape screen width value and the minimum portrait screen width value;

[0048] If the target application window is in the portrait screen state and the small window switching mode includes the portrait screen mode, determine the minimum width threshold according to the minimum portrait screen width value;

[0049] If the target application window is in the portrait screen state and the small window switching mode includes the landscape and portrait modes, determine the minimum width threshold according to the minimum landscape screen width value and the minimum portrait screen width value.

[0050] In one implementation, the scaling unit is further configured to:

[0051] If a global setting instruction for the target application is received, globally configure the small window switching mode of the target application;

[0052] If a page setting instruction for the target application is received, configure the small window switching mode of the application page selected by the user.

[0053] On the one hand, an electronic device is provided in an embodiment of the present application, including:

[0054] A processor; and

[0055] A memory storing computer instructions, the computer instructions being used to cause the processor to execute the steps of the method provided in any of the above optional implementation manners of application window scaling.

[0056] On the one hand, a storage medium is provided in an embodiment of the present application, storing computer instructions, the computer instructions being used to cause a computer to execute the steps of the method provided in any of the above optional implementation manners of application window scaling.

[0057] The method for scaling an application window in the embodiments of the present application includes displaying a target application window of a target application; the target application window is the window of the target application in the small window mode; in response to a dragging operation of the user on the target application window, displaying the scaled target application window; the target application window is reduced or enlarged according to a window scaling coefficient and a scaling direction; both the window scaling coefficient and the scaling direction are determined according to a minimum width threshold and the dragging trajectory of the dragging operation. In this way, the window scaling coefficient is adaptively adjusted according to the minimum width threshold and the dragging trajectory of the dragging operation, reducing the limitation of application window scaling and improving the freedom of application window scaling. Description of the Drawings

[0058] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0059] Figure 1 It is a flowchart of a method for scaling an application window in an embodiment of the present application.

[0060] Figure 2 It is a flowchart of a method for displaying an application window in an embodiment of the present application.

[0061] Figure 3 It is an example diagram for determining a small window switching mode in an embodiment of the present application.

[0062] Figure 4 It is an example diagram of an application in portrait screen in an embodiment of the present application.

[0063] Figure 5 It is an example diagram of an application in landscape screen in an embodiment of the present application.

[0064] Figure 6 It is an example diagram for displaying a target application window in an embodiment of the present application.

[0065] Figure 7 It is a structural block diagram of a device for scaling an application window in an embodiment of the present application.

[0066] Figure 8 It is a schematic structural diagram of an electronic device in an embodiment of the present application. Detailed Embodiments

[0067] The technical solution of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts belong to the scope of protection of the present application. In addition, the technical features involved in different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0068] First, some terms involved in the embodiments of the present application will be described to facilitate the understanding of those skilled in the art.

[0069] Terminal device: It can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a site, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system device, a personal navigation device, a personal digital assistant, an audio / video player, a digital camera / video camera, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a game device or any combination thereof, including accessories and peripherals of these devices or any combination thereof. It is also foreseeable that the terminal device can support any type of user interface (such as a wearable device), etc.

[0070] Server: It can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms.

[0071] In the actual usage scenario of an application, for the convenience of task interaction, the small window size of the application can usually be adjusted in a certain proportion. For example, the user can switch the window ratio of the small window between three ratio gears supported by the device by dragging the small window (such as dragging the hot area of a small window of a certain application on a tablet). The above three ratios are usually 4:3, 3:4, and 16:9.

[0072] However, in the traditional technology, when scaling the small window, it usually only supports switching the scaling ratio between fixed three ratio gears, and the restriction of small window scaling is relatively large, and the degree of freedom is relatively low, and it is usually difficult to meet the small window usage needs of users.

[0073] Based on the defects existing in the above related technologies, an application window scaling method, device, electronic device and storage medium are provided in the embodiments of the present application, aiming to improve the degree of freedom of application window scaling.

[0074] In an embodiment of the present application, a method for scaling an application window is provided. This method can be applied to an electronic device (such as a tablet computer). The present application does not limit the type of the electronic device, and it can be any device type suitable for implementation, such as a terminal device and a server, etc. The present application will not elaborate on this anymore.

[0075] Refer to Figure 1 As shown, it is a flowchart of a method for scaling an application window in an embodiment of the present application. The following will describe this method in combination with Figure 1 The specific implementation process of this method is as follows:

[0076] Step 100: Display the target application window of the target application.

[0077] Among them, the target application window is a small window of the target application (such as a browser application), that is, the target application window is the window of the target application in the small window mode.

[0078] Step 101: In response to a user's drag operation on the target application window, display the scaled target application window; the target application window is reduced or enlarged according to the window scaling coefficient and the scaling direction; both the window scaling coefficient and the scaling direction are determined according to the minimum width threshold and the drag trajectory of the drag operation.

[0079] The following will describe Figure 2 the Figure 1 scaled display of the application window in Figure 2 As shown, it is a flowchart of a method for displaying an application window in an embodiment of the present application. The following will describe this method. The specific implementation process of this method is as follows:

[0080] Step 200: In response to a user's drag operation on the target application window, determine the drag trajectory.

[0081] Step 201: According to the drag trajectory, determine the first height, the first width, and the scaling direction indicated by the user through the drag operation.

[0082] As an example, the user drags the hot area of the small window of the video application on the tablet. The tablet determines the first height, the first width, and the scaling direction according to the user's drag trajectory.

[0083] Furthermore, the first width, the first height, and the scaling direction can also be determined according to any size adjustment instruction for the target application window.

[0084] Optionally, the size adjustment instruction can be issued by the user, or can also be triggered when the application page is switched. The user can also issue the size adjustment instruction in any of the following ways: mouse operation, keyboard operation, biometric information such as iris, and voice instruction.

[0085] As an example, the user inputs the first width, the first height, and the scaling direction of the small window through the window size configuration option of the small window of the audio application in the tablet. The tablet performs an input operation according to the user's configuration information to obtain the first height, the first width, and the scaling direction.

[0086] Step 202: Determine the window scaling coefficient according to the first width and the minimum width threshold.

[0087] In one implementation, the first width is compared with the minimum width threshold, and the window scaling coefficient is determined according to the comparison result. Among them, the scaling coefficient is set to a value not less than 1. For example, it can be 1.1.

[0088] Specifically, when determining the window scaling coefficient, the following method can be used:

[0089] Method 1: If the first width is not higher than the minimum width threshold, then the ratio of the minimum width threshold to the first width is determined as the window scaling coefficient.

[0090] Method 2: If the first width is higher than the minimum width threshold, then the set scaling coefficient is used as the window scaling coefficient.

[0091] In one implementation, when determining the minimum width threshold, the following steps can be used:

[0092] S2021: Obtain the small window switching mode corresponding to the target application window.

[0093] Among them, the small window switching mode can be a normal switching mode or a free switching mode. The free switching mode can include at least one of the following methods: landscape mode, portrait mode, and horizontal and vertical mode.

[0094] In one implementation, if the compatibility of the electronic device with the free switching mode does not meet the compatibility conditions, then the small window switching mode is determined as the normal switching mode. If the compatibility of the electronic device with the free switching mode meets the compatibility conditions, then the free switching mode currently supported by the target application window is obtained. Since the free switching modes supported by different application pages may be the same or different, when the application page in the target application window is switched, the supported free switching mode may change.

[0095] Optionally, the free switching mode can be configured by the target application code, or configured by the user for the target application, or set by the electronic device for the target application.

[0096] In practical applications, the compatibility conditions can be set according to the actual application scenario and are not limited here.

[0097] Among them, when configuring the small window switching mode according to the user operation, any of the following methods can be adopted:

[0098] Method 1: If a global setting instruction for the target application is received, the small window switching mode of the target application is globally configured.

[0099] In this way, the small window switching mode of the target application can be globally configured, that is, the small window switching modes of all application pages in the target application are uniformly configured.

[0100] Method 2: If a page setting instruction for the target application is received, the small window switching mode of the selected application page is configured.

[0101] In this way, the small window switching mode of the application pages in the target application can be configured separately, so that the small window switching modes of different application pages can be the same or different.

[0102] Among them, when the target application code configures the free switching mode, the small window switching mode can be initialized and configured by code during the development of the target application.

[0103] In one implementation, the small window switching mode can be initialized and configured by configuring Extensible Markup Language (XML). Specifically, the free switching mode enable attribute can be added to the <application>In the element, configure the attributes through the free switching mode, and configure the free switching mode supported by the application.

[0104] As an example, if the enabled attribute of the free switching mode is the miui.window.CVW_ENABLED attribute, it can be added to the <application>In the element, set the attribute value of the miui.window.CVW_ENABLED attribute to true to support starting the free switching mode. The free switching mode configuration attribute is miui.window.CVW_MODE, and it can be added to the <application>Or <activity>In the element, configure the free switching mode supported by the application through the property value of miui.window.CVW_MODE.

[0105] Among them, <application>For global configuration of an application, <activity>For configuring a certain application page. Therefore, if in <application>Setting miui.window.CVW_MODE in the element indicates global configuration of the small window switching mode for the target application. If in <activity>Setting miui.window.CVW_MODE in the element is to separately configure the small window switching mode for a single application page.

[0106] Among them, the free switching mode can usually also be called Infinity 2.0, the landscape mode, the portrait mode, and the landscape and portrait mode, which can usually also be called the landscape and portrait mode, the portrait mode, and the landscape mode, and can also be called: full infinity, vertical infinity, and horizontal infinity in turn. The respective attribute values corresponding to the landscape mode, the portrait mode, and the landscape and portrait mode can be 1, 2, and 3 respectively.

[0107] For example, set the attribute value of the miui.window.CVW_ENABLED attribute to true, and in <application>Setting the value of miui.window.CVW_MODE to 1 in the element indicates enabling the free switching mode and globally configuring the small window switching mode of the target application to the horizontal and vertical modes.

[0108] For another example, set the property value of the miui.window.CVW_ENABLED property to true, and <activity>Setting the value of miui.window.CVW_MODE in the element to 1 indicates enabling the free switching mode and separately configuring the free switching mode of a certain application page to the horizontal and vertical modes.

[0109] It should be noted that the configuration of miui.window.CVW_ENABLED can only be configured within the application, while miui.window.CVW_MODE can be configured in the application or a certain activity. If the configurations of the application and the activity are inconsistent, the activity shall prevail.

[0110] For example, set the attribute value of the miui.window.CVW_ENABLED attribute to true and in <application>Set the value of miui.window.CVW_MODE in the element to 1, and at the same time in <activity>Set the value of miui.window.CVW_MODE in the element to 2. Since <application>Element and <activity>The element is configured with a free switching mode, so that, <activity>The free switching mode of the element is taken as the standard, indicating that the free switching mode is enabled, and the free switching mode of a certain application page is configured as the landscape mode.

[0111] Among them, when the electronic device sets the free switching mode for the target application, the following steps can be adopted: If the compatibility of the electronic device with the free switching mode meets the compatibility conditions, the electronic device tests the target application, and based on the test results, determines the free switching mode supported by the target application, and forcibly sets this free switching mode for the target application.

[0112] If it is determined that the small window switching mode is the normal switching mode, it means that the size of the small window cannot be freely adjusted. Then, three set widths can be obtained, and the target set width closest to the first width can be screened out, and the target set width is used as the second width, and the target set height corresponding to the target set width is used as the second height.

[0113] The following combines Figure 3 , and gives an example to illustrate the determination of the small window switching mode. Figure 3 It is an example diagram for determining the small window switching mode. Figure 3 In, when receiving the size adjustment instruction, obtain the application configuration information.

[0114] If it is determined according to the application configuration information that the compatibility of the device does not meet the compatibility conditions, then determine that the small window switching mode is the normal switching mode.

[0115] If it is determined according to the application configuration information that the compatibility of the device meets the compatibility conditions, then determine that the small window switching mode is the free switching mode, and determine which mode among the horizontal and vertical modes, portrait mode, and landscape mode it supports.

[0116] S2022: Determine the minimum width threshold according to the horizontal and vertical states of the target application window and the small window switching mode.

[0117] In one implementation, when executing S2022, any of the following methods can be adopted:

[0118] Method 1: If the target application window is in the landscape state and the small window switching mode includes the landscape mode, then determine the minimum width threshold according to the minimum landscape width value.

[0119] In one implementation, the set minimum landscape width value (e.g., 840dp) is determined as the minimum width threshold.

[0120] Method 2: If the target application window is in the landscape state and the small window switching mode includes the horizontal and vertical modes, then determine the minimum width threshold according to the minimum landscape width value and the minimum portrait width value.

[0121] In one implementation, the average value or the minimum value of the set minimum landscape screen width value and the minimum portrait screen width value is determined as the minimum width threshold.

[0122] Method 3: If the target application window is in the portrait state and the small window switching mode includes the portrait mode, then the minimum width threshold is determined according to the minimum portrait screen width value (e.g., 420dp).

[0123] In one implementation, the set minimum portrait screen width value is determined as the minimum width threshold.

[0124] Method 4: If the target application window is in the portrait state and the small window switching mode includes the landscape and portrait mode, then the minimum width threshold is determined according to the minimum landscape screen width value and the minimum portrait screen width value.

[0125] In one implementation, the average value or the minimum value of the set minimum landscape screen width value and the minimum portrait screen width value is determined as the minimum width threshold.

[0126] If none of the conditions in the above Method 1, Method 2, Method 3, and Method 4 are met, then the small window switching mode is determined as the normal switching mode, and the small window size is adjusted according to the normal switching mode, which will not be elaborated here.

[0127] Step 203: Scale the first height and the first width respectively according to the window scaling factor to obtain the second height and the second width.

[0128] Among them, the second width is not lower than the minimum width threshold. This is because according to Google's layout adaptation principle, there are corresponding minimum width limits for both portrait and landscape screens. The minimum width limit represents the minimum size limit for an application to ensure layout compatibility in its respective direction. If the small window is not higher than the corresponding minimum size, layout problems will occur in the application. Therefore, in the embodiments of the present application, to ensure layout compatibility, the window scaling factor is determined according to the comparison result between the first width and the minimum width threshold, and the width is adjusted based on the window scaling factor so that the width is not lower than the minimum width threshold.

[0129] In one implementation, when performing step 203, the following steps can be adopted:

[0130] S2031: Determine the second width according to the first product of the window scaling factor and the first width; the second width is positively correlated with the first product. In one implementation, the first product is determined as the second width.

[0131] S2032: Determine the second height according to the second product of the window scaling factor and the first height; the second height is positively correlated with the second product. In one implementation, the second product is determined as the second height.

[0132] In practical applications, the second width is not higher than the maximum height of the electronic device. Optionally, the range of the width-to-height ratio can be 0.4 to 0.75, and the second height can be in the range of 0.54 * window scaling factor to the screen height.

[0133] The following combines Figure 4 to give an example of the method for determining the window size in the vertical screen state. Figure 4 Shown is an example diagram of an application in the vertical screen. Figure 4 In the figure, the first window and the second window are displayed on the screen of the tablet, and the application windows are all in the vertical screen state. The small window switching mode includes the vertical screen mode. The screen width of the tablet is 1220 dp, and the minimum vertical screen width value is 420 dp. The first width of the first window is w1, and the first height is H1 (for example, it can be 580). Then, the minimum vertical screen width value 420 dp is determined as the minimum width threshold. Since the first width w1 is not higher than 420 dp, the window scaling factor α1 = 420 / w1, the second width is 420 = w1 * α1 = w1 * 420 / w1, and the second height is H1 * α1.

[0134] The second width of the second window is w2, and the second height is H2 (for example, it can be 580). Since the second width w2 is higher than 420 dp, the window scaling factor α2 = 1.1 is determined, the second width is w2 * α2, and the second height is H2 * α2.

[0135] The following combines Figure 5 to give an example of the method for determining the window size in the horizontal screen state. Figure 5 Shown is an example diagram of an application in the horizontal screen. The third window and the fourth window are displayed on the screen of the tablet, and the application windows are all in the horizontal screen state, and the small window switching mode is the horizontal screen mode. The screen width of the tablet is 1220 dp, and the minimum horizontal screen width value is 840 dp. The first width of the third window is w3, and the first height is H3 (for example, it can be 580). Then, the minimum horizontal screen width value 840 dp is determined as the minimum width threshold. Since the first width w3 is not higher than 840 dp, the window scaling factor α3 = 840 / w3 is determined, the second width is 840 = w3 * α3 = w3 * 840 / w3, and the second height is H3 * α3.

[0136] The second width of the fourth window is w4, and the second height is H4. Since the second width w4 is higher than 840 dp, the window scaling factor α4 = 1.1 is determined, the second width is w4 * α4, and the second height is H4 * α4.

[0137] Step 204: According to the scaling direction, scale the height and width of the target application window to the second height and the second width respectively to obtain the scaled target application window.

[0138] Step 205: Display the scaled target application window.

[0139] In one implementation, in an electronic device, display the adjusted target application window. Optionally, one or more target application windows of different target applications can be displayed on the screen of the electronic device.

[0140] As an example, it can be applied to an extra-large screen device, and a workbench mode is enabled on the extra-large screen device. In this mode, all applications are forced to start in a small window mode, and the size of any target application window can be adjusted according to the user's multitasking interaction requirements.

[0141] The following combines Figure 6 to give an example of the display of the target application window. Figure 6 It is an example diagram of the display of a target application window. Figure 6 In, four target application windows are displayed on the screen of the tablet. It should be noted that Figure 6 in, it is only used to display the target application window, Figure 6 the lines, text, and patterns in are not clear, which does not affect the clarity of the specification.

[0142] In the embodiments of the present application, the window scaling coefficient of the application window can be adaptively adjusted according to the minimum width threshold of the device, and through this window scaling coefficient, the size of the small window can be freely adjusted within a certain limit, so that the size of the small window always remains within a reasonable range. While ensuring the application layout, the limitation of small window scaling is reduced, the freedom of small window scaling is improved, the application layout, the size of the application window, and system compatibility are taken into account, and the user experience and efficiency of third-party applications in the multitasking scenario are enhanced. Further, a free switching mode can be configured for each application page respectively, which improves the accuracy of small window scaling and can better meet the needs of users.

[0143] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0144] Based on the same inventive concept, an apparatus for application window scaling is further provided in the embodiments of the present application. Since the principle of solving problems by the above apparatus and device is similar to that of a method for application window scaling, the implementation of the above apparatus can refer to the implementation of the method, and the repeated parts will not be elaborated. This apparatus can be applied to an electronic device, and the present application does not limit the type of the electronic device, which can be any device type suitable for implementation, such as a terminal device and a server, etc., and the present application will not elaborate on this.

[0145] Refer to Figure 7 As shown, it is a structural block diagram of the apparatus for application window scaling in the embodiments of the present application. In some embodiments, the apparatus for application window scaling exemplified in the present application includes:

[0146] A display unit 701, configured to display a target application window of a target application; the target application window is a window of the target application in the small window mode;

[0147] A scaling unit 702, configured to display the scaled target application window in response to a dragging operation of a user on the target application window; the target application window is reduced or enlarged according to a window scaling factor and a scaling direction; both the window scaling factor and the scaling direction are determined according to a minimum width threshold and the dragging trajectory of the dragging operation. On the one hand, an apparatus for application window scaling is provided in the embodiments of the present application, including:

[0148] In one embodiment, the scaling unit 702 is configured to:

[0149] Determine the dragging trajectory in response to a dragging operation of a user on the target application window;

[0150] Determine a first height, a first width, and a scaling direction indicated by the user through the dragging operation according to the dragging trajectory;

[0151] Determine the window scaling factor according to the first width and the minimum width threshold;

[0152] Scale the first height and the first width respectively according to the window scaling factor to obtain a second height and a second width;

[0153] Scale the height and width of the target application window to the second height and the second width respectively according to the scaling direction to obtain the scaled target application window.

[0154] In one embodiment, the scaling unit 702 is configured to:

[0155] If the first width is not higher than the minimum width threshold, determine the ratio of the minimum width threshold to the first width as the window scaling factor;

[0156] If the first width is higher than the minimum width threshold, a scaling factor will be set as the window scaling factor.

[0157] In one implementation, the scaling unit 702 is configured to:

[0158] Determine a second width according to a first product of the window scaling factor and the first width; the second width is positively correlated with the first product;

[0159] Determine a second height according to a second product of the window scaling factor and the first height; the second height is positively correlated with the second product.

[0160] In one implementation, the scaling unit 702 is further configured to:

[0161] Obtain the small window switching mode corresponding to the target application window;

[0162] If the target application window is in the landscape mode and the small window switching mode includes the landscape mode, determine the minimum width threshold according to the minimum landscape width value;

[0163] If the target application window is in the landscape mode and the small window switching mode includes the landscape and portrait mode, determine the minimum width threshold according to the minimum landscape width value and the minimum portrait width value;

[0164] If the target application window is in the portrait mode and the small window switching mode includes the portrait mode, determine the minimum width threshold according to the minimum portrait width value;

[0165] If the target application window is in the portrait mode and the small window switching mode includes the landscape and portrait mode, determine the minimum width threshold according to the minimum landscape width value and the minimum portrait width value.

[0166] In one implementation, the scaling unit 702 is further configured to:

[0167] If a global setting instruction for the target application is received, globally configure the small window switching mode of the target application;

[0168] If a page setting instruction for the target application is received, configure the small window switching mode of the application page selected by the user.

[0169] The method for scaling an application window in an embodiment of the present application includes displaying a target application window of a target application; the target application window is a window of the target application in the small window mode; in response to a dragging operation of a user on the target application window, displaying the scaled target application window; the target application window is reduced or enlarged according to a window scaling coefficient and a scaling direction; both the window scaling coefficient and the scaling direction are determined according to a minimum width threshold and a dragging trajectory of the dragging operation. In this way, the window scaling coefficient is adaptively adjusted according to the minimum width threshold and the dragging trajectory of the dragging operation, reducing the limitation of application window scaling and improving the freedom of application window scaling.

[0170] In an embodiment of the present application, an electronic device is provided, including:

[0171] a processor; and

[0172] a memory storing computer instructions for causing the processor to execute the method according to any of the above embodiments.

[0173] In an embodiment of the present application, a storage medium is provided, storing computer instructions for causing a computer to execute the method according to any of the above embodiments. Figure 8 FIG. shows a schematic structural diagram of an electronic device 8000. Refer to Figure 8 As shown, the electronic device 8000 includes a processor 8010 and a memory 8020. Optionally, it may further include a power supply 8030, a display unit 8040, and an input unit 8050.

[0174] The processor 8010 is the control center of the electronic device 8000, connecting each component through various interfaces and lines, and executing various functions of the electronic device 8000 by running or executing software programs and / or data stored in the memory 8020, thereby monitoring the electronic device 8000 as a whole.

[0175] In an embodiment of the present application, when the processor 8010 calls the computer program stored in the memory 8020, it executes each step in the above embodiment.

[0176] Optionally, the processor 8010 may include one or more processing units; preferably, the processor 8010 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, applications, etc., and the modem processor mainly processes wireless communication. It can be understood that the above modem processor may not be integrated into the processor 8010. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be separately implemented on independent chips.

[0177] The memory 8020 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, various applications, etc.; the data storage area may store data created according to the use of the electronic device 8000, etc. In addition, the memory 8020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices, etc.

[0178] The electronic device 8000 further includes a power supply 8030 (such as a battery) for powering each component. The power supply may be logically connected to the processor 8010 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption through the power management system.

[0179] The display unit 8040 may be used to display information input by the user or information provided to the user, as well as various menus of the electronic device 8000, etc. In the embodiments of the present application, it is mainly used to display the display interfaces of various applications in the electronic device 8000 and objects such as text and pictures displayed in the display interfaces. The display unit 8040 may include a display panel 8041. The display panel 8041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0180] The input unit 8050 may be used to receive information such as numbers or characters input by the user. The input unit 8050 may include a touch panel 8051 and other input devices 8052. Among them, the touch panel 8051, also known as a touch screen, may collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 8051).

[0181] Specifically, the touch panel 8051 may detect the touch operation of the user, detect the signals brought by the touch operation, convert these signals into contact coordinates, send them to the processor 8010, and receive and execute the commands sent by the processor 8010. In addition, the touch panel 8051 may be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. The other input devices 8052 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0182] Of course, the touch panel 8051 can cover the display panel 8041. After the touch panel 8051 detects a touch operation on or near it, it is transmitted to the processor 8010 to determine the type of touch event. Subsequently, the processor 8010 provides a corresponding visual output on the display panel 8041 according to the type of touch event. Although in Figure 8 the touch panel 8051 and the display panel 8041 are implemented as two independent components to realize the input and output functions of the electronic device 8000, in some embodiments, the touch panel 8051 and the display panel 8041 can be integrated to realize the input and output functions of the electronic device 8000.

[0183] The electronic device 8000 may further include one or more sensors, such as a pressure sensor, a gravitational acceleration sensor, a proximity light sensor, etc. Of course, according to the needs in specific applications, the above electronic device 8000 may further include other components such as a camera. Since these components are not the key components used in the embodiments of the present application, therefore, in Figure 8 they are not shown and will not be described in detail.

[0184] Those skilled in the art can understand that Figure 8 this is only an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than shown in the figure, or combine some components, or different components.

[0185] For the convenience of description, the above parts are divided into various modules (or units) according to functions and described separately. Of course, when implementing the present application, the functions of the various modules (or units) can be implemented in the same or multiple software or hardware.

[0186] Obviously, the above embodiments are only examples for clear illustration and not limitations on the embodiments. For those of ordinary skill in the art, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to list all the embodiments here. And the obvious changes or modifications derived therefrom are still within the protection scope of the present invention.< / activity> < / activity> < / application> < / activity> < / application> < / activity> < / application> < / activity> < / application> < / activity> < / application> < / activity> < / application> < / application> < / application>

Claims

1. A method for applying window scaling, characterized in that, The method includes: Displaying a target application window of a target application; the target application window is a window of the target application in a small window mode; In response to a dragging operation of a user on the target application window, displaying a scaled target application window; the target application window is reduced or enlarged according to a window scaling factor and a scaling direction; both the window scaling factor and the scaling direction are determined according to a minimum width threshold and a dragging trajectory of the dragging operation.

2. The method according to claim 1, wherein The step of, in response to a dragging operation of a user on the target application window, displaying a scaled target application window includes: In response to a dragging operation of a user on the target application window, determining the dragging trajectory; According to the dragging trajectory, determining a first height, a first width indicated by the user through the dragging operation, and the scaling direction; According to the first width and the minimum width threshold, determining the window scaling factor; According to the window scaling factor, respectively scaling the first height and the first width to obtain a second height and a second width; According to the scaling direction, scaling the height and width of the target application window to the second height and the second width respectively to obtain the scaled target application window.

3. The method according to claim 2, wherein The step of, according to the first width and the minimum width threshold, determining the window scaling factor includes: If the first width is not higher than the minimum width threshold, determining the ratio of the minimum width threshold to the first width as the window scaling factor; If the first width is higher than the minimum width threshold, setting a set scaling factor as the window scaling factor.

4. The method according to claim 2 or 3, characterized in that, The step of, according to the window scaling factor, respectively scaling the first height and the first width to obtain a second height and a second width includes: Determining the second width according to a first product of the window scaling factor and the first width; the second width is positively correlated with the first product; Determining the second height according to a second product of the window scaling factor and the first height; the second height is positively correlated with the second product.

5. The method according to claim 2 or 3, characterized in that, Before determining the window scaling factor according to the first width and the minimum width threshold, the method further includes: Obtaining a small window switching mode corresponding to the target application window; If the target application window is in a landscape screen state and the small window switching mode includes a landscape screen mode, determining the minimum width threshold according to a minimum landscape screen width value; If the target application window is in a landscape screen state and the small window switching mode includes a landscape and portrait mode, determining the minimum width threshold according to the minimum landscape screen width value and a minimum portrait screen width value; If the target application window is in a portrait screen state and the small window switching mode includes a portrait screen mode, determining the minimum width threshold according to a minimum portrait screen width value; If the target application window is in a portrait screen state and the small window switching mode includes a landscape and portrait mode, determining the minimum width threshold according to the minimum landscape screen width value and the minimum portrait screen width value.

6. The method according to claim 5, wherein The method further includes: If a global setting instruction for a target application is received, globally configure the small window switching mode of the target application; If a page setting instruction for the target application is received, configure the small window switching mode of the application page selected by the user.

7. An apparatus for applying window scaling, characterized in that, The device includes: A display unit for displaying a target application window of the target application; the target application window is the window of the target application in the small window mode; A scaling unit for, in response to a dragging operation by the user on the target application window, displaying the scaled target application window; the target application window is reduced or enlarged according to a window scaling factor and a scaling direction; both the window scaling factor and the scaling direction are determined according to a minimum width threshold and the dragging trajectory of the dragging operation.

8. An electronic device, characterized in that, Comprising: A processor; And A memory storing computer instructions for causing the processor to execute the method according to any one of claims 1 to 6.

9. A storage medium, characterized in that, Storing computer instructions for causing a computer to execute the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Window scaling special effect optimization method and system under Wayland synthesizer

    CN122415816A