[0058] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0059] reference figure 2 As shown, it is a flowchart of Embodiment 1 of an application window display method of the present invention. The application of this embodiment before or after the display mode of the screen changes, this embodiment specifically includes:
[0060] Step 201: Obtain the width and height of the terminal display screen at the current moment.
[0061] Preferably, the width and height of the display screen of the terminal at the current moment can be obtained through a built-in gyroscope of the terminal. Wherein, the terminal display screen is the display area of the terminal screen, the width is the length of the terminal display screen in the horizontal direction, and the height is the length of the terminal display screen in the vertical direction;
[0062] Step 202: According to the width and height of the terminal display screen at the current moment, determine whether the display mode of the terminal display screen at the current moment is a vertical screen.
[0063] Preferably, this step can take the user's perspective to determine whether the display mode of the terminal display screen at the current moment is vertical. The specific process is as follows:
[0064] After obtaining the width and height of the terminal display screen at the current moment, further, the ratio of the width and height can be calculated, that is, the obtained width is divided by the obtained height. If the ratio of the width and height is greater than 1, the terminal displays The horizontal length of the screen is greater than the vertical length of the display screen of the terminal. At this time, the terminal confirms that the display mode of the current display screen is vertical, and then proceeds to step 103 to execute the display of the window of the first application. The ratio of width to height is less than 1, that is, the horizontal length of the display screen is less than the vertical length of the terminal display screen, then the terminal confirms that the display mode of the current display screen is horizontal screen.
[0065] Step 203: Display the window of the first application program in the first preset display area of the terminal display screen.
[0066] In the portrait mode, the window of the first application is displayed in the first preset display area of the screen, where the first preset display area can be the same as in the prior art figure 1 The center area shown is the same. Preferably, the first preset area can also be the top or bottom of the terminal display screen, so that the area outside the first preset display area can be relatively complete. The area outside the display area can be used to display windows corresponding to other applications.
[0067] To facilitate the understanding of this embodiment by those skilled in the art, this step is further described by taking the window of the first application program as the player window as an example. Referring to the description in the background art, compared with the landscape mode, in the portrait mode, the player window and its corresponding video screen will become smaller, that is, the player window will not completely cover the display screen of the terminal at this time. In this step, the player window can be displayed on the top or bottom of the terminal display screen.
[0068] Wherein, the size of the display area of the player window can be determined in the following manner: the video screen corresponding to the player window has a fixed resolution, and the resolution is the minimum pixel resolution that can be clearly displayed on the video screen. , The terminal display screen also has a preset screen resolution, and the resolution of the video screen corresponding to the player window and the resolution of the terminal display screen refer to the resolution in the horizontal screen state. The resolution of the terminal display screen is Different terminals are different. The screen resolution of some terminals is fixed, and the screen resolution of some terminals is optional.
[0069] In the case where the resolution of the video screen corresponding to the player window and the resolution of the terminal display screen are determined, the ratio of the width to the height of the video screen in the vertical screen state can be calculated. For example, suppose the resolution of the video screen corresponding to the player window is 16:9, and the resolution of the terminal display screen is also 16:9. In the vertical screen state, the video screen is still displayed horizontally, and its resolution remains unchanged At this time, the screen resolution of the terminal is equivalent to 9:16. Theoretically, the resolution of the video screen is equivalent to 9:5. As an example for convenience, it can be assumed that the terminal is in portrait mode and displays The width of the screen is 9cm and the height is 16cm. In portrait mode, the display height of the video screen is equivalent to 5cm. Then add the control module of the player on the upper side of the video screen, and add the prompt module of the player on the lower side. The height of the player window can be determined, and the width of the player window is the same as the width of the terminal display screen in the portrait mode.
[0070] Step 204: Display the window of the second application in the second preset display area.
[0071] With reference to the example of step 203, it can be seen that after the player window is displayed, there is still a large part of the display area on the display screen of the terminal where no content is displayed. Therefore, when the window of the first application is displayed in the first preset area After that, the display area outside the first preset display area on the display screen can be used to display the window of the second application program. Wherein, the second preset display area is a display area outside the first preset display area on the display screen. Still taking the window of the first application program as the player window as an example, after the player window is displayed in the first preset display area, the relevant information of the video can be obtained according to the video ID, such as the plot introduction and comments of the video. , The acquired related content of the video can be displayed in the second preset area. In addition, according to specific practical applications, the second preset area may also display windows of other applications that are different from the first application, such as chat tools QQ and Weibo. The present invention does not specifically limit the display content of the second preset area.
[0072] In the technical solution of this embodiment, when the display mode of the terminal display screen is the portrait mode, the height displayed on the terminal screen of the window corresponding to the first application is calculated, and then the first application is corresponding to the calculated display height The window is displayed in the first preset area of the screen, and at the same time, windows corresponding to other applications can be displayed in the display area outside the display range of the window. This is in contrast to the prior art where only one window is displayed on one screen Compared with filling the area outside the window display with black borders, the utilization rate of the screen is improved.
[0073] Further, in this embodiment, the first preset area may be the top or bottom of the terminal display screen, so that the area outside the first preset display area can be made more complete, and the display of windows corresponding to other applications can be improved. Complete, this will give users a better visual experience.
[0074] In practical applications, the display screen of the terminal will rotate, that is, switching between the horizontal screen mode and the vertical screen mode occurs. Therefore, on the basis of embodiment 1, further, refer to image 3 As shown, it is a flowchart of Embodiment 2 of an application window display method provided by the present invention. In this embodiment, the initial display mode of the terminal display screen is vertical screen as an example. When the display screen of the terminal is rotated , The display situation of the terminal display screen will be described. When the initial display mode of the terminal display screen is horizontal, this embodiment is also applicable, and this embodiment may specifically include:
[0075] Step 301: In the portrait mode, the terminal judges whether the terminal display screen is rotated.
[0076] Preferably, in this step, the built-in gyroscope of the terminal can be used to detect in real time whether the terminal display screen has rotated. In practical applications, the horizontal direction can be used as the reference direction. When the terminal display screen deviates from the horizontal direction, the terminal can be considered If the display screen rotates, go to step 302, if not, go to step 303.
[0077] Step 302: Determine whether the terminal display screen is locked.
[0078] The lock screen means that the display mode of the terminal display screen has been fixed to horizontal or vertical screen. The terminal can choose whether to lock the screen before displaying the application window. If the lock screen is selected, go to step 303, if the screen is not locked , Then go to step 304.
[0079] Step 303: Keep the display mode of the terminal display screen unchanged.
[0080] Step 304: Determine whether the rotation angle of the terminal display screen is greater than a preset threshold.
[0081] In practical applications, it is possible that the terminal shakes due to a certain action of the user holding the terminal. At this time, the user does not want to switch the display mode of the display screen, but because the terminal shakes, the display screen has deviated. Horizontal direction. In this case, wrong switching of the display mode of the terminal display screen may occur. Therefore, an angle can be preset, and the preset angle is the preset threshold. When the terminal display screen deviates from the horizontal direction When the angle of is greater than the preset threshold, it is determined that the terminal display screen is about to switch the display mode, and step 305 is entered. If not, the display mode of the terminal display screen is kept unchanged.
[0082] Step 305: Optimize the display of the display screen during the rotation process.
[0083] In the prior art, when switching between the horizontal and vertical display modes of the display screen, obvious display switching effects such as a black screen or refreshing of the display window will occur during the switching process, which will reduce the user's perception. In this step, during the rotation, the window fades out or the window rotates synchronously with the terminal display screen as the switching effect, so as to maintain the continuity of the windows displayed on the terminal display screen during the rotation of the terminal display screen before and after switching.
[0084] Step 306: After the terminal display screen is rotated, the width and height of the terminal display screen are obtained again.
[0085] In practical applications, there is not only a situation where the display screen is directly switched from landscape to portrait mode or from portrait to landscape mode through a single switching operation, but it is also possible that the angle of the display screen is too large at one time. The vertical screen is switched to the vertical screen mode again, that is, the display mode of the corresponding terminal display screen before and after the rotation does not change. Therefore, it is necessary to determine the display mode of the terminal display screen after the terminal display screen is rotated.
[0086] Step 307: According to the width and height of the terminal display screen after the rotation, it is judged whether the display mode of the terminal screen is vertical screen, if yes, go to step 308, if not, go to step 310.
[0087] Step 308: Display the window of the first application program in the first preset display area of the screen.
[0088] Step 309: Display the window of the second application in the second preset display area.
[0089] In this embodiment, the implementation manner of step 307 to step 309 may refer to the implementation manner of step 201 to step 204 in Embodiment 1, which will not be repeated here.
[0090] Step 310: Display the window of the first application program in full screen on the terminal display screen.
[0091] With reference to Embodiment 1, also taking the window of the first application program as the player window as an example, in the step 310, in the landscape mode, the player window covers the terminal display screen, and its corresponding video window size The determination process can refer to the determination process of the size of the video window corresponding to the player window in the portrait mode in step 203 in Embodiment 1, which will not be repeated here.
[0092] The technical solution of this embodiment can not only achieve the beneficial effects brought by the technical solution of embodiment 1, furthermore, in this embodiment, not only the switching of the terminal adaptive horizontal screen and vertical screen mode is realized, but also the screen When the display mode is switched, the window fades out or the window rotates synchronously with the screen to realize the optimization of the switching process, so that when the screen display mode is switched, the visual experience presented to the user is that the window display is coherent instead of the current In some technologies, the screen refresh or black screen will affect the user experience during the switching process, which further improves the user experience.
[0093] Correspondingly, refer to Figure 4 As shown, the present invention also provides a structural diagram of Embodiment 1 of an application window display system, and the system includes:
[0094] The first acquiring unit 401 is configured to acquire the width and height of the terminal display screen at the current moment, where the width is the length of the terminal display screen in the horizontal direction, and the height is the length of the terminal display screen in the vertical direction; the first determining unit 402 , Used for judging whether the display mode of the terminal display screen at the current moment is vertical screen according to the width and height of the terminal display screen at the current moment; the first display unit 403 is used for displaying the result of the first judgment unit If yes, display the window of the first application in the first preset display area of the terminal display screen; the second display unit 404 is configured to display the window of the second application in the second preset display area, so The second preset display area is a display area outside the first preset display area on the terminal display screen.
[0095] Preferably, refer to Figure 5 What is shown is a schematic diagram of a system structure including a schematic diagram of a specific structure of a first determining unit 402, where the first determining unit 402 specifically includes:
[0096] The dividing subunit 501 is configured to divide the acquired width and height of the terminal display screen at the current moment to obtain a division result; the fourth determining unit 502 is configured to determine whether the division result is less than 1;
[0097] The first determining subunit 503 is used for determining that the display mode of the terminal display screen is vertical screen when the division result is less than 1, and the second determining subunit 504 is used for determining when the division result is greater than 1, The display mode of the terminal display screen is horizontal screen. When the window of the first application is a player window, refer to Image 6 What is shown is a schematic diagram of a system structure including a schematic diagram of a specific structure of a first display unit 403, wherein the first display unit 403 specifically includes:
[0098] The first calculation sub-unit 601 is configured to calculate the width and width of the video screen according to the resolution of the video screen corresponding to the player window in the horizontal screen and the screen resolution in the horizontal screen preset by the terminal display screen High ratio
[0099] The second calculation subunit 602 is configured to calculate the display height of the player window on the terminal display screen according to the ratio between the width and height of the terminal display screen and the width and height of the video screen at the current moment;
[0100] The first display unit 403 is specifically configured to display the player window in the first preset area of the screen according to the calculated display height of the player window on the terminal display screen.
[0101] In the technical solution of this embodiment, when the display mode of the terminal display screen is the portrait mode, the height of the window corresponding to the first application displayed on the terminal screen is calculated, and then the window corresponding to the first application is calculated according to the calculated display height It is displayed in the first preset area of the screen, and windows corresponding to other applications can be displayed in the display area outside the display range of the window. This is in contrast to the prior art in which only one window is displayed on one screen. Compared with filling the area outside the window display with black edges, the utilization of the screen is improved.
[0102] Preferably, in this embodiment, the first preset area may be the top or bottom of the display screen of the terminal, so that the area outside the first preset display area can be relatively complete. Displaying windows corresponding to other applications in the outer area will give users a better visual experience.
[0103] reference Figure 7 As shown, the present invention also provides a structural schematic diagram of Embodiment 2 of an application window display system, except Figure 4 In addition to all the units included in the corresponding system embodiment 1, the system also includes:
[0104] The second obtaining unit 701 is used for obtaining the width and height of the rotated display screen when the terminal screen is rotated; the second determining unit 702 is used for judging the display screen according to the obtained width and height of the rotated display screen Whether the mode is vertical screen;
[0105] The first trigger unit 703 is configured to trigger the first display unit when the result of the second judgment unit is yes;
[0106] The third display unit 704 is configured to display the window of the first application program on the terminal screen in full screen when the result of the second judgment unit is no. Preferably, before acquiring the width and height of the terminal display screen after rotation, the system further includes:
[0107] The lock screen determining unit 705 is configured to determine whether the terminal display screen is locked before obtaining the width and height of the terminal display screen after rotation;
[0108] The state maintaining unit 706 is configured to keep the display mode of the terminal display screen unchanged when the terminal display screen is locked;
[0109] The second trigger unit 707, the second trigger unit, is used to trigger the second acquisition unit when the terminal display screen is not locked.
[0110] Preferably, during the rotation of the terminal display screen, the system further includes:
[0111] The third determining unit 708 is configured to determine whether the rotation angle of the terminal display screen is greater than a preset threshold during the rotation of the terminal display screen;
[0112] The optimization unit 709 is configured to optimize the rotation process of the terminal display screen when the rotation angle of the terminal display screen is greater than a preset threshold.
[0113] The technical solution of this embodiment can not only achieve the beneficial effects brought by the technical solution of system embodiment 1, furthermore, in this embodiment, not only the terminal adaptive switching between horizontal and vertical screen modes is realized, but also When the screen display mode is switched, the window fades out or the window rotates synchronously with the screen to achieve the optimization of the switching process, so that when the screen display mode is switched, the visual experience presented to the user is that the window display is coherent, unlike In the prior art, during the switching process, effects such as screen refresh or black screen that affect the user's perception are generated, which further improves the user's perception.
[0114] The embodiment of the present invention may also provide a mobile terminal including the aforementioned system embodiment 1 or system embodiment 2. Since the mobile terminal integrates the aforementioned system embodiment 1 or system embodiment 2 on the processor, it can also be used in the terminal When the display mode of the display screen is portrait mode, calculate the height displayed on the terminal screen of the window corresponding to the first application, and then place the window corresponding to the first application in the first preset area of the screen according to the calculated display height At the same time, it is possible to display windows corresponding to other applications in the display area outside the window display range. This is in contrast to the prior art, where only one window is displayed on one screen, and the area outside the window display is filled with black borders In comparison, the utilization rate of the screen is improved.
[0115] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the relationship between these entities or operations. There is any such actual relationship or sequence. The terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed Elements, or also include elements inherent to such processes, methods, articles, or equipment. Without more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other same elements in the process, method, article, or equipment including the element.
[0116] For the system embodiment, since it basically corresponds to the method embodiment, the relevant part can refer to the part of the description of the method embodiment. The system embodiments described above are merely illustrative, where the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.
[0117] The above are only specific implementations of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications are also It should be regarded as the protection scope of the present invention.