A processing method and electronic device
By adjusting the window and canvas size ratio of the target application at the electronic device system level, the problems of narrowed display field of view and black borders in screen projection on mobile devices were solved, resulting in a better display effect.
Patent Information
- Application Number
- CN202210329954.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In existing technologies, mobile devices sometimes suffer from narrowed field of view or black borders when projecting applications because the default display parameters do not match the device type, which affects the user experience.
By obtaining the second display parameters provided by the electronic device system, the window and canvas size ratio of the target application are adjusted to be different from the default display parameters of the device type, so as to change the display ratio of the application screen at the system level.
It improves the display effect of the application screen, solves the problems of narrowed field of view and black borders when casting, and enhances the user experience.
Smart Images

Figure CN114756188B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of intelligent equipment technology, and in particular relates to a processing method and an electronic device. Background Technology
[0002] With the rapid development of mobile devices such as smartphones and tablets, the market size and user base of mobile applications such as mobile games have been increasing year by year. At the same time, users have generated new functional requirements for mobile devices. How to improve the functions of mobile devices to better adapt to the needs of mobile applications has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0003] Therefore, this application discloses the following technical solution:
[0004] A processing method, the method comprising:
[0005] Obtain a startup instruction, wherein the startup instruction is an instruction used to instruct the launch of a target application;
[0006] The system of the electronic device obtains a second display parameter provided by the target application; the second display parameter is different from the first display parameter configured by the target application.
[0007] Start and run the target application;
[0008] The window size ratio is determined based on the first display parameter, and the window interface of the target application is generated based on the window size ratio.
[0009] The canvas size ratio is determined based on the second display parameter, and a corresponding canvas is generated within the window interface according to the canvas size ratio, so as to draw the application screen of the target application on the canvas.
[0010] Optionally, the system for acquiring the electronic device provides the second display parameters for the target application, including:
[0011] The system pre-configured the screen display ratio and / or display size for the target application based on the configuration operation of the operator of the electronic device, and uses it as the second display parameter;
[0012] Alternatively, the system of the electronic device may obtain the screen display ratio and / or screen display size of the external display device as the second display parameter.
[0013] Optionally, the second display parameter may also include the position information of the canvas on the window interface.
[0014] Optionally, the above method also includes:
[0015] Based on the screen display ratio of the external display device, the application screen of the target application is simultaneously displayed on the electronic device and the external display device;
[0016] When the electronic device and the external display device synchronously display the application screen of the target application, the target application can be operated in the foreground on the electronic device, and the display output of the electronic device and the external display device can be synchronously controlled based on the corresponding operation information.
[0017] Optionally, there may be multiple target applications, and each target application corresponds to an external display device;
[0018] Specifically, the application screen of each target application is displayed synchronously on the electronic device and the corresponding external display device according to the screen display ratio of the external display device corresponding to each target application. Furthermore, different target applications can be operated in the foreground on the electronic device, and the display output of the electronic device and the corresponding external display device can be controlled synchronously based on the operation information of the corresponding target application.
[0019] Optionally, generating a corresponding canvas within the window interface according to the canvas size ratio, and drawing the application screen of the target application on the canvas, includes:
[0020] Within the window interface, a canvas with a corresponding canvas orientation that matches the window orientation of the window interface is generated according to the canvas size ratio, so as to draw the application screen of the target application on the canvas according to the canvas orientation.
[0021] Optionally, the generated canvas does not fill the interface area of the window interface, and the empty area outside the canvas area within the window interface can be used for information display.
[0022] Optionally, the functional controls of the target application are laid out in the canvas area and / or the empty area of the canvas.
[0023] Optionally, the electronic device system provides multiple candidate display modes for at least one application that meets the application conditions; the target application is one of the at least one applications that meet the application conditions.
[0024] Different display modes correspond to different second display parameters. The second display parameters corresponding to each display mode include at least the display size ratio of the application screen. The second display parameters pre-configured by the system of the electronic device for the target application are parameters configured by the operator through mode selection among the multiple candidate display modes.
[0025] An electronic device, the electronic device comprising:
[0026] A display screen used for displaying information;
[0027] Memory, used to store at least one set of instructions;
[0028] A processor for invoking and executing the instruction set in the memory, thereby implementing the processing method as described in any of the preceding descriptions.
[0029] This application also discloses a storage medium storing a computer instruction set, which, when called and executed by a processor, can be used to implement any of the processing methods disclosed above.
[0030] As can be seen from the above solutions, the processing method and electronic device disclosed in this application obtain the second display parameters provided by the system of the electronic device for the target application. The second display parameters are different from the first display parameters configured for the target application. The window size ratio is determined according to the first display parameters, and the window interface of the target application is generated according to the window size ratio. The canvas size ratio is determined according to the second display parameters, and a corresponding canvas is generated within the window interface according to the canvas size ratio, so as to draw the application interface of the target application on the canvas. Therefore, this application changes the display ratio of the application screen by changing the canvas size ratio of the target application at the system level of the electronic device, so that the canvas size ratio of the target application is different from the window size ratio, thereby changing the display ratio of the application screen of the target application. This can effectively improve the display effect of the application screen, so that it can better adapt to the different display needs of mobile applications on mobile devices. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0032] Figure 1 This is a flowchart illustrating one of the processing methods provided in this application;
[0033] Figure 2 This is a comparison diagram of the left and right field of view of the game screen on a mobile phone and a tablet computer provided in this application;
[0034] Figure 3 This is a diagram illustrating the display effect of game screens on mobile phones and TVs in existing screen mirroring scenarios.
[0035] Figure 4 This is a comparison diagram of the original field of view in the prior art and the adjusted field of view in this application;
[0036] Figure 5 This is another flowchart illustrating the processing method provided in this application;
[0037] Figure 6 This application provides an example of the display effect where, after processing by this application, the game screen is synchronously output at the source and destination ends according to the screen display ratio of the destination end.
[0038] Figure 7 This is an example of adaptively matching the canvas orientation with the window orientation of the window interface provided in this application;
[0039] Figure 8 This application provides examples of the display effects of the original field of view in the game based on existing technology, as well as the different display modes of ultra-wide field of view centered display and ultra-wide field of view lowered display based on this application.
[0040] Figure 9 This is a structural diagram of the electronic device provided in this application. Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0042] This application discloses a processing method and an electronic device applicable to, but not limited to, resizing the full-screen display of application screens in scenarios such as video playback or game operation, to meet the diverse display needs of users in the aforementioned or similar scenarios and improve the display effect of application screens. This processing method can be applied to electronic devices that possess a display device and / or are capable of connecting an external display device via a display interface (such as a DP interface, HDMI interface, screen mirroring interface, etc.). Specifically, it can be, but is not limited to, devices with a display device and / or capable of connecting an external display device via a display interface, in various general-purpose or special-purpose computing device environments or configurations, such as: personal computers, server computers, handheld or portable devices, tablet devices, AR / VR devices, multiprocessor devices, etc.
[0043] See Figure 1 The flowchart of the processing method provided, the processing method disclosed in this application embodiment includes the following processing steps:
[0044] Step 101: Obtain the startup command, which is a command used to instruct the target application to be launched.
[0045] The target application can be any application installed on an electronic device that can run in the foreground and at least supports screen resizing in full-screen mode. Specifically, it can be, but is not limited to, video or game applications that possess the above characteristics.
[0046] The full-screen mode here refers to the mode in which the application interface / window occupies the entire display area of the electronic device screen.
[0047] Users can launch the desired target application through gesture / stylus-based touch input, or voice input, keyboard / mouse input, etc. (e.g., gesture-based touch input of application icons on the phone screen). By launching the target application, the launch command is triggered to indicate the launch of the target application.
[0048] Step 102: Obtain the second display parameters provided by the electronic device's system for the target application; the second display parameters are different from the first display parameters configured by the target application.
[0049] The system of an electronic device can be the operating system of the electronic device.
[0050] In one embodiment, the second display parameter is an application screen display parameter configured by the operator for the target application in the operating system of the electronic device. It can at least indicate the display ratio of the target application's screen in full-screen mode, and may include, but is not limited to, the screen display ratio and / or display size (such as screen length and width values) configured by the operator for the target application. Optionally, the operator can be any one or more of a button, stylus, electronic pen, mouse, finger, etc.
[0051] In this embodiment, the system for acquiring the second display parameters provided by the electronic device for the target application can be implemented as follows: at least the screen display ratio and / or display size pre-configured by the system of the electronic device for the target application based on the configuration operation of the operator, as the second display parameter.
[0052] In practical applications, an application set that meets the above characteristics (i.e., can run in the foreground of the device and at least supports adjusting the screen size of the application screen in full-screen display mode) can be provided in advance in the operating system of the electronic device. For example, an application list / application list that meets the above characteristics can be provided to the user at the operating system level, so as to support the on-demand configuration of the application screen display parameters of any one or more applications in the set.
[0053] Optionally, in this embodiment, the electronic device system specifically provides multiple candidate display modes for each application in the aforementioned application set. Different display modes correspond to different second display parameters, and the second display parameters corresponding to each display mode include at least the display ratio and / or display size of the application screen, allowing users to configure the display parameters of the application screen on demand by selecting the display mode.
[0054] Of course, the screen of the electronic device can also recommend preferred screen display parameters / modes to the user, under which the application screen of the target application will be displayed better.
[0055] It is easy to understand that the target application to be launched is one of the above application sets, and in this implementation, the electronic device's system pre-configures the second display parameters for the target application, specifically the parameters configured by the operator to select the mode for the target application from the multiple candidate display modes (e.g., screen display ratio and / or display size).
[0056] In other embodiments, the second display parameter can also be the screen display parameter obtained by the electronic device system from the external display device in the scenario where the electronic device is connected to an external display device. Specifically, it can be the display ratio and / or display size corresponding to the screen display area of the external display device, such as the screen display ratio of the external display device obtained by the device system through the HDMI connection cable with the external display device.
[0057] In this implementation, the system for acquiring the electronic device provides the second display parameters to the target application, which can be implemented as follows: the system for acquiring the electronic device obtains the screen display ratio and / or display size of the external display device as the second display parameters.
[0058] It should be noted that, regardless of the implementation method, the second display parameter is provided by the operating system of the electronic device to the target application, that is, the parameter is provided at the operating system layer rather than the application layer.
[0059] The first display parameter is the display parameter configured for the target application. Specifically, the first display parameter is the application screen display parameter configured by default in full-screen operation mode for the device type of the currently used electronic device (such as a tablet or mobile phone). It can also be the display ratio and / or display size (i.e., length and width values).
[0060] In existing technologies, the first display parameter configured for the target application is typically consistent with the screen display parameters corresponding to the device type of the currently used electronic device. For example, if the default aspect ratio of a tablet is 16:9, existing technologies will configure the screen ratio (first display parameter) of applications such as games in full-screen mode to 16:9. For smartphones with an 18:9 screen ratio, existing technologies will correspondingly configure the screen ratio of applications such as games in full-screen mode to 18:9. This approach in existing technologies results in a narrow left and right field of view for applications displayed on electronic devices with smaller screen ratios, such as tablets, making it impossible to display the entire interface on the tablet, leading to poor display quality. See [reference needed] for details. Figure 2 The image shows a comparison of the left and right field of view in the game screen of a mobile phone and a tablet computer.
[0061] Additionally, in scenarios involving external displays on electronic devices, when the electronic device and the external display simultaneously display application screens in full-screen mode, such as when a mobile phone and an external TV screen are simultaneously displaying game screens in full-screen mode using "screen mirroring," the application is generally configured by default to display the screen synchronously on both the electronic device and the external display based on the screen ratio of the electronic device. For example, the game screen might be displayed synchronously on both the mobile phone and TV screens with a 18:9 screen ratio. The screen ratio of the target device (e.g., 4:3) is usually smaller than that of the source device (e.g., the mobile phone). Consequently, when a mobile user wants to connect to a TV screen or other projection area for real-time sharing while playing games, the screen will appear as black bars at the top and bottom of the projection area due to the different aspect ratios of the mobile phone and the TV screen, making the display area appear smaller. See [link to details]. Figure 3 The image shows a comparison of the display effects of the game screen on the mobile phone and the TV.
[0062] In this embodiment, the second display parameter is different from the first display parameter. By obtaining the second display parameter provided by the operating system of the electronic device for the target application, which is different from the first display parameter configured by the target application, the problem of poor display effect caused by the inherent display parameters set by the default settings of the application in the above scenario, such as narrowing of the game field of view or black borders on the application screen of the target end, is solved, so as to improve the user experience.
[0063] Step 103: Start and run the target application.
[0064] After acquiring the second display parameters provided by the electronic device system for the target application, the target application is started and run, and during the startup and running of the target application, the display control of the application screen of the target application is performed based on the second display parameters.
[0065] Step 104: Determine the window size ratio based on the first display parameter, and generate the window interface of the target application based on the window size ratio.
[0066] In this embodiment, the first display parameter may be the screen display parameters of the target application in full-screen operation mode, which are configured by default for the device type of the currently used electronic device, such as the application screen display ratio and / or display size. The screen display parameters of the target application in full-screen operation mode, which are configured by default for the device type of the currently used electronic device, are typically consistent with the default window size ratio and canvas size ratio of the target application. For example, if the default screen display ratio of the target application is equal to the default window size ratio and canvas size ratio of the target application, then the first display parameter may also be the default window size ratio or canvas size ratio of the target application.
[0067] The target application's window interface is used to limit the usable area of the target application on the screen. When the electronic device is a mobile phone, the target application's window interface can be a PhoneWindow that can configure the usable area of the target application on the screen. For example, by configuring PhoneWindow, the target application's Activity window can occupy the entire screen exclusively, or a floating window of a certain size can occupy part of the screen.
[0068] In this embodiment, the window size ratio is determined based on the first display parameters. Specifically, the screen display ratio or window size ratio / canvas size ratio (i.e., the default window size ratio / canvas size ratio of the target application) in the first display parameters can be directly used as the window size ratio. Alternatively, the aspect ratio can be calculated based on the screen display size, i.e., the length and width values of the screen, in the first display parameters, and the calculated aspect ratio can be used as the window size ratio. Then, the window interface of the target application is generated based on the determined window size ratio to limit the usable area of the target application on the screen.
[0069] Step 105: Determine the canvas size ratio according to the second display parameter, and generate the corresponding canvas in the window interface according to the canvas size ratio, so as to draw the application screen of the target application on the canvas.
[0070] Next, a canvas for drawing the target application's screen is generated within the generated window interface. During canvas generation, the canvas size ratio is first determined based on the second display parameters. Specifically, this can be achieved by directly using the screen display ratio in the second display parameters as the canvas size ratio, or by calculating the aspect ratio based on the screen display dimensions (length and width values) in the second display parameters and using the calculated aspect ratio as the canvas size ratio. After determining the canvas size ratio, the corresponding canvas is generated within the window interface according to this ratio. Based on this, the target application's screen is drawn within the canvas area.
[0071] Optionally, when generating a canvas within the target application's window interface, the target application's default canvas size ratio can be dynamically adjusted to the canvas size ratio determined according to the second display parameter. Based on the adjusted canvas size ratio, a canvas of the corresponding size ratio is generated within the target application's window interface. Since the target application's default canvas size ratio has been changed, the changed canvas size ratio is different from the target application's default window size ratio. Therefore, the canvas generated based on the changed canvas size ratio does not fill the entire area of the target application's window interface.
[0072] The canvas here can specifically be the application's root view window, used to draw the application's visible screen. Taking a game application as an example, after the game application's PhoneWindow is created, a root view window is further deployed within the PhoneWindow. All visible screen content of the game is drawn within the root view window. In implementation, the processing logic of this application can be implemented through WindowManagerServer (window management service), and its influence can be exerted during the creation of device applications such as Android applications. After the application's PhoneWindow is created, when adding the root view window, the root view attribute parameters are dynamically adjusted according to the second display parameters provided by the electronic device's system (such as the screen ratio configured by the user or the screen ratio of the external display device), so that the application's root view window does not fill the PhoneWindow. Since all visible screen content of the application is drawn within the root view window, changing the size of the root view window changes the application's screen ratio.
[0073] In existing technologies, for applications such as games, the default window size ratio, canvas size ratio, and application screen display ratio are usually the same, all being the screen display ratio of the currently used electronic device. For example, in tablet computers, the root view window ratio and PhoneWindow ratio are generally set to be the same, meaning the root view window fills the entire area of the PhoneWindow, and the application screen is drawn within the root view window at the same ratio. This application utilizes a second display parameter provided by the electronic device's system to change the application's canvas size ratio. Since the canvas area determines the area of the application screen that can be drawn, the display ratio of the application screen is changed by adjusting the canvas size ratio, such as changing the display ratio of the game screen, to improve the display effect of the application screen.
[0074] The following are specific examples:
[0075] against Figure 2 To address the issue of narrow left and right field of view in tablet computers, this application generates the PhoneWindow for applications such as games based on the original 16:9 PhoneWindow display ratio. It then adjusts the game's default canvas size ratio of 16:9 according to the user's input method and the operating system's pre-configured 18:9 ratio, creating a root view window at an 18:9 scale. The game screen is then drawn within this 18:9 ratio, resulting in a wider left and right field of view on the tablet computer. See details below. Figure 4 The diagram shows a comparison between the original field of view of the prior art and the game field of view adjusted in this application.
[0076] As can be seen from the above solution, the system of the electronic device obtains the second display parameters provided by the target application. These second display parameters differ from the first display parameters configured for the target application. The window size ratio is determined based on the first display parameters, and the window interface of the target application is generated according to this ratio. The canvas size ratio is determined based on the second display parameters, and a corresponding canvas is generated within the window interface according to this ratio, so that the application interface of the target application can be drawn on the canvas. Therefore, this application changes the canvas size ratio of the target application at the system level, making it different from the window size ratio, thereby altering the display ratio of the target application's screen. This effectively improves the display effect of the application screen, allowing it to better adapt to the different display needs of mobile applications on mobile devices.
[0077] For scenarios involving external display devices on electronic devices, and displaying application interfaces through these external display devices, see [link to relevant documentation]. Figure 5 The flowchart of the processing method shown may further include the following processes:
[0078] Step 106: Based on the screen size ratio of the external display device, synchronously display the application screen of the target application on both the electronic device and the external display device.
[0079] Specifically, on the projection source device (electronic device), the window interface of the target application is generated according to the default window size ratio of the target application (i.e., the window size ratio determined according to the first display parameter). The canvas size ratio of the target application is adjusted according to the screen size ratio of the external display device, so that the canvas size ratio of the target application is adjusted to the screen size ratio of the external display device. The corresponding canvas is generated on the window interface according to the adjusted ratio, and the application screen is drawn on the canvas. The display ratio of the drawn application screen is obviously the screen size ratio of the external display device. At the same time, based on the projection mirroring method, the application screen is synchronously displayed on the electronic device and the external display device according to the screen size ratio of the external display device.
[0080] Among them, when the application screen of the target application is displayed synchronously on the electronic device and the external display device, the target application can be operated in the foreground on the electronic device, such as attack, roll, and move operations in the game, and the display output of the electronic device and the external display device can be controlled synchronously based on the corresponding operation information.
[0081] The following are further examples:
[0082] against Figure 3 To address the issue of black borders appearing at the top and bottom of the projection area on the target screen, resulting in a smaller display area, this application generates the application's Phone Window based on the original 18:9 aspect ratio of the application's Phone Window on the mobile phone. It then adjusts the application's default canvas size ratio of 18:9 to 4:3 based on the screen ratio of the external display device (such as a TV) obtained from the mobile phone. This results in the application's root view window being generated on the mobile phone at the adjusted 4:3 ratio, and the application screen being drawn in the root view window at a 4:3 ratio. Simultaneously, based on the "mirror projection method," the application screen is displayed synchronously at a 4:3 ratio on the target screen. This achieves full-screen display on the target screen according to its screen ratio during synchronous display on both ends, eliminating the black border problem.
[0083] It should be noted that in application casting scenarios (i.e., casting the application interface of a target application from an electronic device to an external display device), existing casting methods typically have two modes. One mode is "application casting mode," in which the application interface of the target application is not displayed on the electronic device, but is displayed on the external display device according to the screen ratio of the external display device. For example, the application interface can be displayed in full screen on a TV at a 4:3 aspect ratio. Although this mode can provide a full-screen display effect, the electronic device cannot control the application interface because it is not displayed on the electronic device. For applications like games, this does not enhance the gaming experience. The other mode is "mirror casting mode," in which the application interface of the target application can be displayed simultaneously on both the electronic device and the external display device. However, the application interface is displayed on the external display device according to the screen ratio of the electronic device, as shown in Figure 3, resulting in a black border issue. This application improves this problem through the above processing, enabling synchronous display of the application screen on both the source and destination ends, eliminating the black border issue on the destination end, and expanding the display area of the destination end. See details. Figure 6 This application provides a display effect where, after processing, the game screen is synchronously output on both the source and destination ends according to the screen display ratio of the destination end.
[0084] Additionally, it should be noted that in scenarios where an electronic device is connected to an external display device to display application screens, the number of target applications is not limited and can be one or more. If there are multiple target applications, optionally, each target application corresponds to one external display device. The application interface of each target application is synchronously displayed on both the electronic device and the corresponding external display device, according to the screen size ratio of the external display device corresponding to each target application. The specific implementation process is similar to the implementation process for a single target application described above. That is, the window interface of the corresponding application is generated in different areas of the electronic device screen according to the default window size ratio of different applications. Within each window interface, a canvas is generated according to the screen size ratio of the external display device corresponding to the application, and the application screen is drawn. Based on screen mirroring technology, the application screen is synchronously displayed on both the electronic device and the corresponding external display device according to the screen size ratio of the external display device corresponding to each application. Furthermore, different target applications can be operated in the foreground on the electronic device, and the display output of the electronic device and the corresponding external display device can be synchronously controlled based on the operation information of the corresponding target applications.
[0085] Optionally, in one embodiment, when generating a corresponding canvas according to a determined canvas size ratio within the window interface of the target application, specifically, a canvas whose direction matches the window direction of the window interface is generated according to the determined canvas size ratio, so as to draw the application interface of the target application on the canvas according to the canvas direction.
[0086] Specifically, the canvas orientation must match the window orientation of the window interface. This means that the length and width of the canvas are the same as the length and width of the target application's window interface, respectively.
[0087] For example, in a screen mirroring scenario between a mobile phone and an external TV, the aspect ratios of the two devices are 18:9 and 4:3 respectively, as shown in the following example. Figure 7 As shown, when the screen size ratio of the external TV is 4:3 as the canvas size ratio, i.e. the root view window ratio, the root view window in the mobile phone adopts an orientation that is more compatible with the size of the PhoneWindow window. In other words, the root view window is flipped as needed so that the root view window and the PhoneWindow window in the mobile phone can be aligned side by side, with the long side facing the long side and the short side facing the short side, in order to maximize the display area of the application screen in the mobile phone.
[0088] It is easy to understand that in this application, the canvas generated according to the canvas size ratio determined by the second display parameters does not fill the interface area of the target application window. In other words, the target application window interface includes not only the canvas area but also empty areas outside the canvas area.
[0089] Optionally, in this application, the empty area outside the canvas area within the window interface can be used for information display. The displayed information may include, but is not limited to, the functional controls of the target application and / or part of the screen content of the target application. For example, some functional controls (such as some function buttons) and some screen content (such as tools, equipment, and weapons to be selected in the game) in the game application can be deployed in the empty area within the window interface for display, while the remaining functional controls (such as other function buttons) and some screen content (such as the game scene) can be deployed in the canvas area for display. Furthermore, deploying and displaying functional controls and / or screen content in the empty area of the window interface is equivalent to deploying and displaying these controls and / or screen content in the canvas area, and also supports various required operations on the functional controls and / or screen content.
[0090] Furthermore, preferably, in one embodiment, the target application is any application installed on the electronic device that can run in the foreground of the device, supports adjusting the display ratio of the application screen in full-screen mode, and meets preset application conditions.
[0091] The above application conditions are used to characterize the conditions under which the application can still run normally and display the screen normally after the display ratio of the application screen is adjusted. Optionally, in the embodiments of this application, the application conditions are specifically set as follows: after the canvas size parameter of the application is changed, it can at least be guaranteed that the running state and screen display state of the application are not abnormal.
[0092] In practical applications, applications that can run in the device foreground and support adjusting the display ratio in full-screen mode can be tested in advance. This test determines whether the application's running status and display status are abnormal after changing the application's canvas size parameters, which in turn changes the application's display ratio. For example, it checks for abnormal display effects such as overlapping content. Applications with normal running status and display status are then added to a list of applications that support dynamic configuration of display modes. This list of applications, along with the display ratio configuration function based on multiple candidate display modes, is made available to users, allowing them to configure the display mode of these applications as needed. Applications whose running status / display status is abnormal after changing the canvas size are not added to the application list to avoid users changing the display mode of these applications, which could lead to abnormal running status / display status.
[0093] Additionally, optionally, the second display parameter may also include the position information of the target application's canvas on the target application's window interface. This position information may specifically include, but is not limited to, the position parameters of the canvas on the window interface under any of the following display modes: centered, top-aligned, or bottom-aligned, such as the coordinates of the boundary vertices of the canvas's upper and lower edges. Correspondingly, the aforementioned multiple candidate display modes may include, but are not limited to, full-screen display, ultra-wide field-of-view centered display, ultra-wide field-of-view top-aligned display, and ultra-wide field-of-view bottom-aligned display modes. Full-screen display is the application's default display mode, in which the window size ratio, canvas size ratio, and application screen display ratio are all consistent with the screen size ratio of the electronic device being used. Ultra-wide field of view refers to the field-of-view mode after changing the application screen display ratio by adjusting the canvas size ratio based on the method of this application. See [link to relevant documentation]. Figure 8 This paper provides examples of display effects for different display modes based on existing technology, namely the original field of view (narrow left and right fields of view) and the ultra-wide field of view centered and ultra-wide field of view lowered, based on this application.
[0094] It should be noted that this application's method of changing the application's canvas size ratio so that the canvas does not fill the application's window interface is fundamentally different from the application floating windows supported by the Android platform itself in existing technologies. In existing technologies, when an application is in floating window mode, it does not exclusively occupy the device's desktop. Touching an area outside the floating window will cause the floating window to lose focus. For example, switching the currently used topmost application window among multiple overlapping application windows to the bottom layer will cause it to lose focus, while switching an application window that was originally at the bottom layer to the top layer will give it focus and put it into use. However, the implementation method of this application does not change the application's Activity window (corresponding to the application's window interface) to fully occupy the desktop. The application's window interface is not changed when the application is created. Instead, the size of the application canvas (root view window) is changed, so that the application screen runs and displays on the canvas according to the set ratio.
[0095] When the application is running, all gestures within the screen edge are valid for the application and will not cause the application to lose focus. For example, a screenshot of the application screen can be triggered based on a three-finger swipe gesture, or the game can be controlled by manipulating game function controls added to the empty area of the application window interface.
[0096] It should also be noted that this application differs fundamentally from existing methods of setting the playback ratio during media playback. Media playback changes the display ratio within the application itself, essentially affecting only the topmost display layer within the application by adjusting the stretch ratio of the displayed image, without making any adjustments to the application canvas. This application, however, changes the size of the application canvas (root view window), thus systemically altering the application's drawing and display area, ensuring that all content within the application is drawn and displayed within the designated area.
[0097] Furthermore, the screen mirroring aspect of this application differs fundamentally from existing application screen mirroring on Android. While Android applications in "application mirroring mode" run according to the external display device's screen ratio, they can only run in the background and cannot be directly operated on the phone. Once the application is switched to the foreground, it exits "application mirroring mode" and enters "mirror mirroring mode." Consequently, whether on the phone or the external display device, the application immediately changes to display according to the phone's screen ratio, no longer according to the external device's screen ratio. This application, however, changes the application's display size to adapt to the external display device when connected and simultaneously displayed on both devices. During mirroring, the phone screen and the external device display synchronously, allowing simultaneous control of the application processes on both devices from the phone, and both the phone and the external display device display according to the external display device's screen ratio.
[0098] This application also discloses an electronic device, which may be, but is not limited to, a device in a variety of general or special computing device environments or configurations, such as: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor devices, etc.
[0099] The composition and structure of electronic devices, such as Figure 9 As shown, it includes at least:
[0100] Memory 10 is used to store the computer instruction set;
[0101] Computer instruction sets can be implemented in the form of computer programs.
[0102] Processor 20 is configured to implement the processing method disclosed in any of the above method embodiments by executing a computer instruction set.
[0103] The processor 20 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices.
[0104] Electronic devices have a display device and / or have a display interface and can connect to an external display device.
[0105] Optionally, the electronic device may also include a camera assembly, and / or be connected to an external camera assembly.
[0106] In addition to these components, electronic devices may also include communication interfaces, communication buses, and other parts. Memory, processor, and communication interface communicate with each other through the communication bus.
[0107] Communication interfaces are used for communication between electronic devices and other devices. Communication buses can be Peripheral Component Interconnect (PCI) buses or Extended Industry Standard Architecture (EISA) buses, and can be categorized into address buses, data buses, control buses, etc.
[0108] In addition, this application also discloses a storage medium storing a computer instruction set. When the computer instruction set is called and executed by a processor, it can be used to implement the processing method disclosed in any of the above method embodiments.
[0109] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0110] For ease of description, the above systems or devices are described separately as various modules or units based on their functions. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware components.
[0111] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0112] Finally, it should be noted that in this document, relational terms such as first, second, third, and fourth are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0113] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A processing method, the method comprising: Obtain a startup instruction, wherein the startup instruction is an instruction used to instruct the launch of a target application; The system for acquiring electronic devices provides second display parameters for the target application; The second display parameter is different from the first display parameter configured for the target application; Start and run the target application; The window size ratio is determined based on the first display parameter, and the window interface of the target application is generated based on the window size ratio. The canvas size ratio is determined according to the second display parameter, and a corresponding canvas is generated within the window interface according to the canvas size ratio to draw the application screen of the target application on the canvas; wherein the canvas size ratio determined according to the second display parameter is different from the canvas size ratio of the target application's default configuration; The generated canvas does not fill the interface area of the window.
2. The method according to claim 1, wherein the system for obtaining the second display parameters provided by the electronic device for the target application includes: The system of the electronic device pre-configures the screen display ratio and / or display size for the target application based on the configuration operation of the operator, and uses this as the second display parameter; Alternatively, the system of the electronic device may obtain the screen display ratio and / or screen display size of the external display device as the second display parameter.
3. The method according to claim 2, wherein the second display parameter further includes the position information of the canvas on the window interface.
4. The method according to claim 2, further comprising: Based on the screen display ratio of the external display device, the application screen of the target application is simultaneously displayed on the electronic device and the external display device; When the electronic device and the external display device synchronously display the application screen of the target application, the target application can be operated in the foreground on the electronic device, and the display output of the electronic device and the external display device can be synchronously controlled based on the corresponding operation information.
5. The method according to claim 4, wherein the number of target applications is multiple, and each target application corresponds to an external display device; in, The application screen of each target application is displayed synchronously on the electronic device and the corresponding external display device according to the screen display ratio of the external display device corresponding to each target application. Furthermore, different target applications can be operated in the foreground on the electronic device, and the display output of the electronic device and the corresponding external display device can be controlled synchronously based on the operation information of the corresponding target application.
6. The method according to claim 1, wherein generating a corresponding canvas within the window interface according to the canvas size ratio, for drawing the application screen of the target application on the canvas, comprises: Within the window interface, a canvas with a corresponding canvas orientation that matches the window orientation of the window interface is generated according to the canvas size ratio, so as to draw the application screen of the target application on the canvas according to the canvas orientation.
7. The method according to claim 1, wherein, The empty area outside the canvas area within the window interface can be used for information display.
8. The method according to claim 7, wherein, The functional controls of the target application are laid out in the canvas area and / or the empty area of the canvas.
9. The method according to claim 2, wherein the electronic device system provides multiple candidate display modes for at least one application that meets the application conditions; The target application is one of the at least one applications that meet the application conditions; Different display modes correspond to different second display parameters. The second display parameters corresponding to each display mode include at least the display size ratio of the application screen. The second display parameters pre-configured by the system of the electronic device for the target application are parameters configured by the operator through mode selection among the multiple candidate display modes.
10. An electronic device, the electronic device comprising: A display screen used for displaying information; Memory, used to store at least one set of instructions; A processor for invoking and executing the instruction set in the memory, thereby implementing the processing method as described in any one of claims 1-9.
Citation Information
Patent Citations
Video playing method, video playing equipment and storage medium
CN110446110A
Information processing method, electronic equipment and computer readable storage medium
CN112685122A
Display control method and apparatus, storage medium, and electronic device
WO2021232961A1