Terminal display method and terminal display device
By generating an adaptive horizontal screen display configuration when the terminal is in horizontal screen mode, the problem that the smart display cannot display horizontally is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202111537625.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-12-15
AI Technical Summary
Existing smart displays cannot adapt to display in landscape mode, resulting in a poor user experience, especially on large-screen terminals such as car-mounted tablets, which cannot display in landscape mode or require stretching and deformation to display content.
When the terminal is in landscape mode, the landscape display configuration is determined based on the portrait display mode of the application, including single-screen or split-screen display configuration, to generate an adaptive landscape display operation.
It effectively avoids application stretching and deformation, improves user experience, and meets users' horizontal screen display needs.
Smart Images

Figure CN116263686B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of screen display technology, and in particular to a display method of a terminal and a display device of a terminal. Background Art
[0002] With the continuous development of intelligent devices, more and more intelligent devices, such as intelligent displays, are being used in cars. Existing in-car intelligent displays are primarily based on the Android system. These displays can display the content of smart apps. For example, during the application process, a smart app can first request a landscape or portrait display window and then display the specific application content.
[0003] However, in actual application, since the main application scenario of current smart applications is mobile phones, most smart applications only support vertical screen applications, and do not support horizontal screen adaptive applications. Therefore, they cannot support terminals, such as display applications on large-screen displays of car tablets. As a result, when running the above-mentioned smart applications on the terminal, horizontal screen browsing cannot be performed, and the terminal can only be placed vertically for vertical screen browsing. For terminals that can only be placed horizontally, they can only be displayed horizontally, which causes great trouble to users.
[0004] Furthermore, the existing technology can also achieve a horizontal screen display effect by stretching and deforming the content displayed on the vertical screen. However, the above method will cause abnormal deformation and unfriendly display of the displayed content, greatly reducing the user experience. Summary of the Invention
[0005] In order to overcome the above-mentioned technical problems existing in the prior art, an embodiment of the present application provides a terminal display method, which effectively avoids technical problems such as application stretching and deformation or less displayed content by pre-judging the applicability of applications applied to the terminal and performing corresponding display operations on inapplicable applications, thereby improving the user experience.
[0006] In order to achieve the above-mentioned purpose, an embodiment of the present application provides a display method for a terminal, which includes: when the terminal is in a horizontal screen state, determining the horizontal screen display configuration of the application based on the vertical screen display mode of the application; performing a display operation on the application based on the horizontal screen display configuration, wherein the application does not support horizontal screen display.
[0007] Preferably, the determining of the horizontal screen display configuration of the application based on the vertical screen display mode of the application includes: obtaining the vertical screen window configuration information of the application; judging whether the application supports multi-window display based on the vertical screen window configuration information; if the application does not support multi-window display, determining the first horizontal screen configuration of the application, the first horizontal screen configuration being the single-screen display configuration of the application; if the application supports multi-window display, determining the second horizontal screen configuration of the application, the second horizontal screen configuration being the split-screen display configuration of the application; and using the first horizontal screen configuration or the second horizontal screen configuration as the horizontal screen display configuration.
[0008] Preferably, determining the first horizontal screen configuration of the application includes: obtaining at least one commonly used window of the application; determining the main window configuration corresponding to the vertical screen window configuration information, and determining the sub-window configuration corresponding to the at least one commonly used window; determining the first horizontal screen configuration of the application based on the main window configuration and the sub-window configuration.
[0009] Preferably, determining the second horizontal screen configuration of the application includes: determining the number of windows to be displayed of the application; when the number of windows is one, determining the configuration of displaying the application in the center as the second horizontal screen configuration of the application; when the number of windows is at least two, obtaining window parameter information, and determining the second horizontal screen configuration of the application based on the window parameter information.
[0010] Preferably, the display method further includes: after determining the configuration for displaying the application in the center, in response to the user's boundary editing operation, modifying the configuration for displaying the application in the center to obtain a modified boundary configuration; and using the modified boundary configuration as the second horizontal screen configuration of the application.
[0011] Preferably, the window parameter information includes window size and window position, and determining the second horizontal screen configuration of the application based on the window parameter information includes: obtaining the screen size of the terminal; determining multiple display areas of the terminal based on the window size and the screen size; determining the display configuration of each window to be displayed based on the window position and the multiple display areas; and determining the second horizontal screen configuration of the application based on the display configuration of each window to be displayed.
[0012] Preferably, the display method further comprises: in response to an adjustment operation on the window position, adjusting the window position to obtain an adjusted position; and determining a display configuration of each window to be displayed based on the adjusted position and the multiple display areas.
[0013] Preferably, the display method also includes: after executing the display operation, determining the current focus window; in response to a touch event for the terminal, determining the touch area corresponding to the touch event; judging whether the touch area is within the current focus window; if the touch area is not within the current focus window, using the window where the touch area is located as the new current focus window; and executing the operation instruction corresponding to the touch event.
[0014] Preferably, determining the current focus window includes: traversing the windows to be displayed, determining at least one first window in the windows to be displayed that is in a first display state, and the remaining windows in the windows to be displayed except the at least one first window are in a second display state; determining a default focus window in the first windows; and using the default focus window as the current focus window.
[0015] Preferably, the at least one first window includes a parent display window and at least one child display window, and the execution of the touch event includes: determining the event type of the touch event; when the event type is a window jump event, clearing the child display window and displaying a new child display window corresponding to the touch event; when the event type is a non-window jump event, refreshing the display of the current focus window.
[0016] Preferably, the display method further comprises: after executing the display operation, in response to a vertical screen operation of the terminal; displaying the parent display window vertically; and setting the at least one child display window to the second display state.
[0017] Preferably, the display method further includes: in response to a horizontal screen operation of the terminal after the vertical screen operation, setting each sub-display window to the first display state; and performing the display operation on the at least one first window based on the second horizontal screen configuration.
[0018] Correspondingly, an embodiment of the present application also provides a display device of a terminal, wherein the display device includes: a horizontal screen configuration determination unit, for determining the horizontal screen display configuration of the application based on the vertical screen display mode of the application when the terminal is in a horizontal screen state; a display unit, for performing a display operation on the application based on the horizontal screen display configuration, wherein the application does not support horizontal screen display.
[0019] On the other hand, an embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the display method provided in the embodiment of the present application.
[0020] On the other hand, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the method provided in the embodiment of the present application when the program is executed by a processor.
[0021] The technical solution provided by this application has at least the following technical effects:
[0022] By first making an adaptive judgment in the process of displaying the application applied to the terminal, when it is determined that the current application does not support horizontal screen display, the corresponding horizontal screen display configuration is immediately generated according to the vertical screen display mode of the application, and the corresponding display operation is performed, thereby effectively meeting the user's actual horizontal screen display needs, avoiding the abnormal display of stretching and deformation caused by traditional forced horizontal screen display, and improving the user experience.
[0023] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present application but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0025] Figure 1 This is a flowchart of a specific implementation of the display method of the terminal provided in an embodiment of the present application;
[0026] Figure 2 This is a specific implementation flowchart of determining the horizontal screen display configuration in the display method of the terminal provided in an embodiment of the present application;
[0027] Figure 3 This is a schematic diagram of determining a first horizontal screen configuration in a display method for a terminal provided in an embodiment of the present application;
[0028] Figure 4 is a schematic diagram of determining a first horizontal screen configuration in a display method for a terminal provided in another embodiment of the present application;
[0029] Figure 5 This is a schematic diagram of displaying only one window to be displayed in the display method of the terminal provided in an embodiment of the present application;
[0030] Figure 6 This is a schematic diagram of displaying two windows to be displayed in the display method of the terminal provided in an embodiment of the present application;
[0031] Figure 7 This is a schematic diagram of adjusting the positions of two windows to be displayed in the display method of the terminal provided in an embodiment of the present application;
[0032] Figure 8 Schematic diagram of switching to a vertical screen display mode in the display method of a terminal provided in an embodiment of the present application;
[0033] Figure 9 is a schematic structural diagram of a display device of a terminal provided in an embodiment of the present application;
[0034] Figure 10 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following describes the specific implementation of the embodiment of the present application in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present application and is not intended to limit the embodiment of the present application.
[0036] The terms "system" and "network" in the embodiments of the present application can be used interchangeably. "Multiple" refers to two or more. In view of this, "multiple" can also be understood as "at least two" in the embodiments of the present application. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the previous and next associated objects are in an "or" relationship. In addition, it should be understood that in the description of the embodiments of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0037] See Figure 1 , an embodiment of the present application provides a display method for a terminal, the display method comprising:
[0038] S10) when the terminal is in a landscape state, determining a landscape display configuration of the application based on a portrait display mode of the application;
[0039] S20) performing a display operation on the application based on the landscape display configuration, wherein the application does not support landscape display.
[0040] In a possible implementation, the display method provided in the embodiment of the present application is applied to a vehicle-mounted terminal, and of course it can also be applied to other display terminals, which will not be described in detail here. For example, in the embodiment of the present application, the vehicle-mounted terminal is in a horizontal screen state by default, and the horizontal screen state is the state in which the width of the display screen of the vehicle-mounted terminal is greater than the height of the screen when the vehicle-mounted terminal is in use. For example, the vehicle-mounted terminal can be a touch screen or a shared screen of other mobile terminals. In a certain application scenario, a user starts an application or displays an application on the vehicle-mounted terminal. In order to achieve a better display of the horizontal screen vehicle-mounted terminal and provide a better user experience for the user, before displaying, the display configuration information of the application is first obtained. For example, the vehicle-mounted terminal provided in the embodiment of the present application can be based on the Android operating system. Of course, it can also be based on other application systems (such as MacOS, Linux, etc.). When the application is started, the Orientation attribute configured through the manifest file or applied through the code can be obtained to obtain the display configuration information of the application, and the display configuration information is determined based on the above display configuration information whether the currently displayed application supports horizontal screen display.
[0041] For example, in an embodiment of the present application, the application does not support horizontal screen display, that is, it does not support the effect of adaptive adjustment of the size of the displayed content in the application according to the screen placement state. At this time, the horizontal screen display configuration of the application can be further determined according to the vertical screen display mode of the application, and the corresponding display operation can be performed on the application according to the above-mentioned horizontal screen display configuration.
[0042] In an embodiment of the present application, by adaptively predicting the display of the application in the terminal, the display of applications that cannot be displayed in horizontal screen is optimized. Specifically, a corresponding horizontal screen display configuration is generated for it according to its vertical screen display mode, and the corresponding display operation is performed, thereby achieving a friendly horizontal screen display without causing stretching and deformation of the display content of the application, thereby effectively improving the user experience.
[0043] See Figure 2 In an embodiment of the present application, determining the horizontal screen display configuration of the application based on the vertical screen display mode of the application includes:
[0044] S31) obtaining vertical screen window configuration information of the application;
[0045] S32) determining whether the application supports multi-window display based on the vertical screen window configuration information;
[0046] S33) if the application does not support multi-window display, determining a first horizontal screen configuration of the application, where the first horizontal screen configuration is a single-screen display configuration of the application;
[0047] S34) if the application supports multi-window display, determining a second horizontal screen configuration of the application, where the second horizontal screen configuration is a split-screen display configuration of the application;
[0048] S35) Using the first horizontal screen configuration or the second horizontal screen configuration as the horizontal screen display configuration.
[0049] In one possible implementation, after determining that the application does not support landscape display, the landscape display configuration of the application is determined. For example, in an embodiment of the present application, the application can be displayed in split-screen mode, for example, the application can be displayed in a left and right screen, respectively, to achieve a landscape display effect of the application in portrait display mode. However, in actual application, not all applications support split-screen display. For example, in one embodiment, an application specially developed by a technician for an application scenario of a terminal supports split-screen display effect and can be displayed in split-screen mode in actual application. However, for a general-purpose software, it does not support split-screen display, so the general-purpose application needs to be further optimized for display.
[0050] Therefore, in the embodiment of the present application, during the actual display process of the application, the vertical screen window configuration information of the application is first obtained. For example, the vertical screen window configuration information of the application can be obtained by parsing the resource file of the application. For example, the vertical screen window configuration information is the configuration information for displaying the application in vertical mode (i.e., the width of its display window is less than the height). Then, based on the vertical screen window configuration information, it is determined whether the application supports multi-window display. In the first embodiment, the application does not support multi-window display, so it is necessary to determine the corresponding first horizontal screen configuration for the single-screen display mode of the application.
[0051] In an embodiment of the present application, determining the first horizontal screen configuration of the application includes: obtaining at least one commonly used window of the application; determining the main window configuration corresponding to the vertical screen window configuration information, and determining the sub-window configuration corresponding to the at least one commonly used window; determining the first horizontal screen configuration of the application based on the main window configuration and the sub-window configuration.
[0052] See Figure 3In one possible implementation, in the process of determining the first horizontal screen configuration of the application, at least one commonly used window of the application is further obtained. For example, the commonly used window is determined by the user according to the application window commonly used by the user during daily use. After determining the commonly used window, the main window configuration corresponding to the vertical screen window configuration information of the application is further determined. For example, in an embodiment of the present application, the main window corresponding to the application is configured to be displayed in the center. Of course, it can also be displayed to the side (left or right). The above-mentioned main window configuration can also include setting information for the size of the main window of the application, such as increasing / decreasing the display width / display height of the application, or the main window can be set to fit the upper and lower boundaries of the screen, or can be set at a preset interval with the upper and lower boundaries, etc.; and determining the secondary window configuration corresponding to at least one commonly used window. At this time, the first horizontal screen configuration of the application is determined according to the above-mentioned main window configuration and secondary window configuration, and the corresponding display is performed. Among them, the secondary window can be configured to be displayed in the upper left corner of the screen, or in the upper right corner of the screen, which is not limited here.
[0053] In an embodiment of the present application, a targeted horizontal screen optimization display method is provided for the application based on the actual display configuration of the application, thereby allowing the application to provide users with better horizontal screen display effects during the display process, thereby improving the user experience.
[0054] See Figure 4 In another possible implementation, the application currently opened by the user is a karaoke application, and the user has two frequently used windows in the karaoke application. Therefore, on the one hand, a main window configuration corresponding to the karaoke application is generated, for example, the main window configuration is configured to center the karaoke application and maximize the display. On the other hand, a corresponding sub-window configuration can be generated based on the commonly used windows in the user's daily listening process. For example, the above two frequently used windows are the user's favorite song list and BYD karaoke window. For example, the sub-window configuration is configured to display the above-mentioned favorite song list and BYD karaoke window on the left and right sides respectively.
[0055] Of course, those skilled in the art will easily know from the above embodiments that the main window can be displayed on the left and the two sub-windows can be displayed on the right (for example, displayed in the upper right and lower right positions respectively); further, the number of sub-windows provided in the above embodiments is only a specific embodiment and should not be regarded as a limitation on the number of sub-windows. Technicians can configure multiple (greater than 2) sub-windows according to actual needs, which should all fall within the scope of protection of the embodiments of the present application and will not be elaborated on here.
[0056] Furthermore, in order to further improve the user experience and enhance the aesthetics of interaction, those skilled in the art may lay an application theme background at the bottom of the terminal display screen, and overlay the main window and sub-window on the application theme background to achieve a better user experience.
[0057] In an embodiment of the present application, on the basis of the existing simple application display or gradual display based on click operation, the user's commonly used windows are further provided with independent display and quick display for the user, thereby achieving a more optimized display effect adapted to the horizontal screen mode on the basis of the vertical screen display of the application, providing the user with a better terminal application experience effect.
[0058] Based on the above technical solution, an optimized horizontal screen display effect is achieved for applications that cannot be displayed in horizontal screen and do not support multi-window display. The following further describes how to achieve an optimized horizontal screen display effect for applications that cannot be displayed in horizontal screen but support multi-window display.
[0059] In an embodiment of the present application, determining the second horizontal screen configuration of the application includes: determining the number of windows to be displayed of the application; when the number of windows is one, determining a configuration in which the application is displayed in the center as the second horizontal screen configuration of the application; when the number of windows is at least two, obtaining window parameter information, and determining the second horizontal screen configuration of the application based on the window parameter information.
[0060] In one possible implementation, after determining that the current application supports multi-window display, prepare to optimize the display of the application for landscape mode. First, determine the number of windows to be displayed for the application. The windows to be displayed are task windows in the same task stack. For example, in the application display process based on the Android system, the windows to be displayed for the application can be multiple windows in the same ActivityStack stack. For example, in one embodiment, see Figure 5 , the application has just been started, and at this time the application only needs to display its main interface, that is, the number of windows to be displayed for the application is one, so the application can be displayed in the center to improve the display aesthetics. At this time, the configuration of displaying the application in the center can be used as the second horizontal screen configuration of the application.
[0061] Furthermore, in an embodiment of the present application, the display method also includes: after determining the configuration for displaying the application in the center, in response to the user's boundary editing operation, modifying the configuration for displaying the application in the center to obtain a modified boundary configuration; and using the modified boundary configuration as the second horizontal screen configuration of the application.
[0062] For example, after determining that the application is centered and obtaining the corresponding display configuration, the system can monitor in real time whether the user has further boundary editing operations. If the user enters a boundary editing operation, a response is immediately triggered. For example, the user can define the display boundary of the application according to actual needs. At this time, the display width of the application can be increased / decreased according to the user's boundary editing operation, thereby modifying the centered display configuration to obtain the modified boundary configuration, and using the modified boundary configuration as the second horizontal screen configuration of the application. If the user does not enter a boundary editing operation, the automatically generated display configuration is used as the second horizontal screen configuration of the application for horizontal display by default.
[0063] See Figure 6 In another embodiment, the number of windows to be displayed of the application is at least two (for example, 2). Then, during the display process, the window parameter information is first obtained, and the second horizontal screen configuration of the application is determined based on the window parameter information. For example, the window parameter information includes the window size and the window position. The second horizontal screen configuration of the application based on the window parameter information is determined, including: obtaining the screen size of the terminal; determining multiple display areas of the terminal based on the window size and the screen size; determining the display configuration of each window to be displayed based on the window position and the multiple display areas; and determining the second horizontal screen configuration of the application based on the display configuration of each window to be displayed.
[0064] When displaying an application in multiple windows, the system uses WindowState to describe the active window. This class allows calculation of specific window boundaries and positions. For example, DisplayFrames defines all the boundaries of the current window. Therefore, the window's display boundaries and position are determined by modifying the corresponding DisplayFrames's mFrame, mDisplayFrame, mVisibleFrame, and mDecorFrame attributes. For example, if the current terminal's display resolution is 1920*1080, the default horizontal display width for a single window can be set to 960, and the display position to [480, 1440]. For dual-window display, the default horizontal display width is set to 955, the left window's display position to [0, 955], and the right window's display position to [965, 1920]. This determines the display configuration for each window to be displayed, and further determines the application's secondary horizontal configuration.
[0065] In an embodiment of the present application, the display method further includes: adjusting the window position in response to an adjustment operation on the window position to obtain an adjusted position; and determining a display configuration of each window to be displayed based on the adjusted position and the multiple display areas.
[0066] See Figure 7 In one possible embodiment, the windows to be displayed include two windows. After the application is displayed in landscape mode according to the second landscape configuration of the application, for example, the default main window of the two windows is displayed on the left side of the screen, and the default sub-window is displayed on the right side of the screen. At this time, whether an adjustment operation for the window position of the above-mentioned windows is obtained is monitored in real time. For example, at a certain moment, it is monitored that the user adjusts the window position of the above-mentioned two windows by sliding one of the windows, that is, the adjustment operation for the window position is obtained, and therefore an immediate response is performed, for example, the window position of the above-mentioned window is adjusted according to the above-mentioned adjustment operation, and the adjusted position is obtained. Then, based on the above-mentioned adjusted position and the above-mentioned multiple display areas, the display configuration of each window to be displayed is further determined, and then the application is displayed.
[0067] In the embodiment of the present application, by responding to the user's window adjustment operation in real time during the multi-window display of the application, the user's actual screen observation needs can be further met and the user experience can be improved.
[0068] In an embodiment of the present application, the display method also includes: after executing the display operation, determining the current focus window; in response to a touch event for the terminal, determining the touch area corresponding to the touch event; judging whether the touch area is within the current focus window; if the touch area is not within the current focus window, using the window where the touch area is located as the new current focus window; and executing the operation instruction corresponding to the touch event.
[0069] Furthermore, in an embodiment of the present application, determining the current focus window includes: traversing the windows to be displayed, determining at least one first window in the windows to be displayed that is in a first display state, and the remaining windows in the windows to be displayed except the at least one first window are in a second display state; determining a default focus window in the first windows; and setting the default focus window as the current focus window.
[0070] Since the system can only record one focus window and perform corresponding operation responses at the same time, after determining the display configuration of each window of the application and executing the corresponding horizontal screen display, it is necessary to further obtain the focus window in real time to achieve accurate response to touch events of multiple windows. In one possible implementation, after executing the display operation, the current focus window is determined. For example, in an embodiment of the present application, the above-mentioned windows to be displayed can be traversed. The above-mentioned windows to be displayed are all located in the same ActivityStack, and the first window in the display state is determined in the above-mentioned windows to be displayed. For example, the first window includes a main window displayed on the left side of the screen and a sub-window displayed on the right side of the screen. The remaining windows in the window to be displayed are all in a paused display or cleared state. Then the default focus window is determined in the above-mentioned first window. For example, the above-mentioned main window can be set as the default focus window in advance. After the application is started, the main window displayed after the application is started is the default focus window.
[0071] After determining the default focus window, the default focus window is used as the current focus window. At this time, whether there is a touch event for the terminal is monitored in real time. For example, at a certain moment, the user touches the display screen of the terminal, so the terminal responds to the touch event. First, the touch area corresponding to the touch event is determined. For example, the touch area corresponding to the touch event can be determined based on the horizontal and vertical coordinates on the terminal where the touch event is located. Then, it is further determined whether the touch area is in the current focus window. If the touch area is not in the current focus window, the window where the touch area is located is used as the new current focus window to realize the switching of the focus window, and then the operation instruction corresponding to the touch event is executed, thereby realizing accurate response to the touch event.
[0072] In an embodiment of the present application, by updating or switching the current focus window of the split-screen displayed application in real time after executing the display operation, it is possible to accurately execute touch events and improve the user experience.
[0073] In an embodiment of the present application, the at least one first window includes a parent display window and at least one child display window, and the execution of the touch event includes: determining the event type of the touch event; when the event type is a window jump event, clearing the child display window and displaying a new child display window corresponding to the touch event; when the event type is a non-window jump event, refreshing the display of the current focus window.
[0074] In one possible implementation, after acquiring the above-mentioned touch event, the event type of the touch event is first determined. For example, in the embodiment of the present application, the touch type includes a window jump event and a non-window jump event. A window jump event is an event that jumps from the current window to another window. For example, if the user's touch operation is clicking a jump link, then the touch event can be determined to be a window jump event. Non-window jump events may include but are not limited to text viewing, image magnification (clicking on an image to magnify the display), and other events. In another embodiment, if the user's touch event is clicking a jump link, then the sub-display window is cleared (regardless of whether the window jump event occurs in the parent display window or the child display window, if it occurs in the parent display window, it is determined that other child windows will be viewed, so the child display window on the right is cleared; if it occurs in the child display window, the current child display window also needs to be cleared to display the new child display window), and then the touch event is executed and the corresponding new child display window is displayed, for example, the window to be jumped to is refreshed and displayed at the position of the current child display window.
[0075] In an embodiment of the present application, by executing the corresponding window update display according to the event type of the user's touch event, the same window is avoided from being added to the right sub-window multiple times, effectively avoiding the occurrence of abnormal display and abnormal response, improving the application's usage stability, and improving the user experience.
[0076] In an embodiment of the present application, the display method further includes: after performing the display operation, in response to a vertical screen operation of the terminal; displaying the parent display window vertically; and setting the at least one child display window to the second display state.
[0077] Furthermore, in an embodiment of the present application, the display method also includes: in response to a horizontal screen operation of the terminal after the vertical screen operation, setting each sub-display window to the first display state; and performing the display operation on the at least one first window based on the second horizontal screen configuration.
[0078] It is easy for those skilled in the art to know that most vehicle-mounted terminals are fixed on the car. However, there are also detachable vehicle-mounted terminals on the car. For such terminals, when the user picks up the terminal and places it vertically, if the horizontal screen display is still used, the user experience will still be reduced. Therefore, it is necessary to automatically and dynamically switch the display according to the actual placement status of the terminal.
[0079] See Figure 8In one possible implementation, after executing a display operation, the terminal is monitored in real time to see if it is being placed vertically. For example, if the terminal is detected to be placed vertically at a certain moment, a vertical operation is detected for the terminal, and a response is immediately performed. Specifically, if multiple windows of an application are currently displayed in split-screen mode, the parent display window of the application is displayed vertically, and at least one of the child display windows is set to the second display state. For example, the parent display window is displayed vertically, and the remaining child display windows are superimposed below the parent display window for paused display.
[0080] Furthermore, after responding to the above-mentioned vertical screen operation, it is further monitored whether a horizontal screen operation after the vertical screen operation is obtained. For example, at another moment, it is monitored that the user returns the terminal to the horizontal screen state, that is, the horizontal screen operation after the vertical screen operation is obtained. At this time, each of the above-mentioned sub-display windows is set to the first display state, for example, each of the above-mentioned sub-display windows is reset to the displaying state, and then the display operation is performed on the at least one first window according to the above-mentioned second horizontal screen configuration, so as to realize the display of applications that do not support horizontal screen display or adaptive vertical screen switching display during the horizontal and vertical screen switching process of the terminal, thereby effectively improving the user experience and meeting the actual needs of the user.
[0081] The display device of the terminal provided in the embodiments of the present application is described below with reference to the accompanying drawings.
[0082] See Figure 9 Based on the same inventive concept, an embodiment of the present application provides a display device of a terminal, the display device comprising: a horizontal screen configuration determination unit, for determining the horizontal screen display configuration of the application based on the vertical screen display mode of the application when the terminal is in a horizontal screen state; a display unit, for performing a display operation on the application based on the horizontal screen display configuration, wherein the application does not support horizontal screen display.
[0083] See Figure 10 Furthermore, an embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the display method provided by the embodiment of the present application.
[0084] Furthermore, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in the embodiment of the present application is implemented.
[0085] The above describes in detail the optional implementation methods of the embodiments of the present application in conjunction with the accompanying drawings. However, the embodiments of the present application are not limited to the specific details of the above implementation methods. Within the technical concept of the embodiments of the present application, various simple modifications can be made to the technical solutions of the embodiments of the present application, and these simple modifications all fall within the scope of protection of the embodiments of the present application.
[0086] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of this application will not further describe various possible combinations.
[0087] Those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a single-chip microcomputer, chip or processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0088] In addition, the various implementation methods of the embodiments of the present application can be arbitrarily combined, as long as they do not violate the ideas of the embodiments of the present application, they should also be regarded as the contents disclosed in the embodiments of the present application.
Claims
1. A terminal display method, characterized in that: The display method includes: When the terminal is in a landscape state, determining a landscape display configuration of the application based on a portrait display mode of the application, including: obtaining portrait window configuration information of the application, wherein the portrait window configuration information is obtained by parsing a resource file of the application; judging whether the application supports multi-window display based on the portrait window configuration information; when the application does not support multi-window display, determining a first landscape configuration of the application, wherein the first landscape configuration is a single-screen display configuration of the application; when the application supports multi-window display, determining a second landscape configuration of the application, wherein the second landscape configuration is a split-screen display configuration of the application; and using the first landscape configuration or the second landscape configuration as the landscape display configuration; performing a display operation on the application based on the landscape display configuration, wherein the application does not support landscape display; Traversing the windows to be displayed, determining at least one first window in the windows to be displayed that is in a first display state, and the remaining windows in the windows to be displayed except the at least one first window are in a second display state; the at least one first window includes a parent display window and at least one child display window; The display method further comprises: after performing the display operation, in response to a vertical screen operation of the terminal; displaying the parent display window vertically; and setting at least one child display window to a second display state; The display method further includes: in response to a horizontal screen operation of the terminal after the vertical screen operation, setting each sub-display window to a first display state; and performing the display operation on the at least one first window based on a second horizontal screen configuration.
2. The display method according to claim 1, wherein: Determining the first horizontal screen configuration of the application includes: Obtaining at least one frequently used window of the application; Determining a main window configuration corresponding to the vertical screen window configuration information, and determining a sub-window configuration corresponding to the at least one frequently used window; A first horizontal screen configuration of the application is determined based on the main window configuration and the secondary window configuration.
3. The display method according to claim 1, wherein: Determining the second horizontal screen configuration of the application includes: Determining the number of windows to be displayed of the application; When the number of the windows is one, determining a configuration in which the application is displayed in the center as a second horizontal screen configuration of the application; When the number of the windows is at least two, window parameter information is obtained, and a second horizontal screen configuration of the application is determined based on the window parameter information.
4. The display method according to claim 3, wherein: The display method further includes: After determining the configuration for displaying the application in the center, in response to a boundary editing operation of the user, modifying the configuration for displaying the application in the center to obtain a modified boundary configuration; The modified boundary configuration is used as the second horizontal screen configuration of the application.
5. The display method according to claim 3, wherein: The window parameter information includes a window size and a window position, and determining the second horizontal screen configuration of the application based on the window parameter information includes: Obtaining the screen size of the terminal; determining a plurality of display areas of the terminal based on the window size and the screen size; determining a display configuration of each window to be displayed based on the window position and the plurality of display areas; A second horizontal screen configuration of the application is determined based on the display configuration of each window to be displayed.
6. The display method according to claim 5, characterized in that: The display method further includes: In response to an adjustment operation on the window position, adjusting the window position to obtain an adjusted position; A display configuration of each to-be-displayed window is determined based on the adjusted position and the plurality of display areas.
7. The display method according to claim 3, wherein: The display method further includes: After performing the display operation, determining the current focus window; In response to a touch event on the terminal, determining a touch area corresponding to the touch event; Determining whether the touch area is within the current focus window; When the touch area is not within the current focus window, the window where the touch area is located is used as a new current focus window; Execute the operation instruction corresponding to the touch event.
8. The display method according to claim 7, wherein: Determining the current focus window includes: determining a default focus window in the first window; The default focus window is used as the current focus window.
9. The display method according to claim 8, characterized in that: The executing the touch event includes: Determining an event type of the touch event; In a case where the event type is a window jump event, clearing the sub-display window and displaying a new sub-display window corresponding to the touch event; When the event type is a non-window jump event, the current focus window is refreshed and displayed.
10. A display device for a terminal, characterized in that: The display device includes: a horizontal screen configuration determining unit, configured to determine, when the terminal is in a horizontal screen state, a horizontal screen display configuration of the application based on the vertical screen display mode of the application, comprising: obtaining vertical screen window configuration information of the application, the vertical screen window configuration information being obtained by parsing a resource file of the application; judging, based on the vertical screen window configuration information, whether the application supports multi-window display; determining, when the application does not support multi-window display, a first horizontal screen configuration of the application, the first horizontal screen configuration being a single-screen display configuration of the application; determining, when the application supports multi-window display, a second horizontal screen configuration of the application, the second horizontal screen configuration being a split-screen display configuration of the application; and using the first horizontal screen configuration or the second horizontal screen configuration as the horizontal screen display configuration; a display unit, configured to perform a display operation on the application based on the landscape display configuration, wherein the application does not support landscape display, and traverse windows to be displayed, determining at least one first window in a first display state among the windows to be displayed, and determining that the remaining windows among the windows to be displayed except the at least one first window are in a second display state; the at least one first window includes a parent display window and at least one child display window; The display device further comprises: after performing the display operation, in response to a vertical screen operation of the terminal; displaying the parent display window vertically; and setting at least one child display window to a second display state; The display device further includes: in response to a horizontal screen operation of the terminal after the vertical screen operation, setting each sub-display window to a first display state; and performing the display operation on the at least one first window based on a second horizontal screen configuration.
11. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the display method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the display method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Display device and display method for application program interface
CN111625163A
Screen display method and electronic equipment
CN112882823A