WO2024082989A1 - Full-screen display method, electronic device and computer-readable storage medium - Google Patents

Full-screen display method, electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2024082989A1
WO2024082989A1 PCT/CN2023/123605 CN2023123605W WO2024082989A1 WO 2024082989 A1 WO2024082989 A1 WO 2024082989A1 CN 2023123605 W CN2023123605 W CN 2023123605W WO 2024082989 A1 WO2024082989 A1 WO 2024082989A1
Authority
WO
WIPO (PCT)
Prior art keywords
screen
full
display
electronic device
application
Prior art date
Application number
PCT/CN2023/123605
Other languages
French (fr)
Chinese (zh)
Inventor
朱培
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024082989A1 publication Critical patent/WO2024082989A1/en

Links

Definitions

  • the present invention relates to the field of computer technology, and in particular to a full-screen display method, electronic equipment and a computer-readable storage medium.
  • a user may click the full-screen display control on the video playback interface, and then rotate the mobile phone or other electronic device to the horizontal screen orientation to obtain an immersive full-screen experience.
  • This is because, usually, the default orientation of full-screen display of mobile phones and other electronic devices is the horizontal screen orientation.
  • the aspect ratio of the screen may be close to 1:1, and the full-screen display of the electronic device in the portrait orientation and the full-screen display in the landscape orientation do not provide users with a significant difference in full-screen experience. Therefore, if such electronic devices still default to full-screen display in the landscape orientation, that is, the user is still required to rotate the electronic device to the landscape orientation after clicking the full-screen display control, it will bring a bad user experience.
  • embodiments of the present application provide a full-screen display method, an electronic device, and a computer-readable storage medium to improve the user experience of full-screen display of an electronic device.
  • an embodiment of the present application provides a full-screen display method, which is applied to an electronic device, and the method includes:
  • a first full-screen window of the first application is displayed in full screen in the current placement direction, a horizontal screen display resource of the first application is loaded in the first full-screen window, and a window aspect ratio of the first full-screen window is adapted to a screen aspect ratio corresponding to the vertical screen direction.
  • the electronic device when the user instructs to display the display window of the first application in full screen, if the electronic device can determine that the current vertical placement and the screen aspect ratio corresponding to the current placement direction meet the preset first condition, the electronic device can be kept in vertical placement and display the full screen display window of the first application, that is, the above-mentioned first full screen window.
  • the full screen display window corresponds to the horizontal screen display resources of the first application, and the corresponding display content is arranged in the vertical screen direction corresponding to the current placement direction for full screen display.
  • full screen display can be achieved in the current vertical screen direction without rotating the placement direction of the electronic device, which meets the user's need to watch the full screen content without the user rotating the electronic device, simplifies the user's operation, and is conducive to improving the user's experience.
  • the full screen display method provided in the above first aspect can be adapted to any application configured with horizontal screen display resources, that is, it has strong scene adaptability.
  • the first application may be, for example, a video application, an office application, a reading application, or other application that requires a full-screen display of a playback window to achieve an immersive visual experience.
  • the display resources configured for the first application may include a horizontal display resource for displaying content in a layout that adapts to the screen aspect ratio corresponding to the horizontal orientation, and may also include a vertical display resource for displaying content in a layout that adapts to the screen aspect ratio corresponding to the vertical orientation.
  • the first user operation may be, for example, an operation in which a user clicks on a full-screen display control in a video playback interface or video playback window of a video application, and is not limited here.
  • the window aspect ratio of the first full-screen window is adapted to the screen aspect ratio corresponding to the portrait orientation, which means that the ratio of the window width (horizontal side) to the window height (vertical side) of the first full-screen window is equal to the ratio of the screen width (horizontal side) to the screen height (vertical side) when the screen display orientation of the electronic device is portrait orientation.
  • the first full-screen window can be a window displayed in full screen by the electronic device, and accordingly, the window width and window height of the first full-screen window can be respectively the screen width and screen height corresponding to the portrait orientation. Equal height.
  • the entire display area of the above-mentioned first full-screen window can be used to display the video content being played, for example.
  • other areas in the full-screen window can also display some other content that is updated together with the progress of video playback, such as barrage and progress bars played together with the progress of video playback, and some operating controls for controlling the playback progress and speed.
  • the first full-screen window may also be a small window that is displayed floating on top of another application window, and accordingly, the window width of the first full-screen window is smaller than the screen width corresponding to the portrait orientation, and the window height is smaller than the screen height, but the aspect ratio of the first full-screen window remains equal to the screen aspect ratio corresponding to the portrait orientation. This is not limited here.
  • loading the horizontal screen display resource of the first application in the first full screen window includes: loading the horizontal screen display resource based on the full screen layout parameters configured under the horizontal screen display resource of the first application.
  • the application in order to adapt to the screen aspect ratio corresponding to the horizontal and vertical orientations of the electronic device, the application usually configures the corresponding horizontal and vertical display resources.
  • these applications in order to meet the needs of users to display some content in full screen, such as watching videos or slides in full screen, these applications usually also configure non-full screen layout parameters and full screen layout parameters under the horizontal display resources.
  • the full screen layout parameters are used to control the layout of the full screen window of the first application, that is, the first full screen window mentioned above.
  • the non-full screen layout parameters are used to control the layout of the non-full screen window of the application.
  • the horizontal screen display resources loaded based on the full screen layout parameters may include horizontal screen layout resources, horizontal screen position resources, and horizontal screen image resources that can adapt to the screen aspect ratio corresponding to the horizontal screen orientation.
  • the layout style, layout position, and image size of the interface elements such as text and icons controlled by the horizontal screen display resources and the horizontal screen display resources loaded corresponding to the non-full screen layout parameters will be different. I will not elaborate on this here.
  • the vertical screen display resource of the first application is not configured with a full-screen layout parameter.
  • the full-screen display method provided in the first aspect above can be applied to achieve full-screen display in the vertical direction without increasing the application development cost.
  • the full-screen display method provided in the first aspect above can be applied to applications that are not configured with full-screen layout parameters under the vertical screen display resources.
  • the first condition is: a screen aspect ratio corresponding to the vertical screen orientation is within a first preset range.
  • the first preset range may correspond to the preset [0.9, 1] for the portrait orientation. That is, when the screen aspect ratio corresponding to the portrait orientation is within the first preset range, it indicates that the screen width and height of the electronic device are close, and full-screen display in the portrait orientation is conducive to improving user experience.
  • the first preset range can also be expressed as an upper threshold and a lower threshold.
  • the upper threshold corresponding to the screen aspect ratio in the vertical screen direction can be 1
  • the lower threshold can be 0.9.
  • the screen aspect ratio is greater than 0.9 and less than 1, it can be considered to be within the first preset range, that is, the first condition is met. This is not limited here.
  • a first full-screen window of a first application is displayed in full screen in the current placement orientation, including: in response to a first request from the first application to switch to a horizontal screen orientation, controlling the screen display orientation to remain in a vertical screen orientation, and sending first screen configuration information to the first application, wherein the first screen configuration information includes first information indicating that the screen display orientation of the electronic device is a horizontal screen orientation, and second information indicating the screen aspect ratio corresponding to the vertical screen orientation.
  • the first application when it receives an operation instructing the user to display in full screen (such as the above-mentioned first user operation), it can send a request to the system by default to switch the screen display direction to the horizontal screen direction, such as the above-mentioned first request.
  • the system of the electronic device receives the first request, if it is confirmed that the current placement direction of the electronic device is vertical and the screen aspect ratio meets the first condition, it can control the screen display direction to remain in the current vertical screen direction, but can feedback to the first application the screen configuration information indicating that the screen display direction has been switched to the horizontal screen direction, that is, the above-mentioned first screen configuration information.
  • the screen configuration information may include at least two parts of information, namely, the above-mentioned first information indicating that the screen display direction is the horizontal screen direction (or has been switched to the horizontal screen direction), and the second information indicating the screen aspect ratio corresponding to the vertical screen direction.
  • the first application can load the horizontal screen display resource based on the screen configuration information fed back by the system, and perform full screen display in the current vertical screen direction, that is, display the first full screen window of the above-mentioned first application.
  • controlling the screen display direction to remain in the portrait direction and sending the first screen configuration information to the first application includes: generating second screen configuration information corresponding to the portrait direction, wherein the first screen configuration information includes third information indicating that the screen display direction of the electronic device is the portrait direction, and fourth information indicating the screen aspect ratio corresponding to the portrait direction; The third information in the screen configuration information is modified into the first information to generate the first screen configuration information.
  • the process of generating the screen configuration information indicating that the screen display orientation has switched to the landscape orientation and feeding it back to the first application may be, for example: firstly, based on the current portrait orientation, generate the default screen configuration information indicating that the current screen display orientation is the portrait orientation, such as the second screen configuration information mentioned above. Then, the third information indicating that the current screen display orientation is the portrait orientation in the second screen configuration information is modified to the first information indicating that the current screen display orientation is the landscape orientation, while the fourth information indicating the screen aspect ratio corresponding to the portrait orientation in the second screen configuration information is kept unchanged, or the fourth information is used as the second information mentioned above, so as to generate the first screen configuration information mentioned above.
  • the first full-screen window of the first application is displayed in full screen in the current placement direction, including: according to the first information in the first screen configuration information, the first application loads the horizontal screen display resource based on the global layout parameters under the horizontal screen display resource; according to the second information in the first screen configuration information, the first full-screen window is laid out and displayed in the current vertical screen direction.
  • the first information in the first screen configuration information indicating that the current screen display direction is the horizontal screen direction can be used to instruct the first application to load the horizontal screen display resource according to the global layout parameters under the horizontal screen display resource.
  • the second information in the first screen configuration information indicating the screen aspect ratio corresponding to the vertical screen direction that is, the information indicating the screen size corresponding to the current vertical screen direction, can be used to instruct the first application to adapt to the screen aspect ratio corresponding to the vertical screen direction to layout the corresponding content to be displayed, and display the above-mentioned first full-screen window.
  • the first screen configuration information, the second screen configuration information, and the third screen configuration information are config information.
  • the method while keeping the electronic device placed vertically, the method also includes: detecting that the placement orientation of the electronic device is switched to horizontal; controlling the screen display direction to switch to horizontal, displaying a second full-screen window of the first application in the switched horizontal direction, loading horizontal display resources in the second full-screen window, and the window aspect ratio of the second full-screen window is adapted to the screen aspect ratio corresponding to the horizontal direction.
  • the electronic device can control the screen display direction to switch to the horizontal direction, and continue to display the full screen in the horizontal direction according to the loaded horizontal display resources. In this way, the user's needs for watching videos and other content in full screen in different placement directions of the electronic device can be met.
  • the above-mentioned electronic device can be, for example, a tablet computer with a small difference in screen width and height, or a folding screen mobile phone that remains in a horizontally unfolded state, etc., which is not limited here.
  • the horizontal screen display resources loaded by the electronic device when switching the current screen display direction to the horizontal screen direction and the horizontal screen display resources loaded corresponding to the vertical screen direction can both indicate the horizontal screen display resources of the corresponding application (such as the first application).
  • the difference between the two can only be the different spacing between the icons, texts and other contents of the layout, and the different sizes of the horizontal screen picture resources, etc., which are not limited here.
  • the electronic device is a first folding screen device in an unfolded state
  • the screen aspect ratio of the first folding screen device in the folded state does not meet the first condition
  • the method also includes: detecting a folding operation to switch the first folding screen device from an unfolded state to a folded state; controlling the screen display direction to switch to a horizontal screen direction in the folded state, displaying a third full-screen window of the first application in the horizontal screen direction in the folded state, and loading a horizontal screen display resource in the third full-screen window
  • the window aspect ratio of the third full-screen window is adapted to the screen aspect ratio corresponding to the horizontal screen direction of the first folding screen device in the folded state.
  • the above-mentioned first folding screen device can be a folding screen mobile phone that supports horizontally unfolding the screen.
  • the process of the folding screen mobile phone switching from the vertical screen orientation in the unfolded state to the vertical screen state can, for example, refer to the folding process shown in Figure 9b below.
  • the screen aspect ratio of the folding screen mobile phone is greatly different. Therefore, in order to bring a better full-screen experience to the user, the full-screen display can be controlled in the horizontal screen direction in the folded state.
  • the electronic device is a second folding screen device in a folded state
  • the screen aspect ratio of the second folding screen device in the expanded state does not meet the first condition
  • the method also includes: detecting an expanding operation to switch the second folding screen device from a folded state to an expanded state; controlling the screen display direction to switch to a horizontal screen direction in the expanded state, and displaying a fourth full-screen window of the first application in the horizontal screen direction in the expanded state, and loading a horizontal screen display resource in the fourth full-screen window, and the window aspect ratio of the fourth full-screen window is adapted to the screen aspect ratio corresponding to the horizontal screen direction of the second folding screen device in the expanded state.
  • the first folding screen device can be a folding screen mobile phone that supports vertically unfolding the screen.
  • the vertical screen orientation and horizontal screen orientation of the folding screen mobile phone in the folded state can be referred to as shown in Figure 2c below, which will not be described here. Therefore, the unfolding operation of the second folding screen device from the folded state to the unfolded state is to unfold the screen of the folding screen mobile phone from the folded state shown in Figure 2c. After the screen is unfolded, the screen aspect ratio of the folding screen mobile phone is greatly different. Therefore, in order to bring a better full-screen experience to the user, it can be controlled in the unfolded state. Display full screen in horizontal orientation.
  • an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; one or more memories storing one or more programs, wherein when one or more programs are executed by one or more processors, the electronic device executes the full-screen display method provided in the above-mentioned first aspect and various possible implementations.
  • an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon.
  • the instructions When the instructions are executed on a computer, the computer executes the full-screen display method provided in the first aspect and various possible implementations described above.
  • an embodiment of the present application provides a computer program product, including a computer program/instruction, which, when executed by a processor, implements the full-screen display method provided in the above-mentioned first aspect and various possible implementations.
  • FIG. 1a shows a non-full-screen interface of an application program laid out corresponding to non-full-screen layout parameters based on horizontal screen display resources.
  • FIG. 1 b shows a full-screen display interface of an application program that is laid out according to full-screen layout parameters of a horizontal screen display resource.
  • FIG. 1c shows a non-full-screen interface of an application program laid out corresponding to non-full-screen layout parameters of a vertical screen display resource.
  • FIG. 1d shows a full-screen display interface of an application program based on a layout corresponding to full-screen layout parameters of a vertical screen display resource.
  • Figure 2a shows a schematic diagram of the vertical screen interface corresponding to when the mobile phone (excluding foldable screen mobile phones) is placed vertically, and the horizontal screen interface corresponding to when it is placed horizontally.
  • Figure 2b shows a schematic diagram of the vertical screen interface corresponding to when a folding screen mobile phone that supports horizontal screen expansion is placed vertically in the screen expansion state, and the horizontal screen interface corresponding to when it is placed horizontally.
  • Figure 2c is a schematic diagram of the vertical screen interface corresponding to when a foldable screen mobile phone that supports vertical folding screen is placed vertically in the folded state, and the horizontal screen interface corresponding to when it is placed horizontally.
  • FIG3 is a schematic diagram showing an application scenario of a full-screen display method provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a video playback interface corresponding to a full-screen display solution in the prior art.
  • FIG5 is a schematic diagram showing a full-screen display process implemented by the full-screen display method provided in an embodiment of the present application.
  • FIG6 shows a software structure based on which a full-screen display method provided in an embodiment of the present application is implemented in the system of the electronic device 100 .
  • FIG. 7 shows an interactive process of a full-screen display method provided in Example 1 of the present application.
  • FIG8 a shows the interface changes corresponding to the operation of full-screen display detected by an electronic device provided in Embodiment 1 of the present application.
  • FIG8b shows the interface changes corresponding to an operation in which an electronic device provided in Embodiment 1 of the present application detects a user's instruction to exit full-screen display.
  • FIG9 a shows the interface changes displayed when an electronic device detects a user's operation of rotating the device in an orientation provided by Embodiment 1 of the present application.
  • FIG9 b shows the interface changes displayed when an electronic device provided in Embodiment 1 of the present application detects a user's operation of folding the screen.
  • FIG10 shows an implementation process of a full-screen display method provided in Example 1 of the present application.
  • FIG11 shows an interactive process of a full-screen display method provided in Example 2 of the present application.
  • FIG. 12 shows an implementation process of a full-screen display method provided in Example 2 of the present application.
  • FIG. 13 shows the hardware structure of an electronic device 100 provided in an embodiment of the present application.
  • FIG. 14 is a software structure block diagram of an electronic device 100 provided in an embodiment of the present application.
  • Horizontal screen display resources refer to display resources that match the application interface display window whose window width is greater than the window height in the placement direction of the electronic device. Specifically, they may include horizontal screen layout resources, horizontal screen position resources, and horizontal screen image resources.
  • the horizontal screen layout resources are specifically used to indicate which icons are laid out in the first application window
  • the horizontal screen position resources are used to indicate the position information of each icon in the first application window
  • the horizontal screen image resources are used to indicate the shape, color and other information of each icon in the first application window. It can be understood that when the screen of the electronic device is used to display the application window, the above-mentioned horizontal screen display resources are also display resources suitable for the screen display direction being the horizontal screen direction.
  • non-full-screen layout parameters and full-screen layout parameters can also be configured separately in the corresponding horizontal screen display resources configured during application development, wherein the non-full-screen layout parameters are used to control the layout of the non-full-screen window of the application, and the full-screen layout parameters are used to control the layout of the full-screen window of the application.
  • the full-screen layout parameters can be used to meet the needs of users who need to obtain an immersive visual experience by displaying a certain playback window of the application in full screen on an electronic device, such as the need to realize immersive video viewing, immersive reading and other experience needs.
  • the video application can display the video playback interface 110 shown in Figure 1a based on the non-full-screen layout parameters of the horizontal screen display resources; the video application can display the video playback interface 120 shown in Figure 1b based on the full-screen layout parameters of the horizontal screen display resources.
  • the video playback interface 110 may include a video playback window 111 displaying the currently played video content, an area 112 and an area 113 displaying video-related introductions, wherein area 112 may display, for example, an introduction and comments of the currently played video, and area 113 may display, for example, the director, screenwriter, actor list, and associated short videos of the currently played video. No limitation is made here.
  • the video playback interface 120 may only include a video playback window that displays the video content in full screen. While displaying the video content, the window may also display bullet screens, progress bars, and some operation controls for controlling the playback progress and speed that are played along with the video playback progress.
  • Vertical screen display resources corresponding to the horizontal screen display resources, refer to display resources that match the application interface display window whose window width is smaller than the window height in the placement direction of the electronic device. Specifically, they may include vertical screen layout resources, vertical screen position resources, and vertical screen picture resources.
  • some applications that need to display a certain playback window in full screen to achieve an immersive visual experience only configure non-full-screen layout parameters in the vertical screen display resources, but have not yet configured full-screen layout parameters.
  • some applications that pay development costs to configure full-screen layout parameters in the vertical screen display resources in order to meet the display requirements of some electronic devices with a screen aspect ratio close to 1:1 can display the video playback interface 130 shown in Figure 1c based on the non-full-screen layout parameters in the vertical screen display resources; based on the full-screen layout parameters in the vertical screen display resources, the video playback interface 140 shown in Figure 1d can be displayed.
  • landscape orientation and portrait orientation refer to the two screen display orientations configured by default on an electronic device, where the landscape orientation corresponds to the screen display orientation when the electronic device is placed horizontally, and the portrait orientation corresponds to the screen display orientation when the electronic device is placed vertically.
  • the direction corresponding to the width (horizontal side) of the screen is greater than the height (vertical side) can be the horizontal screen direction.
  • the direction corresponding to the width of the screen is less than the height can be the vertical screen direction.
  • the direction corresponding to the width of the screen being greater than the height can be the horizontal screen direction
  • the direction corresponding to the width of the screen being less than the height can be the vertical screen direction.
  • the screen display direction of the current placement direction can still default to the vertical screen direction in the unfolded state, such as the direction shown in the (left) figure in Figure 2b.
  • the screen display direction in another placement direction i.e., horizontal placement
  • the electronic device shown in Figure 2b can also be a tablet computer with a screen width and height that is relatively close, etc., which is not limited here.
  • the direction corresponding to the width of the screen being greater than the height can be the horizontal screen direction
  • the direction corresponding to the width of the screen being less than the height can be the vertical screen direction.
  • the screen display direction of the current placement direction can still default to the vertical screen direction in the folded state, such as the direction shown in the (left) figure in Figure 2c.
  • the screen display direction of another placement direction i.e., horizontal placement
  • the display direction of the electronic device screen can be determined based on the default configuration of the system.
  • config refers to the configuration information related to screen display, which can be referred to as screen configuration information. It is the abbreviation of the English word configuration.
  • Configuration is a set of information about the current display direction and screen size of the electronic device fed back to the application after the system performs the corresponding screen rotation or non-rotation operation in response to the application's request to display the corresponding interface.
  • the screen size can be, for example, the screen aspect ratio corresponding to the current display direction. For example, when the video application is running, if the current display direction of the electronic device is the portrait direction, the video application can send a request to the system to rotate to the landscape direction when it detects the user's instruction to display a certain video playback interface in full screen.
  • the system can rotate the current display direction to the landscape direction in response to the request, and the config information fed back to the video application may include: the direction information corresponding to the current display direction being the landscape direction, and the screen aspect ratio corresponding to the current landscape direction.
  • the video application can load the landscape display resource for interface layout according to the config information fed back by the system, and the electronic device can display the video playback interface in full screen in the landscape direction.
  • FIG3 shows a schematic diagram of an application scenario of a full-screen display method according to an embodiment of the present application.
  • the application scenario includes an electronic device 100.
  • the user can click the full-screen display control 102 on the video playback interface 101 currently displayed by the electronic device 100, so that the electronic device 100 displays the video content currently being played in the video playback interface 101 in full screen.
  • the system of the electronic device 100 can respond to the request for rotating the screen display direction sent by the video application, rotate the screen display direction from the vertical screen direction shown in (a) of FIG. 3 to the horizontal screen direction shown in (b), and feed back the screen size information corresponding to the rotated horizontal screen direction to the video application through the config information.
  • the video application can load the horizontal screen display resource accordingly, and display the full-screen playback interface 103 displayed in the horizontal screen direction as shown in (b) of FIG. 3 .
  • the width and height of the screen of the electronic device 100 are relatively close, for example, when the screen display orientation of the electronic device is in portrait orientation or landscape orientation, the aspect ratio of the screen is within the range of [0.9, 1.1], and the visual experience provided to the user by the electronic device 100 maintaining the portrait orientation for full-screen display and switching to the landscape orientation for full-screen display is actually not much different.
  • the full-screen playback interface can be displayed while the electronic device is kept in a vertical orientation, that is, the screen display direction is kept in a vertical orientation for full-screen display, the user can obtain a better full-screen video viewing experience without rotating the placement direction of the electronic device 100. In this way, the user's experience will be better.
  • the system of the electronic device 100 may not rotate the screen display direction when the application requests the horizontal screen direction from the system, but feedback the screen size information of the vertical screen direction to the application and instruct the application to horizontally fill the content that needs to be displayed in full screen in the current vertical screen direction.
  • the application can only load the vertical screen display resources for layout display according to the information indicating the vertical screen direction in the corresponding config information fed back by the system, and accordingly the electronic device 100 may display the video playback interface 410 shown in FIG. 4.
  • the window 411 of the video playing interface 410 is covering the entire screen in the left and right directions (horizontally), some layout contents on the non-full-screen interface are still displayed in the video playing interface 410.
  • the “Introduction” 412 or “Comments” 413 which are only available on the non-full-screen interface, may be displayed below the window 411 shown in FIG. 4 .
  • the content of the bullet screen may also be directly covered and displayed on the window 411 of the video playing, resulting in the blocking of part of the video screen in the window 411, causing the user to have a poor experience in watching the video.
  • an embodiment of the present application shows a full-screen display method, which is applied to an electronic device having a screen whose width and height are relatively close.
  • the system of the electronic device can respond to a request from a first application to rotate to a horizontal screen orientation for full-screen display, and when the identified screen aspect ratio information confirms that the screen aspect ratio currently used to display the application interface is within a preset range, the screen display direction is controlled not to be rotated (i.e., the vertical screen orientation is maintained) and corresponding screen configuration information is fed back to the first application, wherein the screen configuration information at least includes information indicating that the screen display direction is a horizontal screen orientation and screen aspect ratio information corresponding to the vertical screen orientation.
  • the above-mentioned first application can load the horizontal screen display resource based on the information in the screen configuration information indicating that the screen display direction is a horizontal screen orientation, and based on the full-screen layout parameters under the horizontal screen display resource, And based on the screen aspect ratio information corresponding to the vertical screen direction in the above screen configuration information, the full-screen display interface is laid out in the current vertical screen direction, and the full-screen display in the vertical screen direction is achieved when the electronic device remains placed vertically.
  • the above-mentioned preset range can be, for example, a reasonable preset range such as [0.9, 1.1].
  • the above-mentioned screen configuration information can be, for example, config information, indicating that the screen display direction is the horizontal screen direction and the screen aspect ratio information corresponding to the vertical screen direction. It can be parameters of different configuration items in the same config information, or it can be parameters under corresponding configuration items in different config information.
  • the above-mentioned first application can be, for example, a video application, an office application, a reading application, or other application that needs to display a playback window in full screen to achieve an immersive visual experience. There is no limitation here.
  • the screen configuration information "fake" to the horizontal direction can be obtained from the system feedback.
  • the horizontal display resource is loaded, so as to perform full-screen display in the vertical direction of the electronic device currently placed in vertical screen, giving the user a better user experience.
  • FIG5 shows a full-screen display process implemented by a full-screen display method provided in an embodiment of the present application.
  • a video application is run on the electronic device 100 and a video playback interface 501 shown in Figure 5 is displayed.
  • the electronic device 100 can maintain the full screen playback interface 503 in the vertical direction.
  • the above-mentioned full-screen layout parameters refer to relevant configuration parameters for controlling the full-screen display effect.
  • the effects presented by the full-screen playback interface 503 shown in FIG5 can be controlled based on the above-mentioned full-screen layout parameters, including: the currently played video content fills the screen, and the blank areas that the video content cannot fill, such as area 504 and area 505 on the full-screen playback interface 503 shown in FIG5, can be used as areas for displaying information such as bullet screen, playback controls, setting controls, and playback progress, so as to achieve an immersive full-screen experience.
  • the system can control the screen display direction to rotate to a horizontal screen direction.
  • the system will update the screen configuration information to the above-mentioned first application, and the updated screen configuration information may include information indicating that the screen display direction is a horizontal screen direction, and screen aspect ratio information corresponding to the horizontal screen direction.
  • the first application can load the horizontal screen display resources and layout the full-screen display interface in the horizontal screen direction, and perform full-screen display in the horizontal screen direction.
  • the electronic device is a foldable screen mobile phone
  • the electronic device detects the user's folding operation, if the electronic device continues to be placed vertically, based on the above solution provided by the embodiment of the present application, the foldable screen mobile phone can still display full screen in the vertical screen direction after being folded. And when it is detected that the electronic device is placed horizontally, it can switch to the horizontal screen direction for full screen display.
  • the full-screen display method provided in the embodiment of the present application can adapt to some electronic devices with relatively close width and height, and perform full-screen display in the vertical screen direction, which can bring an immersive full-screen experience to the user without the user rotating the placement direction of the electronic device.
  • the full-screen display method can be applied to various types of applications that need to display a certain playback window in full screen to achieve an immersive visual experience, regardless of whether the full-screen layout parameters are configured in the vertical screen display resources of the application, that is, it is more adaptable to the application.
  • the full-screen display method can continue to support responses to related operations of the user rotating the placement direction of the device, and related operations of the user folding the screen, and correspondingly switch to the width and height size of the horizontal screen direction for full-screen display, which is also conducive to smooth switching between various user operations, meeting the user's various usage requirements for electronic devices, thereby improving the user's usage experience.
  • the video played through the video application can be a video in a video player, or a video in other applications such as Weibo, WeChat, and gallery; the video can also be a video shot by a mobile terminal, a video downloaded by a mobile terminal, or a video obtained by other means, and the embodiments of the present application are not limited here.
  • the above preset range corresponding to the screen aspect ratio may be, for example, the range corresponding to the description of the screen aspect ratio close to 1:1, such as [0.9, 1.1] or [0.8, 1.1] and other reasonable ranges, which are not limited in the embodiments of the present application.
  • the display direction of the above electronic device includes the above-mentioned vertical screen direction and horizontal screen direction. If the current display direction of the electronic device is vertical screen direction, it can be determined that the aspect ratio corresponding to the vertical screen direction is within the preset range of [0.8, 1] or [0.9, 1], and there is no need to switch the display direction, that is, the vertical screen direction can continue to be maintained for display.
  • the aspect ratio or width-height information corresponding to the horizontal screen direction can maintain the aspect ratio or width-height information corresponding to the vertical screen direction. Accordingly, if the user further rotates the screen of the electronic device to the landscape orientation after operating the full-screen display, the electronic device can recognize that the current aspect ratio is greater than 1 and is not within the preset ranges such as [0.9, 1] or [0.8, 1], and therefore needs to switch the full-screen display interface in the portrait orientation to the full-screen display interface in the landscape orientation.
  • the system can update the screen configuration information to indicate that the screen display orientation has been switched to the landscape orientation and feedback the screen aspect ratio corresponding to the landscape orientation to the application, so that the application can call the landscape orientation.
  • the full screen layout parameters under the horizontal display resource load the horizontal display resource and display it in full screen in the horizontal direction.
  • the full-screen display method provided in the embodiments of the present application can be applicable to electronic devices including but not limited to mobile phones with screens (including foldable screen mobile phones), tablet computers, desktops, laptops, handheld computers, netbooks, and augmented reality (AR) and virtual reality (VR) devices, smart TVs, smart watches and other wearable devices, mobile email devices, car equipment, portable game consoles, music players, reader devices, televisions embedded with or coupled with one or more processors, or other electronic devices capable of accessing the Internet.
  • mobile phones with screens including foldable screen mobile phones
  • tablet computers desktops, laptops, handheld computers, netbooks, and augmented reality (AR) and virtual reality (VR) devices
  • smart TVs smart watches and other wearable devices
  • mobile email devices car equipment, portable game consoles, music players, reader devices, televisions embedded with or coupled with one or more processors, or other electronic devices capable of accessing the Internet.
  • portable game consoles music players, reader devices
  • televisions embedded with or coupled with one or more processors or other electronic devices capable of accessing the Internet
  • FIG6 shows a software structure based on which a full-screen display method is implemented in a system of an electronic device 100 according to an embodiment of the present application.
  • system architecture corresponding to the operating system carried by the electronic device 100 may include an application layer, an application framework layer, a system service layer, and a kernel layer, etc., which will be described in detail below and will not be repeated here.
  • operating system may be referred to as “system”. Unless otherwise specified, both refer to the operating system of the electronic device 100.
  • the specific implementation process of the full-screen display method provided in the embodiment of the present application may involve relevant software structures in the application layer and application framework layer of the electronic device.
  • the applications installed in the application layer of the system structure may include one or more video applications 610 and other applications that can meet user needs for full-screen display.
  • the video application 610 may be, for example, APP 611, APP 612, APP 613, etc.
  • Other applications may also be, for example, office applications, reading applications, etc., which are not limited here.
  • the application framework layer in the system architecture may include a window management service (WindowManagerService, WMS) 620, etc.
  • the window management service 620 is a system service running in the application framework layer, which is mainly responsible for managing the window directions of applications and devices, and the width and height sizes of corresponding windows, etc.
  • the window management service 620 may include an activity management module (Activity management module) 621, a configuration management module (Config management module) 622, and a device direction management module 623.
  • the Activity management module 621 can be used to distribute requests triggered by corresponding events during the operation of the system, such as receiving a full-screen display request sent by the video application 610 of the application layer, and then notifying the device orientation management module 623 to process the received full-screen display request.
  • the Activity management module 621 is also used to adjust/rotate the display direction of the electronic device according to the processing result of the device orientation management module 623. For example, when the device orientation management module 623 determines that the processing result of the above-mentioned full-screen display request is to keep the vertical screen orientation without rotating, the Activity management module 621 keeps the current display direction of the electronic device in the vertical screen orientation. For example, when the device orientation management module 623 determines that the processing result of the above-mentioned full-screen display request is to rotate to the horizontal screen orientation, the Activity management module 621 can adjust the current display direction of the electronic device to the horizontal screen orientation.
  • the Config management module 622 is used to manage the display configuration information transmitted to the application through the config, referred to as display information.
  • the display information may include the window size or aspect ratio corresponding to the display direction determined by the device orientation management module 623 in response to the full screen display request of the application, and the state parameters indicating the screen display state and other configuration information.
  • the device orientation management module 623 may include a full-screen determination module 626, which is used to identify electronic devices whose screen width and height information is relatively close (for example, the aspect ratio is close to 1:1), and to manage the corresponding display direction of such electronic devices when they are displayed in full screen.
  • the full-screen determination module 626 identifies whether the screen aspect ratio is close to 1:1, for example, by determining whether the aspect ratio corresponding to the display direction of the electronic device screen currently obtained is within a preset range, or by comparing the aspect ratio with a preset upper threshold and a lower threshold, which is not limited here.
  • Figure 7 shows an interaction process of a full-screen display method according to an embodiment of the present application. It can be understood that the interaction process shown in Figure 7 involves the interaction between the video application 610, the Activity management module 621 and the device direction management module 623 shown in Figure 6 above.
  • the interaction process may include the following steps:
  • the video application 610 receives a user instruction to perform a full-screen display operation.
  • the operation of the user indicating full screen display may be, for example, an operation of the user clicking on the full screen display control 811 in the video playback interface 810.
  • the operation of the user indicating full screen display may be, for example, an operation of the user double-clicking the screen in the video content display area in the video playback interface 810.
  • the operation of the user indicating full screen display may be, for example, an operation of the user indicating full screen display of video content by a preset voice command or a gesture, etc. This is not limited here.
  • the video application 610 at the system application layer can trigger a corresponding display event and generate a corresponding full-screen display request, and continue to execute the following step 702 and send it to the Activity management module 621 at the system application framework layer.
  • the video application 610 sends a full-screen display request to the Activity management module 621 .
  • the video application 610 may send the generated full-screen display request to the Activity management module 621 located in the application framework layer.
  • the Activity management module 621 may be set in the window management service 620 of the application framework layer, which will not be described in detail here.
  • the Activity management module 621 may be used to distribute requests triggered by corresponding events during system operation, for example, executing the following step 703 to distribute/forward the above full-screen display request to the device direction management module 623.
  • the full-screen display request sent by the video application 610 at this time can be used to request the system to rotate the screen display direction to the horizontal screen direction.
  • the Activity management module 621 notifies the device orientation management module 623 to process the received full-screen display request.
  • the Activity management module 621 may notify the device direction management module 623 to process the received full screen display request.
  • the notification may be forwarding the full screen display request to the device direction management module 623 .
  • the Activity management module 621 may also generate other notification messages or requests based on the received full-screen display request and send them to the device orientation management module 623 to trigger the device orientation management module 623 to perform corresponding processing. This is not limited here.
  • the device orientation management module 623 determines whether the current display orientation is the portrait orientation. If the determination result is yes, the following step 705 is continued to be executed to further determine whether the display orientation needs to be switched; if the determination result is no, the following steps 711 to 713 can be executed to switch to the landscape orientation for full-screen display.
  • the device orientation management module 623 can determine whether the display orientation corresponding to the current placement orientation of the electronic device 100 is a portrait orientation based on sensor data collected by hardware such as a gyroscope sensor on the electronic device, and the system's default configurations such as screen display orientation and screen size information corresponding to the corresponding display orientation.
  • the above-mentioned screen size information can be, for example, the screen aspect ratio corresponding to the corresponding display orientation.
  • the device orientation management module 623 determines whether to switch to the horizontal orientation for full-screen display according to the aspect ratio corresponding to the vertical orientation. If the judgment result is yes, the following steps 711 to 713 can be continued to switch to the horizontal orientation for full-screen display; if the judgment result is no, the following steps 706 to 708 can be continued to display in full screen in the current vertical orientation.
  • the device orientation management module 623 determines that the current display orientation is the portrait orientation, it can further determine whether the current portrait orientation needs to be switched to the landscape orientation for full-screen display.
  • the judgment result can be determined based on whether the aspect ratio corresponding to the current portrait orientation of the electronic device 100 is within a preset range close to 1:1. For example, the preset range is [0.9, 1]. If the aspect ratio corresponding to the above portrait orientation is less than 0.9, it indicates that the screen width and height difference of the electronic device 100 is large. If full-screen display is required, it is necessary to switch to the landscape orientation to obtain a better full-screen experience.
  • the judgment result at this time is yes, that is, it is necessary to switch to the landscape orientation for full-screen display. If the aspect ratio corresponding to the above portrait orientation is within the above [0.9, 1], it indicates that the screen width and height difference of the electronic device 100 is small. In order to simplify user operations and improve user experience, the current portrait orientation can also be maintained during full-screen display. Therefore, the judgment result at this time is no, that is, it is not necessary to switch to the landscape orientation, and the current portrait orientation can be maintained for full-screen display.
  • the judgment process from 704 to 705 performed by the device orientation management module 623 may also be combined into one judgment step.
  • the device orientation management module 623 controls the screen display orientation to maintain the vertical orientation, and calls the config management module 622 to generate screen configuration information indicating that the current display orientation is the horizontal orientation.
  • the screen configuration information may include screen size information corresponding to the current vertical orientation.
  • the device orientation management module 623 determines to maintain the current vertical screen orientation for full-screen display
  • the current vertical screen orientation can be controlled to be maintained as the screen display orientation
  • the config management module 622 can be called to generate screen configuration information indicating that the current screen display orientation has been switched to the horizontal screen orientation, so as to be fed back to the video application 610 as a response to the full-screen display request.
  • the information indicating that the current screen display orientation is the vertical screen orientation in the screen configuration information (config) generated corresponding to the current vertical screen orientation and to be fed back to the video application 610 can be modified to indicate the horizontal screen orientation, but the aspect ratio corresponding to the current vertical screen orientation is retained, and the modified screen configuration information is then fed back to the video application.
  • the screen configuration information that needs to be fed back to the video application 610 is "pseudo-
  • the screen configuration information indicating that the current screen display direction has been switched to the horizontal screen direction is generated as the information fed back to the video application 610.
  • the system can also modify the screen configuration information fed back to the video application 610, instructing the application to call the horizontal screen display resources configured with full-screen layout parameters, and layout the full-screen display interface in the current vertical screen direction, such as a full-screen playback interface, to achieve full-screen display of video content in the vertical screen direction.
  • the device orientation management module 623 of the system needs to perform the operation of this step 706 to realize full-screen display in the vertical screen direction because: the horizontal screen display resources of the application are usually configured with full-screen layout parameters, but the vertical screen display resources may not be configured with full-screen layout parameters. If it is an application that does not configure full-screen layout parameters for the vertical screen display resource, when the full-screen display operation of the user is detected, the corresponding full-screen display request sent to the system usually requires the current screen display direction to be switched to the horizontal screen direction. Usually, the system will switch to the horizontal screen direction in response to the request of the application and feedback the screen configuration information (config) indicating that the screen display direction has been switched to the horizontal screen direction to the application.
  • the screen configuration information config
  • the application can call the horizontal screen display resource layout full-screen display interface based on the config fed back by the system. Therefore, in the embodiment of the present application, the device orientation management module 623 of the system can feedback the config indicating that the current screen display direction is the horizontal screen direction to the application without switching the screen display direction to the horizontal screen direction, and configure the screen aspect ratio corresponding to the current vertical screen direction in the config. Then, the application can be instructed to call the horizontal screen display resource to adopt the full-screen display interface layout adapted to the screen aspect ratio corresponding to the vertical screen direction, so as to achieve the purpose of full-screen display in the vertical screen direction.
  • the device orientation management module 623 can call the config management module 622 to modify the original aspect ratio in the screen configuration information (config) generated corresponding to the current screen display orientation to the aspect ratio corresponding to the portrait orientation by calling the updateConfig method of the config management module 622, thereby generating screen configuration information indicating that the current display orientation is the landscape orientation.
  • "port mRotation” in the config before modification is information indicating that the current screen display direction is the portrait screen direction
  • “ROTATION_0” indicates that the angle of rotation of the portrait screen direction relative to the positive direction of the electronic device is 0, where the positive direction is the direction indicated by the top of the electronic device
  • "land mRotation” in the config after modification is information indicating that the current screen display direction is the landscape screen direction
  • "ROTATION_0” indicates that the angle of rotation of the portrait screen direction relative to the positive direction of the electronic device is 90° counterclockwise.
  • the device orientation management module 623 feeds back the generated screen configuration information to the video application 610 .
  • the device orientation management module 623 calls the config management module 624 to generate screen configuration information (config) indicating that the current display orientation is the landscape orientation
  • the generated config can be fed back to the video application 610, so that the video application 610 can call the corresponding display resource layout display interface based on the config.
  • the feedback process can be implemented, for example, by calling the onConfigurationChanged function to send or call back the config to the video application 610.
  • the video application 610 can load the landscape display resource based on the screen configuration information and the full-screen layout parameters under the landscape display resource, and use the current screen display orientation as the landscape orientation layout full-screen playback interface to display the video content in full screen.
  • the video application 610 performs full-screen display in the vertical direction based on the received screen configuration information.
  • the horizontal screen display resource and the system's drawing rendering process can be called to draw a full-screen playback interface in the vertical screen direction based on the aspect ratio corresponding to the vertical screen direction in the screen configuration information and the information indicating that the current screen display direction is the horizontal screen direction.
  • the interface layout corresponding to the full-screen playback interface can correspond to the screen aspect ratio corresponding to the vertical screen direction. Therefore, the user can obtain a better full-screen experience while keeping the electronic device 100 in the vertical screen direction.
  • the system of the electronic device 100 can execute the interactive process of steps 702 to 708 above, determine to use the vertical screen orientation for full-screen display, and the screen of the electronic device 100 can correspondingly display the full-screen display interface 820 shown in FIG8a.
  • the full-screen display interface 820 can present a full-screen experience corresponding to the horizontal screen state.
  • the blank area above the video content displayed by the full-screen display interface 820 can be used to display bullet comments, and the blank area below the video content can be used to display playback controls, thereby providing users with a better immersive full-screen experience.
  • the video playback interface 830 may include a full screen display control 831.
  • the video playback interface 830 may be the same as the video playback interface 810 shown in FIG. 8a. Accordingly, the full screen display control 831 may also be the same as the full screen display control 811 shown in FIG. 8a.
  • the video application 610 receives an operation from the user to rotate the device or fold the screen.
  • the video application 610 when the electronic device 100 runs the video application 610 and plays the video in full screen display in the portrait orientation, if it is detected that the user rotates the placement direction of the electronic device 100, the video application 610 can receive the corresponding operation request of the user to rotate the placement direction of the device, and generate a corresponding request to switch the display direction.
  • the above-mentioned electronic device 100 is a folding screen mobile phone as illustrated in Figure 2b above, then when the electronic device 100 runs the video application 610 and plays the video in full screen display in the portrait orientation, if it is detected that the user folds the screen, the video application 610 can receive the corresponding operation event and generate a corresponding request to switch the display direction.
  • the screen size information of the electronic device 100 will also change significantly, and it is no longer a screen size with an aspect ratio close to 1:1. Therefore, if the full screen display continues, it is necessary to switch to the corresponding horizontal screen direction after the folded screen for full screen display.
  • FIG. 9a to FIG. 9b respectively illustrate an interface change corresponding to a user operation according to an embodiment of the present application.
  • the user when the electronic device 100 is displaying the full-screen playback interface 910 shown in FIG. 9a , the user can, for example, operate the electronic device 100 to rotate the device to the left, so that the electronic device 100 is rotated from a vertical position to a horizontal position. In other embodiments, the user can also operate the electronic device 100 to rotate the device to the right, or flip the electronic device 100 to a horizontal screen orientation, etc., which are not limited here.
  • the system of the electronic device 100 can execute this step 709 to the following step 713, and display the full-screen playback interface 920 in the horizontal screen orientation shown in FIG. 9a .
  • the electronic device 100 is a folding screen mobile phone
  • the user in the process of displaying the full-screen playback interface 910 shown in FIG9b, the user can, for example, fold (fold inward or outward) the screen of the electronic device 100 so that the electronic device 100 is displayed in full screen through 1/2 of the screen.
  • the system of the electronic device 100 can execute this step 709 to the following step 713, and display the full-screen playback interface 930 in the horizontal screen direction shown in FIG9b.
  • the direction in which the screen width corresponding to the interface displayed by the electronic device 100 after the screen is folded is greater than the height can still preset the above-mentioned horizontal screen direction. And this direction can be consistent with the horizontal screen direction of the electronic device 100 when the screen is unfolded. No restriction is made here.
  • the electronic device 100 runs other applications, such as office applications, and displays the application in full screen in portrait orientation, if a user rotates the device or folds the screen, the corresponding application may generate a request to switch the display orientation.
  • This application is not limited to this.
  • the video application 610 notifies the device direction management module 623 through the Activity management module 621 to process the request to switch the display direction.
  • the video application 610 may send the generated request for switching the display direction to the Activity management module 621 located at the application framework layer. Furthermore, the Activity management module 621 may notify the device direction management module 623 of the request for switching the display direction that needs to be processed by the device direction management module 623 for processing. For details, please refer to the relevant description in the above step 703, which will not be repeated here.
  • the device orientation management module 623 controls the screen display orientation to switch to the horizontal orientation, and calls the config management module 622 to generate screen configuration information indicating that the screen display orientation has switched to the horizontal orientation.
  • the screen configuration information includes screen size information corresponding to the horizontal orientation.
  • the device orientation management module 623 may receive a request from the Activity management module 621 to switch the display orientation, and determine that the current screen display orientation needs to be switched to the landscape orientation for full-screen display. At this time, the device orientation management module 623 may call the config management module 622 to generate a default screen configuration information indicating that the current screen orientation has been switched to the landscape orientation. The generation process of the screen configuration information may not involve the modification process in the above step 706, and the config generated corresponding to the current landscape orientation may be directly used as the screen configuration information to be fed back.
  • the corresponding aspect ratio is set to the aspect ratio corresponding to the landscape orientation.
  • the device orientation management module 623 may call the rotateDisplayAndUpdateConfig method to call the config management module 622 to update the aspect ratio information in the current config to the screen configuration information corresponding to the current landscape orientation, as well as the aspect ratio corresponding to the current landscape orientation, or the aspect ratio corresponding to the landscape orientation after the screen is folded.
  • the device orientation management module 623 feeds back the updated screen configuration information to the video application 610 .
  • the device orientation management module 623 may feed back the updated config after executing the above step 711 to the video application 610 , for example, by calling the onConfigurationChanged function to send or call back to the video application 610 .
  • the video application 610 performs full-screen display in the horizontal direction based on the updated screen configuration information.
  • the video application 610 can load the landscape display resource based on the full-screen layout parameters under the landscape display resource, and layout a full-screen playback interface that adapts to the screen aspect ratio corresponding to the current landscape orientation.
  • the electronic device 100 when it is displaying other interfaces, if it detects that the user rotates the device placement direction, it can also switch the display direction accordingly and switch to the full-screen playback interface or other interface of the corresponding display direction, which is not elaborated here.
  • the full-screen display method provided in the embodiment of the present application can maintain the vertical screen orientation for full-screen display through the interaction between various software structures in the system of the electronic device 100, regardless of whether the full-screen layout parameters are adapted in the vertical screen display resources of the application.
  • the electronic device based on the solution of the present application can also switch to the horizontal screen orientation for full-screen display. In this way, the user can get a better full-screen experience in both the vertical screen orientation or the horizontal screen orientation of the electronic device.
  • FIG10 shows an implementation process of a full-screen display method according to an embodiment of the present application. It can be understood that the execution subject of each step of the process shown in FIG10 can be the electronic device 100. To simplify the description, when introducing the execution process of each step of the process shown in FIG10 below, the execution subject of each step will not be repeatedly introduced.
  • 1001 receiving a user instruction to perform a full-screen display operation.
  • the operation of the user instructing to perform full-screen display may refer to the relevant description in the above step 701, which will not be described in detail here.
  • step 1002 Determine whether the current display orientation is a portrait orientation. If the determination result is yes, continue to execute the following step 1003 to further determine whether the display orientation needs to be switched; if the determination result is no, then execute the following steps 1007 to 1008 to perform full screen display in a landscape orientation.
  • the process of the electronic device 100 determining whether the current display orientation is a portrait orientation may refer to the relevant description in the above step 704 and will not be described in detail here.
  • 1003 According to the aspect ratio corresponding to the current portrait orientation, determine whether to switch to the landscape orientation for full screen display. If the determination result is yes, continue to execute the following steps 1004 to 1005 to perform full screen display in the portrait orientation; if the determination result is no, then execute the following steps 1007 to 1008 to perform full screen display in the landscape orientation.
  • the process of the electronic device 100 determining whether to switch to the horizontal screen orientation for full-screen display may refer to the relevant description in the above step 705, which will not be described in detail here.
  • 1004 Control the screen display direction to maintain the vertical screen direction, and generate screen configuration information indicating that the screen display direction is the horizontal screen direction but including screen size information corresponding to the vertical screen direction.
  • the process of the electronic device 100 generating screen configuration information for full-screen display in the portrait orientation may refer to the relevant description in the above step 706, which will not be described in detail here.
  • the process of the electronic device 100 performing full-screen display in the vertical direction based on the screen configuration information may refer to the relevant descriptions in the above steps 707 to 708, which will not be described in detail here.
  • 1006 receiving an operation from the user to rotate the device or fold the screen.
  • the operation of the user rotating the device placement direction or folding the screen can refer to the relevant description in the above step 709, which will not be repeated here.
  • the default screen configuration information may include information indicating the current horizontal screen direction and screen size information corresponding to the horizontal screen direction.
  • the process of the electronic device 100 generating screen configuration information for full-screen display in the horizontal orientation may refer to the relevant description in the above step 711, which will not be described in detail here.
  • the process of the electronic device 100 performing full-screen display in the horizontal direction based on the default screen configuration information corresponding to the horizontal direction can refer to the relevant descriptions in the above steps 712 to 713, which will not be repeated here.
  • the embodiment of the present application introduces a specific implementation process of a full-screen display method, which includes two judgment steps, namely, first judging whether the current display orientation of the electronic device 100 is a vertical orientation, and then judging whether the current vertical orientation needs to be switched to a horizontal orientation for full-screen display.
  • the following introduces another specific implementation process of a full-screen display method in conjunction with another embodiment.
  • the embodiment of the present application provides another specific implementation process of the full-screen display method.
  • the specific implementation process provided in the embodiment of the present application can directly determine whether to switch to the horizontal screen direction for full-screen display, or determine whether to maintain the vertical screen direction and generate screen configuration information indicating the horizontal screen direction, based on the screen display direction corresponding to the current device placement direction detected by the system and the screen size information corresponding to the current display direction. That is, the process of determining whether the current display direction is the vertical screen direction and determining whether to switch to the horizontal screen direction for full-screen display involved in embodiment 1 is implemented in one judgment step.
  • Figure 11 shows an interaction process of another full-screen display method according to an embodiment of the present application. It can be understood that the interaction process shown in Figure 11 involves the interaction between the video application 610, the Activity management module 621 and the device direction management module 623 shown in Figure 6 above.
  • the interaction process may include the following steps:
  • the video application 610 receives a user instruction to perform a full-screen display operation.
  • the video application 610 sends a full-screen display request to the Activity management module 621 .
  • the Activity management module 621 notifies the device orientation management module 623 to process the received full-screen display request.
  • the device orientation management module 623 determines whether to switch to the horizontal orientation for full-screen display according to the current display orientation and the corresponding aspect ratio. If the determination result is yes, the following steps 1110 to 1112 may be continued to be performed to perform full-screen display in the horizontal orientation; if the determination result is no, the following steps 1105 to 1107 may be continued to be performed to perform full-screen display in the vertical orientation.
  • the device orientation management module 623 may first determine whether the current display orientation needs to be switched based on the aspect ratio corresponding to the current display orientation.
  • the aspect ratio may be, for example, the aspect ratio corresponding to the current display orientation.
  • the method for determining whether the current display orientation needs to be switched may be, for example, by comparing the aspect ratio corresponding to the current display orientation with a preset range to determine the judgment result. For example, if the preset range is [0.9, 1.1], the result of determining whether the current display orientation needs to be switched may include the following situations:
  • the aspect ratio of the current display direction is less than 0.9, it means that the screen width is less than the screen height, and the difference between the width and height is large. If it is displayed in full screen, it needs to be switched to the horizontal screen direction to obtain a better full screen experience. Therefore, in this case, the judgment result is yes, that is, it is necessary to switch to the horizontal screen direction. It can be understood that in this case, if the system detects that the electronic device is placed horizontally, the current horizontal screen direction can be displayed in full screen; if the system detects that the electronic device is placed vertically, the screen display direction of the electronic device can be switched to the horizontal screen direction. At this time, the user can rotate the electronic device to a horizontal position according to the rotation of the display content caused by the rotation of the display direction.
  • step 1105 can be executed to maintain the vertical screen orientation but generate screen configuration information indicating that the screen display orientation is the horizontal screen orientation, and set the screen size information of the vertical screen orientation in the screen configuration information.
  • the system detects that the electronic device is placed horizontally, the screen display direction of the electronic device has been switched to the horizontal direction, and the current horizontal direction can be maintained for full screen display.
  • the judgment result may be yes, and the following step 1110 is executed.
  • the user sets the system to vertical or horizontal, and the setting is followed [0.9,1.1]
  • step 1105 If the aspect ratio of the current display direction is greater than 1.1, it indicates that the screen width is greater than the screen height and the difference between the width and height is large. In this case, if the system detects that the electronic device is placed vertically, the screen display direction should be kept in the vertical direction. If the judgment result is no, the following step 1105 needs to be executed to keep the vertical direction but generate a screen configuration indicating that the screen display direction is the horizontal direction. Information, and set the screen size information in the vertical direction at this time in the screen configuration information.
  • the judgment result can be yes, and the following step 1110 is executed to control the screen display direction to switch to the horizontal direction, and generate screen configuration information indicating that the screen display direction has been switched to the horizontal direction, and perform full-screen display in the horizontal direction.
  • the upper limit value and the lower limit value of the above preset range may also be other values.
  • the preset range may also be [0.8, 1], etc., which is not limited here.
  • the device orientation management module 623 controls the screen display orientation to maintain the vertical orientation, and calls the config management module 622 to generate screen configuration information indicating that the current display orientation is the horizontal orientation.
  • step 1105 The execution process of this step 1105 is the same as the execution content corresponding to step 706 in the process shown in Figure 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 706, which will not be repeated here.
  • the device orientation management module 623 feeds back the generated screen configuration information to the video application 610 .
  • step 1106 is the same as the execution content corresponding to step 707 in the process shown in FIG. 7 in the above embodiment 1.
  • step 707 the relevant description in the above step 707, which will not be repeated here.
  • the video application 610 performs full-screen display in the vertical direction based on the received screen configuration information.
  • step 1107 is the same as the execution content corresponding to step 708 in the process shown in FIG. 7 in the above embodiment 1.
  • step 708 The execution process of step 1107 is the same as the execution content corresponding to step 708 in the process shown in FIG. 7 in the above embodiment 1.
  • step 708 please refer to the relevant description in the above step 708, which will not be repeated here.
  • the video application 610 receives an operation from the user to rotate the device or fold the screen.
  • step 1108 is the same as the execution content corresponding to step 709 in the process shown in FIG. 7 in the above embodiment 1.
  • step 709 the relevant description in the above step 709, which will not be repeated here.
  • the video application 610 notifies the device direction management module 623 through the Activity management module 621 to process the request to switch the display direction.
  • step 1109 is the same as the execution content corresponding to step 710 in the process shown in FIG. 7 in the above embodiment 1.
  • the execution process of step 1109 is the same as the execution content corresponding to step 710 in the process shown in FIG. 7 in the above embodiment 1.
  • the device orientation management module 623 controls the screen display orientation to switch to the horizontal orientation, and calls the config management module 622 to generate screen configuration information indicating that the screen display orientation has switched to the horizontal orientation.
  • step 1110 The execution process of this step 1110 is the same as the execution content corresponding to step 711 in the process shown in Figure 7 in the above embodiment 1. For details, please refer to the relevant description of the above step 711, which will not be repeated here.
  • the device orientation management module 623 feeds back the updated screen configuration information to the video application 610 .
  • step 1111 is the same as the execution content corresponding to step 712 in the process shown in FIG. 7 in the above embodiment 1.
  • step 712 the relevant description in the above step 712, which will not be repeated here.
  • the video application 610 performs full-screen display in the horizontal direction based on the updated screen configuration information.
  • step 1112 is the same as the execution content corresponding to step 713 in the process shown in FIG. 7 in the above embodiment 1.
  • step 713 the relevant description in the above step 713, which will not be repeated here.
  • the full-screen display method provided in the embodiment of the present application can maintain the vertical screen orientation for full-screen display without relying on whether the vertical screen display resources of the application are adapted to the full-screen layout parameters through the interaction between various software structures in the system of the electronic device 100.
  • the electronic device based on the solution of the present application can also freely switch to the horizontal screen orientation indicated by the user's operation for full-screen display. In this way, the user can get a better full-screen experience in both the vertical screen orientation or the horizontal screen orientation of the electronic device.
  • FIG12 shows an implementation process of a full-screen display method according to an embodiment of the present application. It can be understood that the execution subject of each step of the process shown in FIG12 can be the electronic device 100. To simplify the description, when introducing the execution process of each step of the process shown in FIG12 below, the execution subject of each step will not be repeatedly introduced.
  • the operation of the user instructing to perform full-screen display may refer to the relevant description in the above step 1101, which will not be described in detail here.
  • the process of the electronic device 100 determining whether to switch to the horizontal screen orientation for full-screen display may refer to the relevant description in the above step 1104 and will not be elaborated here.
  • the process of the electronic device 100 generating screen configuration information for full-screen display in the portrait orientation may refer to the relevant description in the above step 1105, which will not be described in detail here.
  • the process of the electronic device 100 performing full-screen display in the vertical direction based on the screen configuration information can refer to the relevant descriptions in the above steps 1106 to 1107, which will not be repeated here.
  • the operation of the user rotating the device placement direction or folding the screen can refer to the relevant description in the above step 1108, which will not be repeated here.
  • the process of the electronic device 100 generating the second display information for full-screen display in the horizontal orientation may refer to the relevant description in the above step 1110, which will not be described in detail here.
  • the process of the electronic device 100 performing full-screen display in the horizontal direction based on the default screen configuration information corresponding to the horizontal direction can refer to the relevant description in the above steps 1111 to 1112, which will not be repeated here.
  • the embodiment of the present application introduces a specific implementation process of a full-screen display method, in which the process of determining whether the current display direction is a portrait orientation and determining whether to switch to a landscape orientation for full-screen display involved in Example 1 can be implemented in one judgment step.
  • the process of determining whether the current display direction is a portrait orientation and determining whether to switch to a landscape orientation for full-screen display involved in Example 1 can be implemented in one judgment step.
  • it can be directly determined whether to switch to a landscape orientation for full-screen display, or it can be determined whether to maintain the portrait orientation and generate screen configuration information indicating the landscape orientation.
  • It only includes one judgment step that is, the process of determining whether to switch to a landscape orientation for full-screen display based on the aspect ratio of the current display direction. In this way, whether to switch to a landscape orientation for full-screen display is directly determined based on the aspect ratio of the current screen, which simplifies the judgment process and helps to improve the execution efficiency of the electronic device.
  • FIG. 13 shows a hardware structure of an electronic device 100 according to an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
  • the processor 110 can control the execution of each step of the full-screen display method provided in the embodiment of the present application through a controller to implement a full-screen display process in a vertical or horizontal direction according to actual needs of the user.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple groups of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100.
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input via a wireless charging coil of the electronic device 100 .
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the wireless communication module 160 can provide wireless communication solutions for application in the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
  • WLAN wireless local area networks
  • Wi-Fi wireless fidelity
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • IR infrared technology
  • antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light emitting diodes (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device 100 can implement the video playback function through a video codec, a GPU, a display screen 194 and an application processor.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
  • the internal memory 121 can be used to store computer executable program codes, which include instructions.
  • the internal memory 121 can include a program storage area and a data storage area.
  • the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (universal flash storage, UFS), etc.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
  • the speaker 170A also called a "speaker" is used to convert an audio electrical signal into a sound signal.
  • the electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
  • the receiver 170B also called a "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be received by placing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C.
  • the electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
  • the earphone interface 170D is used to connect a wired earphone.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A can be set on the display screen 194.
  • the capacitive pressure sensor can be a parallel plate including at least two conductive materials.
  • the electronic device 100 determines the intensity of the pressure based on the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the full-screen display control on the video playback interface, an instruction for full-screen display is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold, or a touch operation with a touch operation time greater than a preset time length acts on the video playback interface, a fast-forward playback instruction may be executed.
  • the gyro sensor 180B may be used to determine the motion posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B may be determined by the gyro sensor 180B.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
  • the touch sensor 180K is also called a "touch control device”.
  • the touch sensor 180K can be set on the display screen 194.
  • the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor may transmit the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation may be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, at a different location from the display screen 194.
  • the key 190 includes a power key, a volume key, etc.
  • the key 190 may be a mechanical key or a touch key.
  • the electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
  • Motor 191 can generate vibration prompts.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be connected to or disconnected from the electronic device 100 by inserting the SIM card into or removing the SIM card from the SIM card interface 195 .
  • FIG. 14 shows a system architecture of an electronic device 100 according to an embodiment of the present application.
  • the system architecture of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100 system.
  • the layered architecture divides the software into several layers, each with clear roles and division of labor.
  • the layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer may include a series of application packages.
  • the application packages may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window management services, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • the window management service is used to manage window programs.
  • the window management service can obtain the display size, determine the aspect ratio corresponding to full-screen display, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
  • the view system can be used to build applications.
  • a display interface can be composed of one or more views.
  • a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
  • the phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
  • the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
  • Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • functional modules such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
  • the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, graphics Like rendering, compositing, and layer handling.
  • a 2D graphics engine is a drawing engine for 2D drawings.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the following is an example of the workflow of the software and hardware of the electronic device 100, with reference to a scenario in which a user clicks on a full-screen display control to trigger full-screen display.
  • the corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information).
  • the raw input event is stored in the kernel layer.
  • the application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.
  • references to "one embodiment” or “an embodiment” in the specification mean that the specific features, structures, or characteristics described in conjunction with the embodiment are included in at least one exemplary implementation or technology disclosed according to the embodiment of the present application.
  • the appearance of the phrase “in one embodiment” in various places in the specification does not necessarily all refer to the same embodiment.
  • the disclosure of the embodiment of the present application also relates to an operating device for executing the text.
  • the device can be specially constructed for the required purpose or it can include a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer.
  • a computer program can be stored in a computer-readable medium, such as, but not limited to any type of disk, including a floppy disk, an optical disk, a CD-ROM, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic or optical card, an application-specific integrated circuit (ASIC) or any type of medium suitable for storing electronic instructions, and each can be coupled to a computer system bus.
  • the computer mentioned in the specification may include a single processor or may be an architecture involving multiple processors for increased computing power.

Abstract

The present application relates to the technical field of computers, in particular relates to a full-screen display method, an electronic device and a computer-readable storage medium. The method comprises: receiving a first user operation, the first user operation being used for instructing displaying in a full-screen mode a display window of a first application; confirming the current placement direction of an electronic device being the portrait direction and the screen aspect ratio satisfying a first condition; and displaying in a full-screen mode a first full-screen window of the first application in the current placement direction, loading in the first full-screen window a landscape display resource of the first application, and adapting the window aspect ratio of the first full-screen window to the screen aspect ratio corresponding to the portrait direction. The solution of the present application can also achieve full-screen display in the current portrait direction without changing by rotation the placement direction of an electronic device, such that the requirement of users watching the content displayed in the full-screen mode is satisfied without the need to rotate the electronic device by users, thereby simplifying the operation of users, and further helping to improve the use experience of users.

Description

全屏显示方法、电子设备及计算机可读存储介质Full-screen display method, electronic device, and computer-readable storage medium
本申请要求于2022年10月19日提交中国专利局、申请号为202211281948.X、申请名称为“全屏显示方法、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on October 19, 2022, with application number 202211281948.X and application name “Full-screen display method, electronic device and computer-readable storage medium”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本发明涉及计算机技术领域,具体涉及一种全屏显示方法、电子设备及计算机可读存储介质。The present invention relates to the field of computer technology, and in particular to a full-screen display method, electronic equipment and a computer-readable storage medium.
背景技术Background technique
随着电子技术的发展,越来越多的业务可以通过手机、平板等便携式电子设备进行处理,电子设备上可使用的应用程序(application,APP)也越来越多。通常情况下,用户会在电子设备竖向放置时使用电子设备上安装的应用程序,而在一些使用场景中,用户可能会需要将应用程序的一些界面进行全屏显示。因此,目前许多应用程序在开发时会在相应的显示资源中适配一些全屏布局参数,例如在横屏显示资源中配置区别于非全屏布局参数的全屏布局参数,以给用户带来较好的全屏体验。With the development of electronic technology, more and more businesses can be processed through portable electronic devices such as mobile phones and tablets, and there are more and more applications (applications, APPs) available on electronic devices. Usually, users will use applications installed on electronic devices when the electronic devices are placed vertically, and in some usage scenarios, users may need to display some interfaces of the application in full screen. Therefore, many applications currently adapt some full-screen layout parameters in the corresponding display resources during development, such as configuring full-screen layout parameters that are different from non-full-screen layout parameters in horizontal display resources to give users a better full-screen experience.
例如用户在观看视频时,可能会点击视频播放界面上的全屏显示控件,然后旋转手机等电子设备至横屏方向,以获得沉浸式全屏体验。这是由于,通常情况下,手机等电子设备进行全屏显示的默认方向是横屏方向。For example, when watching a video, a user may click the full-screen display control on the video playback interface, and then rotate the mobile phone or other electronic device to the horizontal screen orientation to obtain an immersive full-screen experience. This is because, usually, the default orientation of full-screen display of mobile phones and other electronic devices is the horizontal screen orientation.
然而,当一些电子设备的屏幕的宽度与高度之间差异较小,例如平板电脑、或者折叠屏手机在展开态下,屏幕的宽高比可能接近于1:1的情况下,该电子设备在竖屏方向进行全屏显示与在横屏方向进行全屏显示,给用户的全屏体验并没有明显差别。因此,如果这类电子设备仍然默认通过横屏方向进行全屏显示,即仍需要用户在点击全屏显示控件后旋转一下电子设备到横屏方向,反而会给用户带来不好的使用体验。However, when the difference between the width and height of the screen of some electronic devices is small, such as a tablet computer or a folding screen mobile phone in the unfolded state, the aspect ratio of the screen may be close to 1:1, and the full-screen display of the electronic device in the portrait orientation and the full-screen display in the landscape orientation do not provide users with a significant difference in full-screen experience. Therefore, if such electronic devices still default to full-screen display in the landscape orientation, that is, the user is still required to rotate the electronic device to the landscape orientation after clicking the full-screen display control, it will bring a bad user experience.
发明内容Summary of the invention
有鉴于此,本申请实施例提供了一种全屏显示方法、电子设备及计算机可读存储介质,来提高用户对电子设备全屏显示的的使用体验。In view of this, embodiments of the present application provide a full-screen display method, an electronic device, and a computer-readable storage medium to improve the user experience of full-screen display of an electronic device.
第一方面,本申请实施例提供了一种全屏显示方法,应用于电子设备,该方法包括:In a first aspect, an embodiment of the present application provides a full-screen display method, which is applied to an electronic device, and the method includes:
接收到第一用户操作,第一用户操作用于指示全屏显示第一应用的显示窗口;receiving a first user operation, where the first user operation is used to instruct to display a display window of the first application in full screen;
确认电子设备当前放置方向为竖向且屏幕宽高比满足第一条件;Confirm that the current placement direction of the electronic device is vertical and the screen aspect ratio meets the first condition;
在当前放置方向全屏显示第一应用的第一全屏窗口,在第一全屏窗口中加载第一应用的横屏显示资源,并且第一全屏窗口的窗口宽高比与竖屏方向对应的屏幕宽高比相适应。A first full-screen window of the first application is displayed in full screen in the current placement direction, a horizontal screen display resource of the first application is loaded in the first full-screen window, and a window aspect ratio of the first full-screen window is adapted to a screen aspect ratio corresponding to the vertical screen direction.
即在用户指示全屏显示第一应用的显示窗口时,如果电子设备可以确定当前竖向放置并且当前放置方向对应的屏幕宽高比满足预设的第一条件,则可以保持电子设备竖向放置并显示第一应用的全屏显示窗口,即上述第一全屏窗口。其中该全屏显示窗口中对应加载的是第一应用的横屏显示资源,而相应的显示内容是布局在当前放置方向所对应的竖屏方向上进行全屏显示的。如此,可以在不转动电子设备放置方向的情况下,也能实现在当前竖屏方向上进行全屏显示,满足用户观看全屏显示的内容的需求的同时无需用户再旋转电子设备,简化了用户的操作,进而有利于提高用户的使用体验。并且,上述第一方面提供的全屏显示方法能够是适应于配置有横屏显示资源的任何应用程序,即场景适应性较强。That is, when the user instructs to display the display window of the first application in full screen, if the electronic device can determine that the current vertical placement and the screen aspect ratio corresponding to the current placement direction meet the preset first condition, the electronic device can be kept in vertical placement and display the full screen display window of the first application, that is, the above-mentioned first full screen window. Wherein the full screen display window corresponds to the horizontal screen display resources of the first application, and the corresponding display content is arranged in the vertical screen direction corresponding to the current placement direction for full screen display. In this way, full screen display can be achieved in the current vertical screen direction without rotating the placement direction of the electronic device, which meets the user's need to watch the full screen content without the user rotating the electronic device, simplifies the user's operation, and is conducive to improving the user's experience. In addition, the full screen display method provided in the above first aspect can be adapted to any application configured with horizontal screen display resources, that is, it has strong scene adaptability.
上述第一应用例如可以是视频应用、办公应用、阅读应用等需要全屏显示某个播放窗口来实现沉浸式视觉体验的应用程序。该第一应用对应配置的显示资源可以包括横屏显示资源,用于适应横屏方向对应的屏幕宽高比布局显示内容,还可以包括竖屏显示资源,用于适应竖屏方向对应的屏幕宽高比布局显示内容。上述第一用户操作例如可以是用户在视频应用的视频播放界面或者视频播放窗口中点击全屏显示控件的操作等,在此不做限制。The first application may be, for example, a video application, an office application, a reading application, or other application that requires a full-screen display of a playback window to achieve an immersive visual experience. The display resources configured for the first application may include a horizontal display resource for displaying content in a layout that adapts to the screen aspect ratio corresponding to the horizontal orientation, and may also include a vertical display resource for displaying content in a layout that adapts to the screen aspect ratio corresponding to the vertical orientation. The first user operation may be, for example, an operation in which a user clicks on a full-screen display control in a video playback interface or video playback window of a video application, and is not limited here.
可以理解,上述第一全屏窗口的窗口宽高比与竖屏方向对应的屏幕宽高比相适应是指,第一全屏窗口的窗口宽度(水平边)与窗口高度(竖直边)的比值、与电子设备的屏幕显示方向为竖屏方向时对应的屏幕宽度(水平边)与屏幕高度(竖直边)的比值相等。并且,该第一全屏窗口可以是电子设备全屏显示的窗口,相应地该第一全屏窗口的窗口宽度、窗口高度分别可以与竖屏方向对应的屏幕宽度、屏幕 高度相等。It can be understood that the window aspect ratio of the first full-screen window is adapted to the screen aspect ratio corresponding to the portrait orientation, which means that the ratio of the window width (horizontal side) to the window height (vertical side) of the first full-screen window is equal to the ratio of the screen width (horizontal side) to the screen height (vertical side) when the screen display orientation of the electronic device is portrait orientation. In addition, the first full-screen window can be a window displayed in full screen by the electronic device, and accordingly, the window width and window height of the first full-screen window can be respectively the screen width and screen height corresponding to the portrait orientation. Equal height.
可以理解,上述第一全屏窗口的全部显示区域例如可以用于显示正在播放的视频内容,该全屏窗口中显示视频内容之余的其他区域还可以显示一些随视频播放进度一同更新的其他内容,例如随视频播放进度一起播放的弹幕、进度条以及一些用于控制播放进度和速度的操作控件等。It can be understood that the entire display area of the above-mentioned first full-screen window can be used to display the video content being played, for example. In addition to displaying the video content, other areas in the full-screen window can also display some other content that is updated together with the progress of video playback, such as barrage and progress bars played together with the progress of video playback, and some operating controls for controlling the playback progress and speed.
在另一些实施例中,上述第一全屏窗口也可以是悬浮显示在另一应用的窗口之上的小窗窗口等,相应地该第一全屏窗口的窗口宽度小于竖屏方向对应的屏幕宽度、窗口高度小于屏幕高度,但是该第一全屏窗口的宽高比与竖屏方向对应的屏幕宽高比保持相等。在此不做限制。In other embodiments, the first full-screen window may also be a small window that is displayed floating on top of another application window, and accordingly, the window width of the first full-screen window is smaller than the screen width corresponding to the portrait orientation, and the window height is smaller than the screen height, but the aspect ratio of the first full-screen window remains equal to the screen aspect ratio corresponding to the portrait orientation. This is not limited here.
在上述第一方面的一种可能的实现中,在第一全屏窗口中加载第一应用的横屏显示资源,包括:基于第一应用的横屏显示资源下配置的全屏布局参数加载横屏显示资源。In a possible implementation of the first aspect, loading the horizontal screen display resource of the first application in the first full screen window includes: loading the horizontal screen display resource based on the full screen layout parameters configured under the horizontal screen display resource of the first application.
可以理解,应用程序为适应电子设备的横屏方向以及竖屏方向对应的屏幕宽高比,通常会配置相应的横屏显示资源及竖屏显示资源。另外,这些应用程序为了适应用户全屏观看视频或者全屏观看幻灯片等全屏显示一些内容的需求,通常还会在横屏显示资源下对应配置非全屏布局参数和全屏布局参数,其中的全屏布局参数是用于控制布局第一应用的全屏窗口,即上述第一全屏窗口。而非全屏布局参数则用于控制布局该应用的非全屏窗口。It is understandable that in order to adapt to the screen aspect ratio corresponding to the horizontal and vertical orientations of the electronic device, the application usually configures the corresponding horizontal and vertical display resources. In addition, in order to meet the needs of users to display some content in full screen, such as watching videos or slides in full screen, these applications usually also configure non-full screen layout parameters and full screen layout parameters under the horizontal display resources. The full screen layout parameters are used to control the layout of the full screen window of the first application, that is, the first full screen window mentioned above. The non-full screen layout parameters are used to control the layout of the non-full screen window of the application.
如上,基于全屏布局参数加载的横屏显示资源,可以包括能够适应横屏方向对应的屏幕宽高比的横屏布局资源、横屏位置资源以及横屏图片资源等。该横屏显示资源与非全屏布局参数对应加载的横屏显示资源对应控制的文字、图标等界面元素的布局样式、布局位置以及图片大小等,均会有所差异。在此不做赘述。As mentioned above, the horizontal screen display resources loaded based on the full screen layout parameters may include horizontal screen layout resources, horizontal screen position resources, and horizontal screen image resources that can adapt to the screen aspect ratio corresponding to the horizontal screen orientation. The layout style, layout position, and image size of the interface elements such as text and icons controlled by the horizontal screen display resources and the horizontal screen display resources loaded corresponding to the non-full screen layout parameters will be different. I will not elaborate on this here.
在上述第一方面的一种可能的实现中,第一应用的竖屏显示资源未配置全屏布局参数。In a possible implementation of the first aspect above, the vertical screen display resource of the first application is not configured with a full-screen layout parameter.
即第一应用对应配置的竖屏显示资源中可以不需要配置全屏布局参数。可以理解,有些应用程序为了适应一些屏幕宽高比较为接近的电子设备在竖屏方向上全屏显示一些界面的需求,可以在开发时对应在竖屏显示资源下配置全屏布局参数,而大多应用仅会在竖屏显示资源下配置非全屏布局参数。对于未配置全屏布局参数的应用程序,则可以适用于上述第一方面提供的全屏显示方法,实现在竖屏方向上进行全屏显示,无需增加应用开发成本。也就是说,上述第一方面提供的全屏显示方法则可以适用于竖屏显示资源下未配置全屏布局参数的应用程序。That is, there is no need to configure full-screen layout parameters in the vertical screen display resources configured corresponding to the first application. It can be understood that in order to adapt to the needs of some electronic devices with similar screen width and height to display some interfaces in full screen in the vertical direction, some applications can configure full-screen layout parameters under the vertical screen display resources during development, while most applications will only configure non-full-screen layout parameters under the vertical screen display resources. For applications that are not configured with full-screen layout parameters, the full-screen display method provided in the first aspect above can be applied to achieve full-screen display in the vertical direction without increasing the application development cost. In other words, the full-screen display method provided in the first aspect above can be applied to applications that are not configured with full-screen layout parameters under the vertical screen display resources.
在上述第一方面的一种可能的实现中,第一条件为:竖屏方向对应的屏幕宽高比在第一预设范围内。In a possible implementation of the first aspect above, the first condition is: a screen aspect ratio corresponding to the vertical screen orientation is within a first preset range.
例如,上述第一预设范围可以是对应于竖屏方向预设的[0.9,1],即竖屏方向对应的屏幕宽高比在该第一预设范围内时,表明该电子设备的屏幕宽高较为接近,在竖屏方向上进行全屏显示有利于提高用户体验。For example, the first preset range may correspond to the preset [0.9, 1] for the portrait orientation. That is, when the screen aspect ratio corresponding to the portrait orientation is within the first preset range, it indicates that the screen width and height of the electronic device are close, and full-screen display in the portrait orientation is conducive to improving user experience.
可以理解,在另一些实施例中,上述第一预设范围还可以表示为上限阈值和下限阈值,例如对应于竖屏方向的屏幕宽高比预设的上限阈值可以为1,下限阈值可以为0.9。当屏幕宽高比大于0.9而小于1时,则可以认为在上述第一预设范围内,即满足上述第一条件。在此不做限制。It can be understood that in other embodiments, the first preset range can also be expressed as an upper threshold and a lower threshold. For example, the upper threshold corresponding to the screen aspect ratio in the vertical screen direction can be 1, and the lower threshold can be 0.9. When the screen aspect ratio is greater than 0.9 and less than 1, it can be considered to be within the first preset range, that is, the first condition is met. This is not limited here.
在上述第一方面的一种可能的实现中,在当前放置方向全屏显示第一应用的第一全屏窗口,包括:响应于第一应用申请切换至横屏方向的第一请求,控制屏幕显示方向保持为竖屏方向,并向第一应用发送第一屏幕配置信息,其中第一屏幕配置信息包括指示电子设备的屏幕显示方向为横屏方向的第一信息、以及指示竖屏方向对应的屏幕宽高比的第二信息。In a possible implementation of the first aspect above, a first full-screen window of a first application is displayed in full screen in the current placement orientation, including: in response to a first request from the first application to switch to a horizontal screen orientation, controlling the screen display orientation to remain in a vertical screen orientation, and sending first screen configuration information to the first application, wherein the first screen configuration information includes first information indicating that the screen display orientation of the electronic device is a horizontal screen orientation, and second information indicating the screen aspect ratio corresponding to the vertical screen orientation.
即第一应用在接收到用户指示全屏显示的操作(例如上述第一用户操作)时,可以默认向系统发送一个申请将屏幕显示方向切换至横屏方向的请求,例如上述第一请求。而电子设备的系统在接收到该第一请求时,如果确认电子设备当前放置方向为竖向且屏幕宽高比满足第一条件,可以控制将屏幕显示方向保持为当前的竖屏方向,但可以向第一应用反馈指示屏幕显示方向已经切换至横屏方向的屏幕配置信息,即上述第一屏幕配置信息。该屏幕配置信息至少可以包括两部分的信息,即上述指示屏幕显示方向为横屏方向(或者说已经切换至横屏方向)的第一信息、以及指示竖屏方向对应的屏幕宽高比的第二信息。如此,第一应用便可以基于系统反馈的屏幕配置信息,加载横屏显示资源,并在当前的竖屏方向上进行全屏显示,即显示上述第一应用的第一全屏窗口。That is, when the first application receives an operation instructing the user to display in full screen (such as the above-mentioned first user operation), it can send a request to the system by default to switch the screen display direction to the horizontal screen direction, such as the above-mentioned first request. When the system of the electronic device receives the first request, if it is confirmed that the current placement direction of the electronic device is vertical and the screen aspect ratio meets the first condition, it can control the screen display direction to remain in the current vertical screen direction, but can feedback to the first application the screen configuration information indicating that the screen display direction has been switched to the horizontal screen direction, that is, the above-mentioned first screen configuration information. The screen configuration information may include at least two parts of information, namely, the above-mentioned first information indicating that the screen display direction is the horizontal screen direction (or has been switched to the horizontal screen direction), and the second information indicating the screen aspect ratio corresponding to the vertical screen direction. In this way, the first application can load the horizontal screen display resource based on the screen configuration information fed back by the system, and perform full screen display in the current vertical screen direction, that is, display the first full screen window of the above-mentioned first application.
在上述第一方面的一种可能的实现中,控制屏幕显示方向保持为竖屏方向,并向第一应用发送第一屏幕配置信息,包括:生成竖屏方向对应的第二屏幕配置信息,其中第一屏幕配置信息包括指示电子设备的屏幕显示方向为竖屏方向的第三信息、以及指示竖屏方向对应的屏幕宽高比的第四信息;将第二屏 幕配置信息中的第三信息修改为第一信息,生成第一屏幕配置信息。In a possible implementation of the first aspect, controlling the screen display direction to remain in the portrait direction and sending the first screen configuration information to the first application includes: generating second screen configuration information corresponding to the portrait direction, wherein the first screen configuration information includes third information indicating that the screen display direction of the electronic device is the portrait direction, and fourth information indicating the screen aspect ratio corresponding to the portrait direction; The third information in the screen configuration information is modified into the first information to generate the first screen configuration information.
即系统在响应第一应用发来的申请切换至横屏方向的请求时,生成向第一应用反馈的指示屏幕显示方向已经切换至横屏方向的屏幕配置信息的过程例如可以是:先基于当前的竖屏方向生成默认的指示当前屏幕显示方向为竖屏方向的屏幕配置信息,例如上述第二屏幕配置信息。然后,再将该第二屏幕配置信息中指示当前屏幕显示方向为竖屏方向的第三信息修改为上述指示当前屏幕显示方向为横屏方向的第一信息,而保持该第二屏幕配置信息中指示竖屏方向对应的屏幕宽高比的第四信息不变,或者说将该第四信息作为上述第二信息,即可生成上述第一屏幕配置信息。That is, when the system responds to the request from the first application to switch to the landscape orientation, the process of generating the screen configuration information indicating that the screen display orientation has switched to the landscape orientation and feeding it back to the first application may be, for example: firstly, based on the current portrait orientation, generate the default screen configuration information indicating that the current screen display orientation is the portrait orientation, such as the second screen configuration information mentioned above. Then, the third information indicating that the current screen display orientation is the portrait orientation in the second screen configuration information is modified to the first information indicating that the current screen display orientation is the landscape orientation, while the fourth information indicating the screen aspect ratio corresponding to the portrait orientation in the second screen configuration information is kept unchanged, or the fourth information is used as the second information mentioned above, so as to generate the first screen configuration information mentioned above.
在上述第一方面的一种可能的实现中,在当前放置方向全屏显示第一应用的第一全屏窗口,包括:根据第一屏幕配置信息中的第一信息,第一应用基于横屏显示资源下的全局布局参数加载横屏显示资源;根据第一屏幕配置信息中的第二信息,在当前的竖屏方向上布局并显示第一全屏窗口。In a possible implementation of the first aspect above, the first full-screen window of the first application is displayed in full screen in the current placement direction, including: according to the first information in the first screen configuration information, the first application loads the horizontal screen display resource based on the global layout parameters under the horizontal screen display resource; according to the second information in the first screen configuration information, the first full-screen window is laid out and displayed in the current vertical screen direction.
即第一屏幕配置信息中指示当前屏幕显示方向为横屏方向的第一信息,可以用于指示第一应用根据横屏显示资源下的全局布局参数加载横屏显示资源。而第一屏幕配置信息中指示竖屏方向对应的屏幕宽高比的第二信息,即指示当前竖屏方向对应的屏幕尺寸的信息,可以用于指示第一应用适应该竖屏方向对应的屏幕宽高比布局相应待显示的内容,显示上述第一全屏窗口。That is, the first information in the first screen configuration information indicating that the current screen display direction is the horizontal screen direction can be used to instruct the first application to load the horizontal screen display resource according to the global layout parameters under the horizontal screen display resource. The second information in the first screen configuration information indicating the screen aspect ratio corresponding to the vertical screen direction, that is, the information indicating the screen size corresponding to the current vertical screen direction, can be used to instruct the first application to adapt to the screen aspect ratio corresponding to the vertical screen direction to layout the corresponding content to be displayed, and display the above-mentioned first full-screen window.
在上述第一方面的一种可能的实现中,第一屏幕配置信息、第二屏幕配置信息以及第三屏幕配置信息为config信息。In a possible implementation of the first aspect above, the first screen configuration information, the second screen configuration information, and the third screen configuration information are config information.
在上述第一方面的一种可能的实现中,在保持电子设备竖向放置的情况下,方法还包括:检测到电子设备的放置方向切换为横向;控制屏幕显示方向切换至横屏方向,在切换后的横屏方向上显示第一应用的第二全屏窗口,并在第二全屏窗口中加载横屏显示资源,并且第二全屏窗口的窗口宽高比与横屏方向对应的屏幕宽高比相适应。In a possible implementation of the first aspect above, while keeping the electronic device placed vertically, the method also includes: detecting that the placement orientation of the electronic device is switched to horizontal; controlling the screen display direction to switch to horizontal, displaying a second full-screen window of the first application in the switched horizontal direction, loading horizontal display resources in the second full-screen window, and the window aspect ratio of the second full-screen window is adapted to the screen aspect ratio corresponding to the horizontal direction.
即在电子设备保持竖向放置、在竖屏方向上进行全屏显示期间,如果检测到用户将电子设备横向放置的操作,则电子设备可以控制屏幕显示方向对应切换为横屏方向,并且在该横屏方向上继续根据加载的横屏显示资源进行全屏显示。如此,可以满足用户在电子设备的不同放置方向上全屏观看视频等内容的需求。上述电子设备例如可以是屏幕宽高差异较小的平板电脑或者保持横向展开状态的折叠屏手机等,在此不做限制。That is, while the electronic device is placed vertically and in full screen display in the vertical direction, if it is detected that the user has placed the electronic device horizontally, the electronic device can control the screen display direction to switch to the horizontal direction, and continue to display the full screen in the horizontal direction according to the loaded horizontal display resources. In this way, the user's needs for watching videos and other content in full screen in different placement directions of the electronic device can be met. The above-mentioned electronic device can be, for example, a tablet computer with a small difference in screen width and height, or a folding screen mobile phone that remains in a horizontally unfolded state, etc., which is not limited here.
可以理解,电子设备在将返当前的屏幕显示方向切换至横屏方向时加载的横屏显示资源,与上述竖屏方向下对应加载的横屏显示资源,可以均指示的是相应应用(例如上述第一应用)的横屏显示资源。二者的区别可以仅在于布局的图标、文字等内容的间距不同、以及横屏图片资源的大小不同等,在此不做限制。It can be understood that the horizontal screen display resources loaded by the electronic device when switching the current screen display direction to the horizontal screen direction and the horizontal screen display resources loaded corresponding to the vertical screen direction can both indicate the horizontal screen display resources of the corresponding application (such as the first application). The difference between the two can only be the different spacing between the icons, texts and other contents of the layout, and the different sizes of the horizontal screen picture resources, etc., which are not limited here.
在上述第一方面的一种可能的实现中,电子设备为展开状态下的第一折叠屏设备,第一折叠屏设备在折叠状态下的屏幕宽高比不满足第一条件,并且,方法还包括:检测到将第一折叠屏设备从展开状态切换为折叠状态的折叠操作;控制屏幕显示方向切换至折叠状态下的横屏方向,在折叠状态下的横屏方向上显示第一应用的第三全屏窗口,并在第三全屏窗口中加载横屏显示资源,并且第三全屏窗口的窗口宽高比与第一折叠屏设备在折叠状态下的横屏方向对应的屏幕宽高比相适应。In a possible implementation of the first aspect above, the electronic device is a first folding screen device in an unfolded state, the screen aspect ratio of the first folding screen device in the folded state does not meet the first condition, and the method also includes: detecting a folding operation to switch the first folding screen device from an unfolded state to a folded state; controlling the screen display direction to switch to a horizontal screen direction in the folded state, displaying a third full-screen window of the first application in the horizontal screen direction in the folded state, and loading a horizontal screen display resource in the third full-screen window, and the window aspect ratio of the third full-screen window is adapted to the screen aspect ratio corresponding to the horizontal screen direction of the first folding screen device in the folded state.
例如,上述第一折叠屏设备可以是支持横向展开屏幕的折叠屏手机,该折叠屏手机从屏幕展开状态下的竖屏方向切换至竖屏状态的过程,例如可以参考下文图9b所示的折叠过程,折叠屏幕后该折叠屏手机的屏幕宽高比差异较大,因此为了给用户带来更好的全屏体验,可以控制在折叠状态下的横屏方向上进行全屏显示。For example, the above-mentioned first folding screen device can be a folding screen mobile phone that supports horizontally unfolding the screen. The process of the folding screen mobile phone switching from the vertical screen orientation in the unfolded state to the vertical screen state can, for example, refer to the folding process shown in Figure 9b below. After folding the screen, the screen aspect ratio of the folding screen mobile phone is greatly different. Therefore, in order to bring a better full-screen experience to the user, the full-screen display can be controlled in the horizontal screen direction in the folded state.
在上述第一方面的一种可能的实现中,电子设备为折叠状态下的第二折叠屏设备,第二折叠屏设备在展开状态下的屏幕宽高比不满足第一条件,并且,方法还包括:检测到将第二折叠屏设备从折叠状态切换为展开状态的展开操作;控制屏幕显示方向切换至展开状态下的横屏方向,并在展开状态下的横屏方向上显示第一应用的第四全屏窗口,并在第四全屏窗口中加载横屏显示资源,并且第四全屏窗口的窗口宽高比与第二折叠屏设备在展开状态下的横屏方向对应的屏幕宽高比相适应。In a possible implementation of the first aspect above, the electronic device is a second folding screen device in a folded state, and the screen aspect ratio of the second folding screen device in the expanded state does not meet the first condition, and the method also includes: detecting an expanding operation to switch the second folding screen device from a folded state to an expanded state; controlling the screen display direction to switch to a horizontal screen direction in the expanded state, and displaying a fourth full-screen window of the first application in the horizontal screen direction in the expanded state, and loading a horizontal screen display resource in the fourth full-screen window, and the window aspect ratio of the fourth full-screen window is adapted to the screen aspect ratio corresponding to the horizontal screen direction of the second folding screen device in the expanded state.
例如,上述第一折叠屏设备可以是支持竖向展开屏幕的折叠屏手机,该折叠屏手机的折叠状态下的竖屏方向和横屏方向可以参考下文中图2c所示,在此不做赘述。因此,上述第二折叠屏设备从折叠状态切换为展开状态的展开操作,即将该折叠屏手机从图2c所示的折叠状态展开屏幕的操作。展开屏幕后该折叠屏手机的屏幕宽高比差异较大,因此为了给用户带来更好的全屏体验,可以控制在展开状态下 的横屏方向上进行全屏显示。For example, the first folding screen device can be a folding screen mobile phone that supports vertically unfolding the screen. The vertical screen orientation and horizontal screen orientation of the folding screen mobile phone in the folded state can be referred to as shown in Figure 2c below, which will not be described here. Therefore, the unfolding operation of the second folding screen device from the folded state to the unfolded state is to unfold the screen of the folding screen mobile phone from the folded state shown in Figure 2c. After the screen is unfolded, the screen aspect ratio of the folding screen mobile phone is greatly different. Therefore, in order to bring a better full-screen experience to the user, it can be controlled in the unfolded state. Display full screen in horizontal orientation.
第二方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;一个或多个存储器;一个或多个存储器存储有一个或多个程序,当一个或者多个程序被一个或多个处理器执行时,使得电子设备执行上述第一方面以及各种可能的实现中提供的全屏显示方法。In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; one or more memories storing one or more programs, wherein when one or more programs are executed by one or more processors, the electronic device executes the full-screen display method provided in the above-mentioned first aspect and various possible implementations.
第三方面,本申请实施例提供了一种计算机可读存储介质,存储介质上存储有指令,指令在计算机上执行时使计算机执行上述第一方面以及各种可能的实现中提供的全屏显示方法。In a third aspect, an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on a computer, the computer executes the full-screen display method provided in the first aspect and various possible implementations described above.
第四方面,本申请实施例提供了计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现上述第一方面以及各种可能的实现中提供的全屏显示方法。In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program/instruction, which, when executed by a processor, implements the full-screen display method provided in the above-mentioned first aspect and various possible implementations.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1a所示为应用程序基于横屏显示资源的非全屏布局参数对应布局的非全屏界面。FIG. 1a shows a non-full-screen interface of an application program laid out corresponding to non-full-screen layout parameters based on horizontal screen display resources.
图1b所示为应用程序基于横屏显示资源的全屏布局参数对应布局的全屏显示界面。FIG. 1 b shows a full-screen display interface of an application program that is laid out according to full-screen layout parameters of a horizontal screen display resource.
图1c所示为应用程序基于竖屏显示资源的非全屏布局参数对应布局的非全屏界面。FIG. 1c shows a non-full-screen interface of an application program laid out corresponding to non-full-screen layout parameters of a vertical screen display resource.
图1d所示为应用程序基于竖屏显示资源的全屏布局参数对应布局的全屏显示界面。FIG. 1d shows a full-screen display interface of an application program based on a layout corresponding to full-screen layout parameters of a vertical screen display resource.
图2a所示为手机(不包括折叠屏手机)竖向放置时对应的竖屏方向界面、以及横向放置时对应的横屏方向界面示意图。Figure 2a shows a schematic diagram of the vertical screen interface corresponding to when the mobile phone (excluding foldable screen mobile phones) is placed vertically, and the horizontal screen interface corresponding to when it is placed horizontally.
图2b所示为支持横向展开屏幕的折叠屏手机在屏幕展开状态下竖向放置时对应的竖屏方向界面、以及横向放置时对应的横屏方向界面示意图。Figure 2b shows a schematic diagram of the vertical screen interface corresponding to when a folding screen mobile phone that supports horizontal screen expansion is placed vertically in the screen expansion state, and the horizontal screen interface corresponding to when it is placed horizontally.
图2c支持竖向折叠屏幕的折叠屏手机在屏幕折叠状态下竖向放置时对应的竖屏方向界面、以及横向放置时对应的横屏方向界面示意图。Figure 2c is a schematic diagram of the vertical screen interface corresponding to when a foldable screen mobile phone that supports vertical folding screen is placed vertically in the folded state, and the horizontal screen interface corresponding to when it is placed horizontally.
图3所示为本申请实施例提供的一种全屏显示方法的应用场景示意图。FIG3 is a schematic diagram showing an application scenario of a full-screen display method provided in an embodiment of the present application.
图4所示为现有技术的一种全屏显示方案对应实现的视频播放界面示意图。FIG. 4 is a schematic diagram of a video playback interface corresponding to a full-screen display solution in the prior art.
图5所示为本申请实施例提供的全屏显示方法所实现的全屏显示过程示意图。FIG5 is a schematic diagram showing a full-screen display process implemented by the full-screen display method provided in an embodiment of the present application.
图6本申请实施例提供的一种全屏显示方法在电子设备100的系统中实施所基于的软件结构。FIG6 shows a software structure based on which a full-screen display method provided in an embodiment of the present application is implemented in the system of the electronic device 100 .
图7所示为本申请实施例1提供的一种全屏显示方法的交互流程。FIG. 7 shows an interactive process of a full-screen display method provided in Example 1 of the present application.
图8a所示为本申请实施例1提供的一种电子设备检测到用户指示进行全屏显示的操作对应显示的界面变化。FIG8 a shows the interface changes corresponding to the operation of full-screen display detected by an electronic device provided in Embodiment 1 of the present application.
图8b所示为本申请实施例1提供的一种电子设备检测到用户指示退出全屏显示的操作对应显示的界面变化。FIG8b shows the interface changes corresponding to an operation in which an electronic device provided in Embodiment 1 of the present application detects a user's instruction to exit full-screen display.
图9a所示为本申请实施例1提供的一种电子设备检测到用户旋转设备放置方向的操作对应显示的界面变化。FIG9 a shows the interface changes displayed when an electronic device detects a user's operation of rotating the device in an orientation provided by Embodiment 1 of the present application.
图9b所示为本申请实施例1提供的一种电子设备检测到用户折叠屏幕的操作对应显示的界面变化。FIG9 b shows the interface changes displayed when an electronic device provided in Embodiment 1 of the present application detects a user's operation of folding the screen.
图10所示为本申请实施例1提供的一种全屏显示方法的实施流程。FIG10 shows an implementation process of a full-screen display method provided in Example 1 of the present application.
图11所示为本申请实施例2提供的一种全屏显示方法的交互流程。FIG11 shows an interactive process of a full-screen display method provided in Example 2 of the present application.
图12所示为本申请实施例2提供的一种全屏显示方法的实施流程。FIG. 12 shows an implementation process of a full-screen display method provided in Example 2 of the present application.
图13所示为本申请实施例提供的一种电子设备100的硬件结构。FIG. 13 shows the hardware structure of an electronic device 100 provided in an embodiment of the present application.
图14所示为本申请实施例提供的一种电子设备100的软件结构框图。FIG. 14 is a software structure block diagram of an electronic device 100 provided in an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合说明书附图以及具体的实施方式对本申请实施例中的技术方案进行详细的说明。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
为了便于本领域技术人员理解本申请实施例中的方案,下面先对本申请实施例涉及到的一些概念和术语进行解释说明。In order to facilitate those skilled in the art to understand the solutions in the embodiments of the present application, some concepts and terms involved in the embodiments of the present application are explained below.
(1)横屏显示资源,是指在电子设备的放置方向上,与窗口宽度大于窗口高度的应用界面显示窗口相匹配的显示资源。具体可以包括横屏布局资源、横屏位置资源以及横屏图片资源等。例如,该横屏布局资源具体用于指示在第一应用窗口内布局哪些图标,该横屏位置资源用于指示在第一应用窗口内各图标的位置信息,而该横屏图片资源用于指示在第一应用窗口内各图标的形状、颜色等信息。可以理解,当电子设备的屏幕均用于显示该应用窗口时,上述横屏显示资源也是适合于屏幕显示方向为横屏方向的显示资源。 (1) Horizontal screen display resources refer to display resources that match the application interface display window whose window width is greater than the window height in the placement direction of the electronic device. Specifically, they may include horizontal screen layout resources, horizontal screen position resources, and horizontal screen image resources. For example, the horizontal screen layout resources are specifically used to indicate which icons are laid out in the first application window, the horizontal screen position resources are used to indicate the position information of each icon in the first application window, and the horizontal screen image resources are used to indicate the shape, color and other information of each icon in the first application window. It can be understood that when the screen of the electronic device is used to display the application window, the above-mentioned horizontal screen display resources are also display resources suitable for the screen display direction being the horizontal screen direction.
可以理解,应用程序开发时对应配置的横屏显示资源中还可以分别配置非全屏布局参数和全屏布局参数,其中非全屏布局参数用于控制布局该应用的非全屏窗口,全屏布局参数用于控制布局该应用的全屏窗口。其中,全屏布局参数可以用于满足用户需要通过电子设备全屏显示该应用程序的某个播放窗口来获取沉浸式视觉体验的需求,例如需实现沉浸式观看视频、沉浸式阅读等体验需求。其中,视频应用基于横屏显示资源的非全屏布局参数可以显示图1a所示的视频播放界面110;视频应用基于横屏显示资源的全屏布局参数可以显示图1b所示的视频播放界面120。It can be understood that non-full-screen layout parameters and full-screen layout parameters can also be configured separately in the corresponding horizontal screen display resources configured during application development, wherein the non-full-screen layout parameters are used to control the layout of the non-full-screen window of the application, and the full-screen layout parameters are used to control the layout of the full-screen window of the application. Among them, the full-screen layout parameters can be used to meet the needs of users who need to obtain an immersive visual experience by displaying a certain playback window of the application in full screen on an electronic device, such as the need to realize immersive video viewing, immersive reading and other experience needs. Among them, the video application can display the video playback interface 110 shown in Figure 1a based on the non-full-screen layout parameters of the horizontal screen display resources; the video application can display the video playback interface 120 shown in Figure 1b based on the full-screen layout parameters of the horizontal screen display resources.
如图1a所示,视频播放界面110可以包括显示当前播放的视频内容的视频播放窗口111、显示视频相关介绍的区域112和区域113,其中,区域112例如可以显示当前播放的视频的简介及评论等,区域113例如可以显示当前播放的视频的导演、编剧、演员列表以及关联小视频等内容。在此不做限制。As shown in FIG. 1a , the video playback interface 110 may include a video playback window 111 displaying the currently played video content, an area 112 and an area 113 displaying video-related introductions, wherein area 112 may display, for example, an introduction and comments of the currently played video, and area 113 may display, for example, the director, screenwriter, actor list, and associated short videos of the currently played video. No limitation is made here.
如图1b所示,视频播放界面120可以仅包括全屏显示视频内容的视频播放窗口。该窗口中显示视频内容的同时,还可以显示随视频播放进度一起播放的弹幕、进度条以及一些用于控制播放进度和速度的操作控件等。As shown in Fig. 1b, the video playback interface 120 may only include a video playback window that displays the video content in full screen. While displaying the video content, the window may also display bullet screens, progress bars, and some operation controls for controlling the playback progress and speed that are played along with the video playback progress.
(2)竖屏显示资源,与上述横屏显示资源相对应,是指在电子设备的放置方向上,与窗口宽度小于窗口高度的应用界面显示窗口相匹配的显示资源。具体可以包括竖屏布局资源、竖屏位置资源以及竖屏图片资源等。(2) Vertical screen display resources, corresponding to the horizontal screen display resources, refer to display resources that match the application interface display window whose window width is smaller than the window height in the placement direction of the electronic device. Specifically, they may include vertical screen layout resources, vertical screen position resources, and vertical screen picture resources.
目前一些需要全屏显示某个播放窗口来实现沉浸式视觉体验的应用程序,在竖屏显示资源中仅配置非全屏布局参数,而尚未配置全屏布局参数。但也有部分应用程序,为满足一些屏幕宽高比接近于1:1的电子设备的显示需求,付出开发成本在竖屏显示资源中也配置有全屏布局参数。例如,一些在竖屏显示资源中配置有非全屏布局参数和全屏布局参数的视频应用,基于竖屏显示资源中的非全屏布局参数可以显示图1c所示的视频播放界面130;基于竖屏显示资源中的全屏布局参数可以显示图1d所示的视频播放界面140。At present, some applications that need to display a certain playback window in full screen to achieve an immersive visual experience only configure non-full-screen layout parameters in the vertical screen display resources, but have not yet configured full-screen layout parameters. However, there are also some applications that pay development costs to configure full-screen layout parameters in the vertical screen display resources in order to meet the display requirements of some electronic devices with a screen aspect ratio close to 1:1. For example, some video applications that are configured with non-full-screen layout parameters and full-screen layout parameters in the vertical screen display resources can display the video playback interface 130 shown in Figure 1c based on the non-full-screen layout parameters in the vertical screen display resources; based on the full-screen layout parameters in the vertical screen display resources, the video playback interface 140 shown in Figure 1d can be displayed.
(3)横屏方向和竖屏方向,是指电子设备上默认配置的两种屏幕显示方向,其中横屏方向对应于电子设备横向放置时的屏幕显示方向,竖屏方向对应于电子设备竖向放置时的屏幕显示方向。(3) Landscape orientation and portrait orientation refer to the two screen display orientations configured by default on an electronic device, where the landscape orientation corresponds to the screen display orientation when the electronic device is placed horizontally, and the portrait orientation corresponds to the screen display orientation when the electronic device is placed vertically.
例如,手机(不包括折叠屏手机)横向放置时,参考图2a中的(右)图所示方向,其屏幕的宽度(水平边)大于高度(竖直边)所对应的方向可以是横屏方向。而当手机竖向放置时,参考图2a中的(左)图所示方向,屏幕的宽度小于高度所对应的方向可以是竖屏方向。For example, when a mobile phone (excluding foldable screen mobile phones) is placed horizontally, referring to the direction shown in the (right) figure in FIG2a, the direction corresponding to the width (horizontal side) of the screen is greater than the height (vertical side) can be the horizontal screen direction. When the mobile phone is placed vertically, referring to the direction shown in the (left) figure in FIG2a, the direction corresponding to the width of the screen is less than the height can be the vertical screen direction.
又例如,支持横向展开屏幕的折叠屏手机在非展开状态下,其屏幕的宽度大于高度所对应的方向可以是横屏方向,屏幕的宽度小于高度所对应的方向可以是竖屏方向。而该折叠屏手机竖向放置并横向展开后,当前放置方向的屏幕显示方向仍可以默认为展开状态下的竖屏方向,例如图2b中的(左)图所示方向。另一个放置方向(即横向放置)时的屏幕显示方向则可以默认为展开状态下的横屏方向,例如图2b中的(右)图所示方向。可扩展地,图2b所示的电子设备也可以是屏幕宽高比较为接近的平板电脑等,在此不做限制。For another example, for a foldable screen mobile phone that supports horizontally unfolded screen, in the non-expanded state, the direction corresponding to the width of the screen being greater than the height can be the horizontal screen direction, and the direction corresponding to the width of the screen being less than the height can be the vertical screen direction. After the foldable screen mobile phone is placed vertically and unfolded horizontally, the screen display direction of the current placement direction can still default to the vertical screen direction in the unfolded state, such as the direction shown in the (left) figure in Figure 2b. The screen display direction in another placement direction (i.e., horizontal placement) can default to the horizontal screen direction in the unfolded state, such as the direction shown in the (right) figure in Figure 2b. Expandably, the electronic device shown in Figure 2b can also be a tablet computer with a screen width and height that is relatively close, etc., which is not limited here.
再例如,支持竖向折叠屏幕的折叠屏手机在展开状态下,其屏幕的宽度大于高度所对应的方向可以是横屏方向,屏幕的宽度小于高度所对应的方向可以是竖屏方向。而该折叠屏手机竖向放置并竖向折叠后,当前放置方向的屏幕显示方向仍可以默认为折叠状态下的竖屏方向,例如图2c中的(左)图所示方向。另一个放置方向(即横向放置)的屏幕显示方向则可以默认为折叠状态下的横屏方向,例如图2c中的(右)图所示方向。For another example, when a folding screen mobile phone that supports vertical folding screen is in the unfolded state, the direction corresponding to the width of the screen being greater than the height can be the horizontal screen direction, and the direction corresponding to the width of the screen being less than the height can be the vertical screen direction. After the folding screen mobile phone is placed vertically and folded vertically, the screen display direction of the current placement direction can still default to the vertical screen direction in the folded state, such as the direction shown in the (left) figure in Figure 2c. The screen display direction of another placement direction (i.e., horizontal placement) can default to the horizontal screen direction in the folded state, such as the direction shown in the (right) figure in Figure 2c.
因此可以理解,电子设备屏幕的显示方向可以基于系统的默认配置来确定。Therefore, it can be understood that the display direction of the electronic device screen can be determined based on the default configuration of the system.
(4)config是指屏幕显示相关的配置信息,可以简称为屏幕配置信息。它是英文单词configuration的缩写,configuration是系统响应于应用程序的显示相应界面的请求执行相应的屏幕旋转或者不旋转的操作后,向应用程序反馈的电子设备当前显示方向以及屏幕尺寸等显示信息的一个信息集合。其中屏幕尺寸例如可以是当前显示方向对应的屏幕宽高比。例如,视频应用运行时如果电子设备的当前显示方向为竖屏方向,视频应用可以在检测到用户指示全屏显示某个视频播放界面的操作时,向系统发送旋转至横屏方向的请求,此时系统可以响应于该请求将当前显示方向旋转至横屏方向、并且向该视频应用反馈的config信息中可以包括:当前的显示方向为横屏方向所对应的方向信息、以及当前横屏方向对应的屏幕宽高比。进而,该视频应用便可以根据系统反馈的config信息,加载横屏显示资源进行界面布局,电子设备则可以对应在横屏方向全屏显示视频播放界面。 (4) config refers to the configuration information related to screen display, which can be referred to as screen configuration information. It is the abbreviation of the English word configuration. Configuration is a set of information about the current display direction and screen size of the electronic device fed back to the application after the system performs the corresponding screen rotation or non-rotation operation in response to the application's request to display the corresponding interface. The screen size can be, for example, the screen aspect ratio corresponding to the current display direction. For example, when the video application is running, if the current display direction of the electronic device is the portrait direction, the video application can send a request to the system to rotate to the landscape direction when it detects the user's instruction to display a certain video playback interface in full screen. At this time, the system can rotate the current display direction to the landscape direction in response to the request, and the config information fed back to the video application may include: the direction information corresponding to the current display direction being the landscape direction, and the screen aspect ratio corresponding to the current landscape direction. Then, the video application can load the landscape display resource for interface layout according to the config information fed back by the system, and the electronic device can display the video playback interface in full screen in the landscape direction.
图3根据本申请实施例示出了一种全屏显示方法的应用场景示意图。FIG3 shows a schematic diagram of an application scenario of a full-screen display method according to an embodiment of the present application.
如图3中的(a)所示,该应用场景包括电子设备100。用户在使用电子设备100看视频时,为获得更好的视频观看体验,可以点击电子设备100当前显示的视频播放界面101上的全屏显示控件102,使电子设备100全屏显示当前视频播放界面101中正在播放的视频内容。此时,电子设备100的系统可以响应于视频应用发来的旋转屏幕显示方向的请求,将屏幕显示方向由图3中(a)所示的竖屏方向旋转至(b)所示的横屏方向,并将旋转后的横屏方向对应的屏幕尺寸信息通过config信息反馈给视频应用。进而,视频应用则可以对应加载横屏显示资源,显示图3中(b)所示的在横屏方向上显示的全屏播放界面103。As shown in (a) of FIG. 3 , the application scenario includes an electronic device 100. When a user uses the electronic device 100 to watch a video, in order to obtain a better video viewing experience, the user can click the full-screen display control 102 on the video playback interface 101 currently displayed by the electronic device 100, so that the electronic device 100 displays the video content currently being played in the video playback interface 101 in full screen. At this time, the system of the electronic device 100 can respond to the request for rotating the screen display direction sent by the video application, rotate the screen display direction from the vertical screen direction shown in (a) of FIG. 3 to the horizontal screen direction shown in (b), and feed back the screen size information corresponding to the rotated horizontal screen direction to the video application through the config information. Furthermore, the video application can load the horizontal screen display resource accordingly, and display the full-screen playback interface 103 displayed in the horizontal screen direction as shown in (b) of FIG. 3 .
此时,用户往往还需要再旋转一下电子设备100的放置方向,将电子设备100从图3中(b)所示的竖向放置旋转至图3中(c)所示的横向放置,才能通过图3中(c)所示的全屏播放界面103观看视频。At this time, the user often needs to rotate the placement direction of the electronic device 100 from the vertical placement shown in Figure 3 (b) to the horizontal placement shown in Figure 3 (c) before watching the video through the full-screen playback interface 103 shown in Figure 3 (c).
然而,在图3所示的场景中,当电子设备100的屏幕的宽度和高度比较接近时,例如电子设备的屏幕显示方向为竖屏方向或横屏方向时屏幕的宽高比均在[0.9,1.1]的范围内,电子设备100保持竖屏方向进行全屏显示与切换到横屏方向进行全屏显示给用户的视觉体验实际上相差不大。However, in the scenario shown in FIG3 , when the width and height of the screen of the electronic device 100 are relatively close, for example, when the screen display orientation of the electronic device is in portrait orientation or landscape orientation, the aspect ratio of the screen is within the range of [0.9, 1.1], and the visual experience provided to the user by the electronic device 100 maintaining the portrait orientation for full-screen display and switching to the landscape orientation for full-screen display is actually not much different.
因此,对于屏幕宽度和高度比较接近的电子设备100,如果能够在检测到用户的全屏显示需求时,保持电子设备继续竖向放置也能显示全屏播放界面,即保持屏幕显示方向继续为竖屏方向进行全屏显示,则用户便能够在获得较好全屏看视频体验的同时无需旋转电子设备100的放置方向。如此,用户的使用体验会更加良好。Therefore, for an electronic device 100 with a screen width and height that are relatively close, if the full-screen display requirement of the user can be detected, the full-screen playback interface can be displayed while the electronic device is kept in a vertical orientation, that is, the screen display direction is kept in a vertical orientation for full-screen display, the user can obtain a better full-screen video viewing experience without rotating the placement direction of the electronic device 100. In this way, the user's experience will be better.
为实现上述屏幕宽度和高度比较接近的电子设备100上能够保持在竖屏方向进行全屏显示,一些需要全屏显示某个播放窗口来实现沉浸式视觉体验的应用程序,例如电子设备100上安装的视频应用、办公应用或者阅读应用等,需在应用程序开发阶段对竖屏显示资源配置全屏布局参数。如此,在电子设备竖向放置的情况下,当这些应用程序接收用户的全屏显示请求,则可以直接向系统请求竖屏方向的屏幕尺寸信息,该竖屏方向以及对应的屏幕尺寸信息可以通过系统的config信息反馈给应用程序。进而,上述应用程序可以根据系统反馈的config信息,加载竖屏显示资源,在竖屏方向进行全屏显示。In order to achieve full-screen display in the portrait orientation on the electronic device 100 with a relatively close screen width and height, some applications that need to display a certain playback window in full screen to achieve an immersive visual experience, such as video applications, office applications, or reading applications installed on the electronic device 100, need to configure full-screen layout parameters for the portrait display resources during the application development stage. In this way, when the electronic device is placed vertically, when these applications receive the user's full-screen display request, they can directly request the system for screen size information in the portrait orientation, and the portrait orientation and corresponding screen size information can be fed back to the application through the system's config information. Furthermore, the above-mentioned application can load the portrait display resources according to the config information fed back by the system, and perform full-screen display in the portrait orientation.
然而,实际上很多需要全屏显示某个播放窗口来实现沉浸式视觉体验的应用程序在被开发时并不会在竖屏显示资源中配置全屏布局参数,即这些应用程序本身不具有在竖屏方向上进行全屏显示的显示资源。However, in reality, many applications that need to display a playback window in full screen to achieve an immersive visual experience do not configure full screen layout parameters in the vertical screen display resources when they are developed, that is, these applications themselves do not have display resources for full screen display in the vertical direction.
在另一些方案中,在电子设备100竖向放置的情况下,电子设备100的系统可以在应用程序向系统请求横屏方向时不旋转屏幕显示方向,而向应用程序反馈竖屏方向的屏幕尺寸信息并指示应用在当前的竖屏方向将需要全屏显示的内容横向铺满。此时应用程序只能根据系统反馈的相应config信息中指示竖屏方向的信息加载竖屏显示资源进行布局显示,相应地电子设备100可能会显示图4所示的视频播放界面410。In other solutions, when the electronic device 100 is placed vertically, the system of the electronic device 100 may not rotate the screen display direction when the application requests the horizontal screen direction from the system, but feedback the screen size information of the vertical screen direction to the application and instruct the application to horizontally fill the content that needs to be displayed in full screen in the current vertical screen direction. At this time, the application can only load the vertical screen display resources for layout display according to the information indicating the vertical screen direction in the corresponding config information fed back by the system, and accordingly the electronic device 100 may display the video playback interface 410 shown in FIG. 4.
如图4所示,该视频播放界面410中正在播放视频的窗口411虽然在左右方向(横向)铺满了屏幕,但是该视频播放界面410中仍会显示一些非全屏界面上的布局内容。例如,图4所示的窗口411的下方可能会显示非全屏界面上才会有的“简介”412或“评论”413等。并且,如果用户喜好在观看视频时开启弹幕,则弹幕的内容还可能会直接覆盖显示在播放视频的窗口411之上,导致遮挡了窗口411中的部分视频画面,造成用户观看视频的体验不佳。As shown in FIG. 4 , although the window 411 of the video playing interface 410 is covering the entire screen in the left and right directions (horizontally), some layout contents on the non-full-screen interface are still displayed in the video playing interface 410. For example, the “Introduction” 412 or “Comments” 413, which are only available on the non-full-screen interface, may be displayed below the window 411 shown in FIG. 4 . Furthermore, if the user likes to turn on the bullet screen when watching the video, the content of the bullet screen may also be directly covered and displayed on the window 411 of the video playing, resulting in the blocking of part of the video screen in the window 411, causing the user to have a poor experience in watching the video.
综上,目前试图在竖屏方向上进行全屏显示的方案中,一些方案会要求应用程序被开发时在竖屏显示资源中配置全屏布局参数,该方案对不同应用程序的适应性较差。而另一些则只能实现在竖屏方向上横向铺满待显示的界面内容,但无法真正的实现在竖屏方向上进行全屏显示。In summary, among the current solutions that attempt to achieve full-screen display in the vertical screen direction, some solutions require the full-screen layout parameters to be configured in the vertical screen display resources when the application is developed, and this solution has poor adaptability to different applications. Others can only achieve horizontal spreading of the interface content to be displayed in the vertical screen direction, but cannot truly achieve full-screen display in the vertical screen direction.
为了解决上述问题,本申请实施例示出了一种全屏显示方法,应用于具有屏幕且屏幕的宽度和高度较为接近的电子设备。具体地,该方法在电子设备竖向放置的情况下,电子设备的系统可以响应于第一应用申请旋转至横屏方向进行全屏显示的请求,在识别到的屏幕宽高比信息确认当前用于显示应用界面的屏幕宽高比在预设范围内时,控制不旋转屏幕显示方向(即保持竖屏方向)并向该第一应用反馈相应的屏幕配置信息,其中该屏幕配置信息至少包括指示屏幕显示方向为横屏方向的信息和竖屏方向对应的屏幕宽高比信息。如此,上述第一应用在获取系统反馈的上述屏幕配置信息后,便可以基于该屏幕配置信息中指示屏幕显示方向为横屏方向的信息,基于横屏显示资源下的全屏布局参数加载横屏显示资源, 以及基于上述屏幕配置信息中的竖屏方向对应的屏幕宽高比信息,在当前的竖屏方向上布局全屏显示界面,在电子设备保持竖向放置的情况下实现竖屏方向进行全屏显示。In order to solve the above-mentioned problem, an embodiment of the present application shows a full-screen display method, which is applied to an electronic device having a screen whose width and height are relatively close. Specifically, in the case where the electronic device is placed vertically, the system of the electronic device can respond to a request from a first application to rotate to a horizontal screen orientation for full-screen display, and when the identified screen aspect ratio information confirms that the screen aspect ratio currently used to display the application interface is within a preset range, the screen display direction is controlled not to be rotated (i.e., the vertical screen orientation is maintained) and corresponding screen configuration information is fed back to the first application, wherein the screen configuration information at least includes information indicating that the screen display direction is a horizontal screen orientation and screen aspect ratio information corresponding to the vertical screen orientation. In this way, after obtaining the above-mentioned screen configuration information fed back by the system, the above-mentioned first application can load the horizontal screen display resource based on the information in the screen configuration information indicating that the screen display direction is a horizontal screen orientation, and based on the full-screen layout parameters under the horizontal screen display resource, And based on the screen aspect ratio information corresponding to the vertical screen direction in the above screen configuration information, the full-screen display interface is laid out in the current vertical screen direction, and the full-screen display in the vertical screen direction is achieved when the electronic device remains placed vertically.
其中,上述预设范围例如可以是[0.9,1.1]等合理预设范围。上述屏幕配置信息例如可以是config信息,指示屏幕显示方向为横屏方向的信息和竖屏方向对应的屏幕宽高比信息,可以是同一config信息中的不同配置项的参数,也可以是不同的config信息中分别相应配置项下的参数,在此不做限制。上述第一应用例如可以是视频应用、办公应用、阅读应用等需要全屏显示某个播放窗口来实现沉浸式视觉体验的应用程序。在此不做限制。Among them, the above-mentioned preset range can be, for example, a reasonable preset range such as [0.9, 1.1]. The above-mentioned screen configuration information can be, for example, config information, indicating that the screen display direction is the horizontal screen direction and the screen aspect ratio information corresponding to the vertical screen direction. It can be parameters of different configuration items in the same config information, or it can be parameters under corresponding configuration items in different config information. There is no limitation here. The above-mentioned first application can be, for example, a video application, an office application, a reading application, or other application that needs to display a playback window in full screen to achieve an immersive visual experience. There is no limitation here.
如此,电子设备所运行的视频应用等应用程序在响应用户指示全屏显示的操作默认向系统申请将屏幕显示方向旋转至横屏方向时,可以获取系统反馈的“伪造”成横屏方向的屏幕配置信息。进而根据该屏幕配置信息、以及横屏显示资源下的全屏布局参数加载横屏显示资源,从而在当前竖屏放置的电子设备的竖屏方向上进行全屏显示,给用户带来更好的使用体验。可以理解,上述方案可以适用于各种需要全屏显示某个播放窗口来实现沉浸式视觉体验的应用程序,包括所配置的竖屏显示资源中没有配置全屏布局参数的应用程序,因此该方案对应用的适应性较强。In this way, when the video application and other applications run by the electronic device apply to the system to rotate the screen display direction to the horizontal direction by default in response to the user's instruction for full-screen display, the screen configuration information "fake" to the horizontal direction can be obtained from the system feedback. Then, according to the screen configuration information and the full-screen layout parameters under the horizontal display resource, the horizontal display resource is loaded, so as to perform full-screen display in the vertical direction of the electronic device currently placed in vertical screen, giving the user a better user experience. It can be understood that the above scheme can be applicable to various applications that need to display a certain playback window in full screen to achieve an immersive visual experience, including applications that do not have full-screen layout parameters configured in the configured vertical display resources, so the scheme is highly adaptable to applications.
图5示出了一种基于本申请实施例提供的全屏显示方法所实现的全屏显示过程。FIG5 shows a full-screen display process implemented by a full-screen display method provided in an embodiment of the present application.
如图5所示,例如电子设备100上运行视频应用并显示图5所示的视频播放界面501。当用户在该界面501上点击全屏显示控件502时,电子设备100可以保持在竖屏方向显示全屏播放界面503。As shown in Figure 5, for example, a video application is run on the electronic device 100 and a video playback interface 501 shown in Figure 5 is displayed. When the user clicks the full screen display control 502 on the interface 501, the electronic device 100 can maintain the full screen playback interface 503 in the vertical direction.
可以理解,上述全屏布局参数是指用于控制全屏显示效果的相关配置参数。例如,对于视频应用,基于上述全屏布局参数可以控制图5所示的全屏播放界面503呈现的效果包括:当前播放的视频内容铺满屏幕,视频内容无法铺满的空白区域,例如图5所示的全屏播放界面503上的区域504和区域505等,可以作为显示弹幕、播放控件、设置控件、播放进度等信息的区域,以实现沉浸式全屏体验。It can be understood that the above-mentioned full-screen layout parameters refer to relevant configuration parameters for controlling the full-screen display effect. For example, for video applications, the effects presented by the full-screen playback interface 503 shown in FIG5 can be controlled based on the above-mentioned full-screen layout parameters, including: the currently played video content fills the screen, and the blank areas that the video content cannot fill, such as area 504 and area 505 on the full-screen playback interface 503 shown in FIG5, can be used as areas for displaying information such as bullet screen, playback controls, setting controls, and playback progress, so as to achieve an immersive full-screen experience.
另外,如果电子设备检测到用户旋转设备放置方向的操作,例如将电子设备旋转至横向放置的操作,系统可以控制将屏幕显示方向旋转至横屏方向。此时,系统便会向上述第一应用更新屏幕配置信息,更新后的屏幕配置信息可以包括指示屏幕显示方向为横屏方向的信息、以及横屏方向对应的屏幕宽高比信息。进而第一应用便可以基于系统更新的屏幕配置信息,加载横屏显示资源并在横屏方向上布局全屏显示界面,在横屏方向进行全屏显示。In addition, if the electronic device detects an operation by the user to rotate the device placement direction, such as rotating the electronic device to a horizontal position, the system can control the screen display direction to rotate to a horizontal screen direction. At this time, the system will update the screen configuration information to the above-mentioned first application, and the updated screen configuration information may include information indicating that the screen display direction is a horizontal screen direction, and screen aspect ratio information corresponding to the horizontal screen direction. Then, based on the screen configuration information updated by the system, the first application can load the horizontal screen display resources and layout the full-screen display interface in the horizontal screen direction, and perform full-screen display in the horizontal screen direction.
而当该电子设备为折叠屏手机时,如果该电子设备检测到用户折叠屏幕的操作,如果电子设备继续竖向放置,基于本申请实施例提供的上述方案,该折叠屏手机折叠后仍可以在折叠状态下的竖屏方向进行全屏显示。并且可以在检测到电子设备横向放置时,切换至横屏方向进行全屏显示。When the electronic device is a foldable screen mobile phone, if the electronic device detects the user's folding operation, if the electronic device continues to be placed vertically, based on the above solution provided by the embodiment of the present application, the foldable screen mobile phone can still display full screen in the vertical screen direction after being folded. And when it is detected that the electronic device is placed horizontally, it can switch to the horizontal screen direction for full screen display.
因此,本申请实施例所提供的全屏显示方法,能够适应一些宽高比较接近的电子设备,以竖屏方向进行全屏显示,无需用户旋转电子设备的放置方向即可给用户带来沉浸式全屏体验。并且,该全屏显示方法能够适用于各类需要全屏显示某个播放窗口来实现沉浸式视觉体验的应用程序,而无论该应用程序的竖屏显示资源中是否配置有全屏布局参数,即对应用程序的适应性更强。另外,该全屏显示方法可以继续支持对用户旋转设备放置方向的相关操作、以及用户折叠屏幕的相关操作等的响应,对应的切换到横屏方向的宽高尺寸进行全屏显示,这也有利于在用户的各种操作之间进行流畅的切换,满足用户对电子设备的各种使用需求,从而提高用户的使用体验。Therefore, the full-screen display method provided in the embodiment of the present application can adapt to some electronic devices with relatively close width and height, and perform full-screen display in the vertical screen direction, which can bring an immersive full-screen experience to the user without the user rotating the placement direction of the electronic device. In addition, the full-screen display method can be applied to various types of applications that need to display a certain playback window in full screen to achieve an immersive visual experience, regardless of whether the full-screen layout parameters are configured in the vertical screen display resources of the application, that is, it is more adaptable to the application. In addition, the full-screen display method can continue to support responses to related operations of the user rotating the placement direction of the device, and related operations of the user folding the screen, and correspondingly switch to the width and height size of the horizontal screen direction for full-screen display, which is also conducive to smooth switching between various user operations, meeting the user's various usage requirements for electronic devices, thereby improving the user's usage experience.
可以理解,上述通过视频应用播放的视频,可以是视频播放器中的视频,或者微博、微信、图库等其他应用中的视频;该视频也可以是移动终端拍摄的视频,移动终端下载的视频,或者通过其他方式获取的视频,本申请实施例在此不做限制。It can be understood that the video played through the video application can be a video in a video player, or a video in other applications such as Weibo, WeChat, and gallery; the video can also be a video shot by a mobile terminal, a video downloaded by a mobile terminal, or a video obtained by other means, and the embodiments of the present application are not limited here.
上述对应于屏幕宽高比的预设范围内,例如可以是上述屏幕宽高比接近1:1的描述所对应的范围,例如可以是[0.9,1.1]或者[0.8,1.1]等合理范围,本申请实施例在此不做限制。上述电子设备的显示方向包括上述竖屏方向和横屏方向,如果电子设备当前显示方向为竖屏方向,则可以确定该竖屏方向对应的宽高比在[0.8,1]或者[0.9,1]等预设范围内时无需切换显示方向,即可以继续保持竖屏方向进行显示。此时,电子设备对应生成的上述屏幕配置信息中,对应于横屏方向对应的宽高比或者宽高信息则可以保持竖屏方向对应的宽高比或宽高信息。相应地,如果用户操作全屏显示之后将电子设备的屏幕进一步旋转到横屏方向,则电子设备可以识别到当前宽高比大于1,不在上述[0.9,1]或者[0.8,1]等预设范围内,因此需要将竖屏方向全屏显示的界面切换至横屏方向全屏显示的界面,此时系统可以更新屏幕配置信息指示屏幕显示方向已切换为横屏方向并且向应用反馈横屏方向对应的屏幕宽高比,进而应用可以调用横 屏显示资源下的全屏布局参数加载横屏显示资源,在横屏方向进行全屏显示。The above preset range corresponding to the screen aspect ratio may be, for example, the range corresponding to the description of the screen aspect ratio close to 1:1, such as [0.9, 1.1] or [0.8, 1.1] and other reasonable ranges, which are not limited in the embodiments of the present application. The display direction of the above electronic device includes the above-mentioned vertical screen direction and horizontal screen direction. If the current display direction of the electronic device is vertical screen direction, it can be determined that the aspect ratio corresponding to the vertical screen direction is within the preset range of [0.8, 1] or [0.9, 1], and there is no need to switch the display direction, that is, the vertical screen direction can continue to be maintained for display. At this time, in the above-mentioned screen configuration information generated by the electronic device, the aspect ratio or width-height information corresponding to the horizontal screen direction can maintain the aspect ratio or width-height information corresponding to the vertical screen direction. Accordingly, if the user further rotates the screen of the electronic device to the landscape orientation after operating the full-screen display, the electronic device can recognize that the current aspect ratio is greater than 1 and is not within the preset ranges such as [0.9, 1] or [0.8, 1], and therefore needs to switch the full-screen display interface in the portrait orientation to the full-screen display interface in the landscape orientation. At this time, the system can update the screen configuration information to indicate that the screen display orientation has been switched to the landscape orientation and feedback the screen aspect ratio corresponding to the landscape orientation to the application, so that the application can call the landscape orientation. The full screen layout parameters under the horizontal display resource load the horizontal display resource and display it in full screen in the horizontal direction.
可以理解,本申请实施例所提供的全屏显示方法,所适用的电子设备可以包括但不限于具有屏幕的手机(包括折叠屏手机)、平板电脑、桌面型、膝上型、手持计算机、上网本,以及增强现实(augmentedreality,AR)\虚拟现实(virtual reality,VR)设备、智能电视、智能手表等可穿戴设备、移动电子邮件设备、车机设备、便携式游戏机、音乐播放器、阅读器设备、其中嵌入或耦接有一个或多个处理器的电视机、或能够访问网络的其他电子设备。It can be understood that the full-screen display method provided in the embodiments of the present application can be applicable to electronic devices including but not limited to mobile phones with screens (including foldable screen mobile phones), tablet computers, desktops, laptops, handheld computers, netbooks, and augmented reality (AR) and virtual reality (VR) devices, smart TVs, smart watches and other wearable devices, mobile email devices, car equipment, portable game consoles, music players, reader devices, televisions embedded with or coupled with one or more processors, or other electronic devices capable of accessing the Internet.
图6根据本申请实施例示出了一种全屏显示方法在电子设备100的系统中实施所基于的软件结构。FIG6 shows a software structure based on which a full-screen display method is implemented in a system of an electronic device 100 according to an embodiment of the present application.
可以理解,电子设备100所搭载的操作系统对应的系统架构可以包括应用层、应用框架层、系统服务层以及内核层等,具体将在下文详细介绍,在此不做赘述。在此需说明的是,在本申请实施例的一些描述中,“操作系统”可以简称为“系统”。如无特别说明,二者均指电子设备100的操作系统。It is understood that the system architecture corresponding to the operating system carried by the electronic device 100 may include an application layer, an application framework layer, a system service layer, and a kernel layer, etc., which will be described in detail below and will not be repeated here. It should be noted that in some descriptions of the embodiments of the present application, "operating system" may be referred to as "system". Unless otherwise specified, both refer to the operating system of the electronic device 100.
其中,本申请实施例提供的全屏显示方法的具体实施过程,可以涉及电子设备的应用层和应用框架层中的相关软件结构。Among them, the specific implementation process of the full-screen display method provided in the embodiment of the present application may involve relevant software structures in the application layer and application framework layer of the electronic device.
如图6所示,该系统结构的应用层中所安装的应用程序可以包括一个或多个视频应用610以及其他能够满足用户需求进行全屏显示的应用程序,视频应用610例如可以是APP 611、APP 612、APP 613等。其他应用程序例如还可以是办公应用、阅读应用等,在此不做限制。As shown in FIG6 , the applications installed in the application layer of the system structure may include one or more video applications 610 and other applications that can meet user needs for full-screen display. The video application 610 may be, for example, APP 611, APP 612, APP 613, etc. Other applications may also be, for example, office applications, reading applications, etc., which are not limited here.
该系统架构中的应用框架层可以包括窗口管理服务(WindowManagerService,WMS)620等。其中,该窗口管理服务620是运行在应用框架层的一个系统服务,主要负责管理应用和设备的窗口方向、以及相应窗口的宽高尺寸的大小等。如图6所示,窗口管理服务620可以包括活动管理模块(Activity管理模块)621、配置管理模块(Config管理模块)622以及设备方向管理模块623。The application framework layer in the system architecture may include a window management service (WindowManagerService, WMS) 620, etc. The window management service 620 is a system service running in the application framework layer, which is mainly responsible for managing the window directions of applications and devices, and the width and height sizes of corresponding windows, etc. As shown in FIG. 6 , the window management service 620 may include an activity management module (Activity management module) 621, a configuration management module (Config management module) 622, and a device direction management module 623.
其中,Activity管理模块621在系统运行过程中可以用于分发相应事件触发的请求,例如接收应用层的视频应用610发来的全屏显示请求,进而通知设备方向管理模块623处理所接收的全屏显示请求。并且,Activity管理模块621还用于根据设备方向管理模块623的处理结果对应调整/旋转电子设备的显示方向。例如,设备方向管理模块623确定对上述全屏显示请求的处理结果为保持竖屏方向不旋转时,则Activity管理模块621保持电子设备当前的显示方向为竖屏方向。例如,设备方向管理模块623确定对上述全屏显示请求的处理结果为需要旋转至横屏方向时,则Activity管理模块621可以调整电子设备当前的显示方向旋转至横屏方向。Among them, the Activity management module 621 can be used to distribute requests triggered by corresponding events during the operation of the system, such as receiving a full-screen display request sent by the video application 610 of the application layer, and then notifying the device orientation management module 623 to process the received full-screen display request. In addition, the Activity management module 621 is also used to adjust/rotate the display direction of the electronic device according to the processing result of the device orientation management module 623. For example, when the device orientation management module 623 determines that the processing result of the above-mentioned full-screen display request is to keep the vertical screen orientation without rotating, the Activity management module 621 keeps the current display direction of the electronic device in the vertical screen orientation. For example, when the device orientation management module 623 determines that the processing result of the above-mentioned full-screen display request is to rotate to the horizontal screen orientation, the Activity management module 621 can adjust the current display direction of the electronic device to the horizontal screen orientation.
Config管理模块622用于管理通过config向应用程序传递的显示配置信息,简称显示信息。该显示信息可以包括设备方向管理模块623响应于应用的全屏显示请求对应确定的对应于显示方向的窗口尺寸或者说宽高比、以及指示屏幕显示状态的状态参数等配置信息。The Config management module 622 is used to manage the display configuration information transmitted to the application through the config, referred to as display information. The display information may include the window size or aspect ratio corresponding to the display direction determined by the device orientation management module 623 in response to the full screen display request of the application, and the state parameters indicating the screen display state and other configuration information.
设备方向管理模块623可以包括全屏判决模块626,用于识别屏幕的宽高信息较为接近(例如宽高比接近1:1)的电子设备,并对这类电子设备进行全屏显示时对应的显示方向进行方向管理。全屏判决模块626识别屏幕的宽高比是否接近1:1的方式,例如可以通过判断当前获取的电子设备屏幕的显示方向对应的宽高比是否在预设范围内、或者将该宽高比与预设的上限阈值和下限阈值的比较结果来确定,在此不做限制。The device orientation management module 623 may include a full-screen determination module 626, which is used to identify electronic devices whose screen width and height information is relatively close (for example, the aspect ratio is close to 1:1), and to manage the corresponding display direction of such electronic devices when they are displayed in full screen. The full-screen determination module 626 identifies whether the screen aspect ratio is close to 1:1, for example, by determining whether the aspect ratio corresponding to the display direction of the electronic device screen currently obtained is within a preset range, or by comparing the aspect ratio with a preset upper threshold and a lower threshold, which is not limited here.
以视频应用610为例,基于上述图6所示的软件结构,下面结合不同实施例具体介绍本申请实施例提供的全屏显示方法的交互实现过程。Taking the video application 610 as an example, based on the software structure shown in FIG. 6 , the interactive implementation process of the full-screen display method provided in the embodiment of the present application is specifically introduced below in combination with different embodiments.
实施例1Example 1
图7根据本申请实施例示出了一种全屏显示方法的交互流程。可以理解,图7所示交互流程涉及上述图6所示的视频应用610、Activity管理模块621以及设备方向管理模块623之间的交互。Figure 7 shows an interaction process of a full-screen display method according to an embodiment of the present application. It can be understood that the interaction process shown in Figure 7 involves the interaction between the video application 610, the Activity management module 621 and the device direction management module 623 shown in Figure 6 above.
在此需声明的是,本申请实施例中对方法、流程中的步骤进行编号是为了便于引用,而不是限定先后顺序,各步骤之间如有先后顺序,当以文字说明为准。It should be stated here that the steps in the methods and processes in the embodiments of the present application are numbered for ease of reference, rather than to limit the order of precedence. If there is an order between the steps, the text description shall prevail.
如图7所示,该交互流程可以包括以下步骤:As shown in FIG. 7 , the interaction process may include the following steps:
701:视频应用610接收到用户指示进行全屏显示的操作。701: The video application 610 receives a user instruction to perform a full-screen display operation.
示例性地,参见图8a,用户指示进行全屏显示的操作例如可以为:用户点击视频播放界面810内的全屏显示控件811的操作。又示例性地,用户指示进行全屏显示的操作例如也可以为,用户在视频播放界面810内的视频内容显示区域进行双击屏幕的操作。再示例性地,用户指示进行全屏显示的操作例如也可以为:用户通过语音指令预设或手势指示全屏显示视频内容的操作等。在此不做限制。 Exemplarily, referring to FIG8a, the operation of the user indicating full screen display may be, for example, an operation of the user clicking on the full screen display control 811 in the video playback interface 810. Exemplarily, the operation of the user indicating full screen display may be, for example, an operation of the user double-clicking the screen in the video content display area in the video playback interface 810. Exemplarily, the operation of the user indicating full screen display may be, for example, an operation of the user indicating full screen display of video content by a preset voice command or a gesture, etc. This is not limited here.
可以理解,位于系统应用层的视频应用610在接收到用户的上述操作请求后,可以触发相应的显示事件,并生成相应的全屏显示请求,继续执行下述步骤702,发送给位于系统应用框架层的Activity管理模块621。It can be understood that after receiving the above operation request from the user, the video application 610 at the system application layer can trigger a corresponding display event and generate a corresponding full-screen display request, and continue to execute the following step 702 and send it to the Activity management module 621 at the system application framework layer.
702:视频应用610向Activity管理模块621发送全屏显示请求。702 : The video application 610 sends a full-screen display request to the Activity management module 621 .
示例性地,视频应用610可以将所生成的全屏显示请求发送给位于应用框架层的Activity管理模块621。参考上述图6所示,该Activity管理模块621可以设置在应用框架层的窗口管理服务620中,在此不做赘述。该Activity管理模块621在系统运行过程中可以用于分发相应事件触发的请求,例如执行下述步骤703将上述全屏显示请求分配/转发给设备方向管理模块623。Exemplarily, the video application 610 may send the generated full-screen display request to the Activity management module 621 located in the application framework layer. Referring to FIG. 6 above, the Activity management module 621 may be set in the window management service 620 of the application framework layer, which will not be described in detail here. The Activity management module 621 may be used to distribute requests triggered by corresponding events during system operation, for example, executing the following step 703 to distribute/forward the above full-screen display request to the device direction management module 623.
可以理解,如果该视频应用610中仅横屏显示资源中配置了全屏布局参数,而竖屏显示资源尚未配置全屏布局参数,则此时视频应用610所发送的全屏显示请求,可以用于向系统请求将屏幕显示方向旋转至横屏方向。It can be understood that if only the horizontal screen display resources in the video application 610 are configured with full-screen layout parameters, and the vertical screen display resources are not yet configured with full-screen layout parameters, then the full-screen display request sent by the video application 610 at this time can be used to request the system to rotate the screen display direction to the horizontal screen direction.
703:Activity管理模块621通知设备方向管理模块623处理接收到的全屏显示请求。703: The Activity management module 621 notifies the device orientation management module 623 to process the received full-screen display request.
示例性地,Activity管理模块621在接收到视频应用610发来的全屏显示请求后,可以通知设备方向管理模块623处理所接收的全屏显示请求。通知的方式例如可以是向设备方向管理模块623转发全屏显示请求。For example, after receiving the full screen display request from the video application 610 , the Activity management module 621 may notify the device direction management module 623 to process the received full screen display request. The notification may be forwarding the full screen display request to the device direction management module 623 .
在另一些实施例中,Activity管理模块621也可以基于接收到的全屏显示请求,生成其他的通知消息或者请求发送给设备方向管理模块623,以触发设备方向管理模块623进行相应处理。在此不做限制。In other embodiments, the Activity management module 621 may also generate other notification messages or requests based on the received full-screen display request and send them to the device orientation management module 623 to trigger the device orientation management module 623 to perform corresponding processing. This is not limited here.
704:设备方向管理模块623判断当前显示方向是否为竖屏方向。若判断结果为是,则继续执行下述步骤705,进一步判断是否需要切换显示方向;若判断结果为否,则可以执行下述步骤711至713,切换至横屏方向进行全屏显示。704: The device orientation management module 623 determines whether the current display orientation is the portrait orientation. If the determination result is yes, the following step 705 is continued to be executed to further determine whether the display orientation needs to be switched; if the determination result is no, the following steps 711 to 713 can be executed to switch to the landscape orientation for full-screen display.
示例性地,设备方向管理模块623响应于全屏显示请求,可以基于电子设备上的陀螺仪传感器等硬件采集到的传感器数据、以及系统关于屏幕显示方向及相应显示方向对应的屏幕尺寸信息等默认配置,确定电子设备100当前的放置方向所对应的显示方向是否为竖屏方向。其中,在本申请实施例中,上述屏幕尺寸信息例如可以是相应显示方向对应的屏幕宽高比。Exemplarily, in response to the full-screen display request, the device orientation management module 623 can determine whether the display orientation corresponding to the current placement orientation of the electronic device 100 is a portrait orientation based on sensor data collected by hardware such as a gyroscope sensor on the electronic device, and the system's default configurations such as screen display orientation and screen size information corresponding to the corresponding display orientation. In the embodiment of the present application, the above-mentioned screen size information can be, for example, the screen aspect ratio corresponding to the corresponding display orientation.
705:设备方向管理模块623根据竖屏方向对应的宽高比,判断是否切换至横屏方向进行全屏显示。若判断结果为是,则可以继续执行下述步骤711至713,切换至横屏方向进行全屏显示;若判断结果为否,则可以继续执行下述步骤706至708,在当前的竖屏方向进行全屏显示。705: The device orientation management module 623 determines whether to switch to the horizontal orientation for full-screen display according to the aspect ratio corresponding to the vertical orientation. If the judgment result is yes, the following steps 711 to 713 can be continued to switch to the horizontal orientation for full-screen display; if the judgment result is no, the following steps 706 to 708 can be continued to display in full screen in the current vertical orientation.
示例性地,设备方向管理模块623在执行上述步骤704的判断过程中,若确定当前显示方向为竖屏方向,则可以进一步判断当前的竖屏方向是否需要切换至横屏方向进行全屏显示。该判断结果可以根据电子设备100当前竖屏方向对应的宽高比是否在接近1:1的预设范围内来确定。例如预设范围为[0.9,1],若上述竖屏方向对应的宽高比小于0.9,则表明电子设备100的屏幕宽高差异较大,如需全屏显示则需要切换至横屏方向,才能获得较好的全屏体验。因而此时的判断结果为是,即需要切换至横屏方向进行全屏显示。若上述竖屏方向对应的宽高比在上述[0.9,1]内,则表明电子设备100的屏幕宽高差异较小,为了简化用户操作提高用户体验,全屏显示时也可以保持当前的竖屏方向。因而此时的判断结果为否,即不需要切换至横屏方向,可以保持当前竖屏方向进行全屏显示。Exemplarily, during the judgment process of executing the above step 704, if the device orientation management module 623 determines that the current display orientation is the portrait orientation, it can further determine whether the current portrait orientation needs to be switched to the landscape orientation for full-screen display. The judgment result can be determined based on whether the aspect ratio corresponding to the current portrait orientation of the electronic device 100 is within a preset range close to 1:1. For example, the preset range is [0.9, 1]. If the aspect ratio corresponding to the above portrait orientation is less than 0.9, it indicates that the screen width and height difference of the electronic device 100 is large. If full-screen display is required, it is necessary to switch to the landscape orientation to obtain a better full-screen experience. Therefore, the judgment result at this time is yes, that is, it is necessary to switch to the landscape orientation for full-screen display. If the aspect ratio corresponding to the above portrait orientation is within the above [0.9, 1], it indicates that the screen width and height difference of the electronic device 100 is small. In order to simplify user operations and improve user experience, the current portrait orientation can also be maintained during full-screen display. Therefore, the judgment result at this time is no, that is, it is not necessary to switch to the landscape orientation, and the current portrait orientation can be maintained for full-screen display.
在另一些实施例中,上述设备方向管理模块623所执行的704至705的判断过程,也可以合并为一个判断步骤执行,具体可以参考下述实施例2提供的交互流程中的相关步骤描述,在此不做赘述。In other embodiments, the judgment process from 704 to 705 performed by the device orientation management module 623 may also be combined into one judgment step. For details, please refer to the description of the relevant steps in the interaction process provided in the following embodiment 2, which will not be repeated here.
706:设备方向管理模块623控制屏幕显示方向保持竖屏方向,并调用config管理模块622生成指示当前显示方向为横屏方向的屏幕配置信息。其中,该屏幕配置信息中可以包括当前竖屏方向对应的屏幕尺寸信息。706: The device orientation management module 623 controls the screen display orientation to maintain the vertical orientation, and calls the config management module 622 to generate screen configuration information indicating that the current display orientation is the horizontal orientation. The screen configuration information may include screen size information corresponding to the current vertical orientation.
示例性地,设备方向管理模块623在执行上述步骤705的判断过程中,若确定保持当前的竖屏方向进行全屏显示,则可以控制保持当前的竖屏方向为屏幕显示方向,同时调用config管理模块622生成指示当前屏幕显示方向已切换至横屏方向的屏幕配置信息,以反馈给视频应用610作为对全屏显示请求的响应结果。例如可以将当前竖屏方向对应生成的需向视频应用610反馈的屏幕配置信息(config)中指示当前屏幕显示方向为竖屏方向的信息修改为指示横屏方向的信息,但保留当前竖屏方向对应的宽高比,继而将修改后的屏幕配置信息反馈给视频应用。即将需要反馈给视频应用610的屏幕配置信息“伪 造”成指示当前屏幕显示方向已切换至横屏方向的屏幕配置信息,作为向视频应用610反馈的信息。Exemplarily, during the judgment process of executing the above step 705, if the device orientation management module 623 determines to maintain the current vertical screen orientation for full-screen display, the current vertical screen orientation can be controlled to be maintained as the screen display orientation, and the config management module 622 can be called to generate screen configuration information indicating that the current screen display orientation has been switched to the horizontal screen orientation, so as to be fed back to the video application 610 as a response to the full-screen display request. For example, the information indicating that the current screen display orientation is the vertical screen orientation in the screen configuration information (config) generated corresponding to the current vertical screen orientation and to be fed back to the video application 610 can be modified to indicate the horizontal screen orientation, but the aspect ratio corresponding to the current vertical screen orientation is retained, and the modified screen configuration information is then fed back to the video application. The screen configuration information that needs to be fed back to the video application 610 is "pseudo- The screen configuration information indicating that the current screen display direction has been switched to the horizontal screen direction is generated as the information fed back to the video application 610.
如此,即便视频应用610的竖屏显示资源中没有配置全屏布局参数,系统也可以通过向修改该视频应用610反馈的屏幕配置信息,指示该应用调用配置有全屏布局参数的横屏显示资源,在当前的竖屏方向上布局全屏显示界面,例如全屏播放界面,实现在竖屏方向上全屏显示视频内容。In this way, even if the full-screen layout parameters are not configured in the vertical screen display resources of the video application 610, the system can also modify the screen configuration information fed back to the video application 610, instructing the application to call the horizontal screen display resources configured with full-screen layout parameters, and layout the full-screen display interface in the current vertical screen direction, such as a full-screen playback interface, to achieve full-screen display of video content in the vertical screen direction.
可以理解,在本申请实施例中,系统的设备方向管理模块623需执行本步骤706的操作来实现在竖屏方向上进行全屏显示,是因为:通常应用程序的横屏显示资源中都配置有全屏布局参数,但竖屏显示资源中不一定会配置全屏布局参数。如果是竖屏显示资源未配置全屏布局参数的应用程序,在检测到用户的全屏显示操作时对应发送给系统的全屏显示请求,通常会要求将当前的屏幕显示方向切换至横屏方向。通常,系统会响应于应用程序的请求,切换至横屏方向并向应用程序反馈指示屏幕显示方向已切换至横屏方向的屏幕配置信息(config)。之后,应用便可以基于系统反馈的config调用横屏显示资源布局全屏显示界面。因此,本申请实施例中系统的设备方向管理模块623可以在不切换屏幕显示方向至横屏方向的同时,向应用反馈指示当前屏幕显示方向为横屏方向的config,并在该config中配置当前竖屏方向对应的屏幕宽高比。进而能指示应用调用横屏显示资源采用适应竖屏方向对应的屏幕宽高比布局全屏显示界面,实现在竖屏方向上进行全屏显示的目的。It can be understood that in the embodiment of the present application, the device orientation management module 623 of the system needs to perform the operation of this step 706 to realize full-screen display in the vertical screen direction because: the horizontal screen display resources of the application are usually configured with full-screen layout parameters, but the vertical screen display resources may not be configured with full-screen layout parameters. If it is an application that does not configure full-screen layout parameters for the vertical screen display resource, when the full-screen display operation of the user is detected, the corresponding full-screen display request sent to the system usually requires the current screen display direction to be switched to the horizontal screen direction. Usually, the system will switch to the horizontal screen direction in response to the request of the application and feedback the screen configuration information (config) indicating that the screen display direction has been switched to the horizontal screen direction to the application. After that, the application can call the horizontal screen display resource layout full-screen display interface based on the config fed back by the system. Therefore, in the embodiment of the present application, the device orientation management module 623 of the system can feedback the config indicating that the current screen display direction is the horizontal screen direction to the application without switching the screen display direction to the horizontal screen direction, and configure the screen aspect ratio corresponding to the current vertical screen direction in the config. Then, the application can be instructed to call the horizontal screen display resource to adopt the full-screen display interface layout adapted to the screen aspect ratio corresponding to the vertical screen direction, so as to achieve the purpose of full-screen display in the vertical screen direction.
作为示例,设备方向管理模块623可以通过调用config管理模块622的updateConfig方法,来调用config管理模块622将对应于当前屏幕显示方向生成的屏幕配置信息(config)中的原始宽高比修改为竖屏方向对应的宽高比,从而生成指示当前显示方向为横屏方向的屏幕配置信息。具体生成该屏幕配置信息的方式,例如可以是将“Config{mOrientation=port mRotation=ROTATION_0mBound=W x H}”修改为“Config{mOrientation=land mRotation=ROTATION_90mBound=W x H}”,作为待反馈的屏幕配置信息。其中,修改前的config中“port mRotation”是指示当前屏幕显示方向为竖屏方向的信息,“ROTATION_0”表示该竖屏方向相对于电子设备的正方向旋转的角度为0,其中该正方向为电子设备顶部所指示的方向;修改后的config中“land mRotation”是指示当前屏幕显示方向为横屏方向的信息,“ROTATION_0”表示该竖屏方向相对于电子设备的正方向逆时针旋转的角度为90°。可见,修改前后的config中指示当前屏幕尺寸信息的“W x H”,即屏幕宽高比保持不变。即刷新后的指示当前屏幕显示方向为横屏方向的config中包括竖屏方向对应的宽高比。As an example, the device orientation management module 623 can call the config management module 622 to modify the original aspect ratio in the screen configuration information (config) generated corresponding to the current screen display orientation to the aspect ratio corresponding to the portrait orientation by calling the updateConfig method of the config management module 622, thereby generating screen configuration information indicating that the current display orientation is the landscape orientation. The specific method of generating the screen configuration information, for example, can be to modify "Config{mOrientation=port mRotation=ROTATION_0mBound=W x H}" to "Config{mOrientation=land mRotation=ROTATION_90mBound=W x H}" as the screen configuration information to be fed back. Among them, "port mRotation" in the config before modification is information indicating that the current screen display direction is the portrait screen direction, and "ROTATION_0" indicates that the angle of rotation of the portrait screen direction relative to the positive direction of the electronic device is 0, where the positive direction is the direction indicated by the top of the electronic device; "land mRotation" in the config after modification is information indicating that the current screen display direction is the landscape screen direction, and "ROTATION_0" indicates that the angle of rotation of the portrait screen direction relative to the positive direction of the electronic device is 90° counterclockwise. It can be seen that the "W x H" indicating the current screen size information in the config before and after modification, that is, the screen aspect ratio remains unchanged. That is, the refreshed config indicating that the current screen display direction is the landscape screen direction includes the aspect ratio corresponding to the portrait screen direction.
707:设备方向管理模块623将生成的屏幕配置信息反馈给视频应用610。707 : The device orientation management module 623 feeds back the generated screen configuration information to the video application 610 .
示例性地,设备方向管理模块623调用config管理模块624生成指示当前显示方向为横屏方向的屏幕配置信息(config)后,则可以将生成的该config反馈给视频应用610,以便于视频应用610基于该config调用相应显示资源布局显示界面。该反馈过程例如可以通过调用onConfigurationChanged函数将config发送或者说回调给视频应用610来实现。上述指示当前显示方向为横屏方向的屏幕配置信息(config)反馈给视频应用610后,视频应用610可以基于该屏幕配置信息以及横屏显示资源下的全屏布局参数加载横屏显示资源,在将当前的屏幕显示方向作为横屏方向布局全屏播放界面,将视频内容进行全屏显示。Exemplarily, after the device orientation management module 623 calls the config management module 624 to generate screen configuration information (config) indicating that the current display orientation is the landscape orientation, the generated config can be fed back to the video application 610, so that the video application 610 can call the corresponding display resource layout display interface based on the config. The feedback process can be implemented, for example, by calling the onConfigurationChanged function to send or call back the config to the video application 610. After the above-mentioned screen configuration information (config) indicating that the current display orientation is the landscape orientation is fed back to the video application 610, the video application 610 can load the landscape display resource based on the screen configuration information and the full-screen layout parameters under the landscape display resource, and use the current screen display orientation as the landscape orientation layout full-screen playback interface to display the video content in full screen.
708:视频应用610基于接收到的屏幕配置信息,在竖屏方向上进行全屏显示。708 : The video application 610 performs full-screen display in the vertical direction based on the received screen configuration information.
示例性地,通过反馈视频应用610获取修改后的config,获取到上述屏幕配置信息后,可以基于该屏幕配置信息中的竖屏方向对应的宽高比以及指示当前屏幕显示方向为横屏方向的信息,调用横屏显示资源以及系统的绘制渲染进程绘制竖屏方向上的全屏播放界面。可以理解,该全屏播放界面对应的界面布局能够与竖屏方向对应的屏幕宽高比相对应。因此,用户便可以在电子设备100保持竖屏方向的情况下,获得较好的全屏体验。Exemplarily, after obtaining the modified config through the feedback video application 610 and obtaining the above screen configuration information, the horizontal screen display resource and the system's drawing rendering process can be called to draw a full-screen playback interface in the vertical screen direction based on the aspect ratio corresponding to the vertical screen direction in the screen configuration information and the information indicating that the current screen display direction is the horizontal screen direction. It can be understood that the interface layout corresponding to the full-screen playback interface can correspond to the screen aspect ratio corresponding to the vertical screen direction. Therefore, the user can obtain a better full-screen experience while keeping the electronic device 100 in the vertical screen direction.
作为示例,继续参考上述图8a所示,电子设备100在检测到用户在视频播放界面810点击全屏显示控件811的操作后,该电子设备100的系统可以执行上述步骤702至708的交互过程,确定采用竖屏方向进行全屏显示,电子设备100的屏幕则可以相应显示图8a所示的全屏显示界面820。As an example, referring to FIG8a above, after the electronic device 100 detects that the user clicks on the full-screen display control 811 in the video playback interface 810, the system of the electronic device 100 can execute the interactive process of steps 702 to 708 above, determine to use the vertical screen orientation for full-screen display, and the screen of the electronic device 100 can correspondingly display the full-screen display interface 820 shown in FIG8a.
如图8a所示,该全屏显示界面820可以呈现横屏状态对应的全屏体验。例如该全屏显示界面820所显示的视频内容上方的空白区域可以用于显示弹幕,视频内容下方的空白区域可以用于显示播放控件,进而为用户带来较好的沉浸式全屏体验。As shown in Figure 8a, the full-screen display interface 820 can present a full-screen experience corresponding to the horizontal screen state. For example, the blank area above the video content displayed by the full-screen display interface 820 can be used to display bullet comments, and the blank area below the video content can be used to display playback controls, thereby providing users with a better immersive full-screen experience.
参考图8b所示,在电子设备100所显示的全屏显示界面820上,用户还可以点击左上角的退出控件821,退出全屏显示。此时,电子设备100则可以响应于用户的操作,显示图8b所示的视频播放界 面830。该视频播放界面830可以包括全屏显示控件831,该视频播放界面830可以与上述图8a所示的视频播放界面810相同,相应地,全屏显示控件831也可以与上述图8a所示的全屏显示控件811相同。Referring to FIG8b, on the full-screen display interface 820 displayed by the electronic device 100, the user can also click the exit control 821 in the upper left corner to exit the full-screen display. At this time, the electronic device 100 can respond to the user's operation and display the video playback interface shown in FIG8b. The video playback interface 830 may include a full screen display control 831. The video playback interface 830 may be the same as the video playback interface 810 shown in FIG. 8a. Accordingly, the full screen display control 831 may also be the same as the full screen display control 811 shown in FIG. 8a.
在电子设备100以竖屏方向进行全屏显示后,还可以继续执行下述步骤709至713。After the electronic device 100 performs full-screen display in the vertical orientation, the following steps 709 to 713 may be further performed.
709:视频应用610接收到用户旋转设备放置方向或者折叠屏幕的操作。709: The video application 610 receives an operation from the user to rotate the device or fold the screen.
示例性地,在电子设备100运行视频应用610并以竖屏方向进行全屏显示播放视频的过程中,如果检测到用户旋转该电子设备100的放置方向,视频应用610则可以接收到用户旋转设备放置方向的相应操作请求,并生成相应的切换显示方向的请求。在一些实施例中,例如上述电子设备100为上述图2b所示例的折叠屏手机,则当该电子设备100在运行视频应用610并以竖屏方向进行全屏显示播放视频的过程中,如果检测到用户折叠屏幕的操作,视频应用610则可以相应接收到相应的操作事件并生成相应的切换显示方向的请求。此时,电子设备100的屏幕尺寸信息也会产生较大变化,不再是宽高比接近1:1的屏幕尺寸,因此如果继续全屏显示,则需要切换至折叠屏幕后对应的横屏方向进行全屏显示。Exemplarily, when the electronic device 100 runs the video application 610 and plays the video in full screen display in the portrait orientation, if it is detected that the user rotates the placement direction of the electronic device 100, the video application 610 can receive the corresponding operation request of the user to rotate the placement direction of the device, and generate a corresponding request to switch the display direction. In some embodiments, for example, the above-mentioned electronic device 100 is a folding screen mobile phone as illustrated in Figure 2b above, then when the electronic device 100 runs the video application 610 and plays the video in full screen display in the portrait orientation, if it is detected that the user folds the screen, the video application 610 can receive the corresponding operation event and generate a corresponding request to switch the display direction. At this time, the screen size information of the electronic device 100 will also change significantly, and it is no longer a screen size with an aspect ratio close to 1:1. Therefore, if the full screen display continues, it is necessary to switch to the corresponding horizontal screen direction after the folded screen for full screen display.
作为示例,图9a至图9b根据本申请实施例分别示出了一种用户操作对应的界面变化。As an example, FIG. 9a to FIG. 9b respectively illustrate an interface change corresponding to a user operation according to an embodiment of the present application.
参考图9a所示,电子设备100在显示图9a所示的全屏播放界面910的过程中,用户例如可以操作电子设备100向左旋转设备,使电子设备100由竖向放置旋转到横向放置。在另一些实施例中,用户也可以操作电子设备100向右旋转设备,或者翻转电子设备100至横屏方向等,在此不做限制。此时,电子设备100的系统内可以执行本步骤709至下述步骤713,并显示图9a所示的横屏方向的全屏播放界面920。Referring to FIG. 9a , when the electronic device 100 is displaying the full-screen playback interface 910 shown in FIG. 9a , the user can, for example, operate the electronic device 100 to rotate the device to the left, so that the electronic device 100 is rotated from a vertical position to a horizontal position. In other embodiments, the user can also operate the electronic device 100 to rotate the device to the right, or flip the electronic device 100 to a horizontal screen orientation, etc., which are not limited here. At this time, the system of the electronic device 100 can execute this step 709 to the following step 713, and display the full-screen playback interface 920 in the horizontal screen orientation shown in FIG. 9a .
参考图9b所示,如果上述电子设备100为折叠屏手机,在显示图9b所示的全屏播放界面910的过程中,用户例如可以折叠(内折或者外折)该电子设备100的屏幕,使电子设备100通过1/2屏幕进行全屏显示。此时,电子设备100的系统内可以执行本步骤709至下述步骤713,并显示图9b所示的横屏方向的全屏播放界面930。可以理解,参考全屏播放界面930上播放的视频内容显示方向,折叠屏幕后电子设备100所显示的界面对应的屏幕宽度大于高度的方向仍可以预设上述横屏方向。而该方向与电子设备100的屏幕展开状态下的横屏方向可以保持一致。在此不做限制。Referring to FIG9b, if the electronic device 100 is a folding screen mobile phone, in the process of displaying the full-screen playback interface 910 shown in FIG9b, the user can, for example, fold (fold inward or outward) the screen of the electronic device 100 so that the electronic device 100 is displayed in full screen through 1/2 of the screen. At this time, the system of the electronic device 100 can execute this step 709 to the following step 713, and display the full-screen playback interface 930 in the horizontal screen direction shown in FIG9b. It can be understood that, with reference to the display direction of the video content played on the full-screen playback interface 930, the direction in which the screen width corresponding to the interface displayed by the electronic device 100 after the screen is folded is greater than the height can still preset the above-mentioned horizontal screen direction. And this direction can be consistent with the horizontal screen direction of the electronic device 100 when the screen is unfolded. No restriction is made here.
可以理解,在另一些实施例中,当电子设备100运行其他应用程序,例如办公应用等,并以竖屏方向进行全屏显示的过程中,如果检测到用户旋转设备放置方向的操作或者折叠屏幕的操作,相应应用程序也可以对应生成切换显示方向的请求。本申请在此不做限制。It is understood that in other embodiments, when the electronic device 100 runs other applications, such as office applications, and displays the application in full screen in portrait orientation, if a user rotates the device or folds the screen, the corresponding application may generate a request to switch the display orientation. This application is not limited to this.
710:视频应用610通过Activity管理模块621通知设备方向管理模块623处理切换显示方向的请求。710: The video application 610 notifies the device direction management module 623 through the Activity management module 621 to process the request to switch the display direction.
示例性地,视频应用610可以将所生成的切换显示方向的请求发送给位于应用框架层的Activity管理模块621。进而,Activity管理模块621则可以将需要设备方向管理模块623处理的上述切换显示方向的请求,通知设备方向管理模块623进行处理。具体可以参考上述步骤703中相关描述,在此不做赘述。Exemplarily, the video application 610 may send the generated request for switching the display direction to the Activity management module 621 located at the application framework layer. Furthermore, the Activity management module 621 may notify the device direction management module 623 of the request for switching the display direction that needs to be processed by the device direction management module 623 for processing. For details, please refer to the relevant description in the above step 703, which will not be repeated here.
711:设备方向管理模块623控制屏幕显示方向切换至横屏方向,并调用config管理模块622生成指示屏幕显示方向已切换至横屏方向的屏幕配置信息。其中,该屏幕配置信息包括横屏方向对应的屏幕尺寸信息。711: The device orientation management module 623 controls the screen display orientation to switch to the horizontal orientation, and calls the config management module 622 to generate screen configuration information indicating that the screen display orientation has switched to the horizontal orientation. The screen configuration information includes screen size information corresponding to the horizontal orientation.
示例性地,设备方向管理模块623可以接收到Activity管理模块621发来切换显示方向的请求,确定需要将当前的屏幕显示方向切换为横屏方向进行全屏显示。此时,设备方向管理模块623则可以调用config管理模块622生成默认的指示当前屏幕方向已切换至横屏方向的屏幕配置信息。该屏幕配置信息的生成过程,可以不涉及上述步骤706中的修改过程,直接将对应于当前的横屏方向生成的config作为待反馈的屏幕配置信息即可。向对应的宽高比设置为横屏方向对应的宽高比。例如,设备方向管理模块623可以调用rotateDisplayAndUpdateConfig方法,来调用config管理模块622将当前config中的宽高比信息更新为当前横屏方向对应设置的屏幕配置信息,以及当前横屏方向对应的宽高比、或者折叠屏幕后的横屏方向对应的宽高比。Exemplarily, the device orientation management module 623 may receive a request from the Activity management module 621 to switch the display orientation, and determine that the current screen display orientation needs to be switched to the landscape orientation for full-screen display. At this time, the device orientation management module 623 may call the config management module 622 to generate a default screen configuration information indicating that the current screen orientation has been switched to the landscape orientation. The generation process of the screen configuration information may not involve the modification process in the above step 706, and the config generated corresponding to the current landscape orientation may be directly used as the screen configuration information to be fed back. The corresponding aspect ratio is set to the aspect ratio corresponding to the landscape orientation. For example, the device orientation management module 623 may call the rotateDisplayAndUpdateConfig method to call the config management module 622 to update the aspect ratio information in the current config to the screen configuration information corresponding to the current landscape orientation, as well as the aspect ratio corresponding to the current landscape orientation, or the aspect ratio corresponding to the landscape orientation after the screen is folded.
例如,此时config管理模块622可以将执行上述步骤706时生成的config更新为系统默认配置的横屏方向对应的config,例如将“Config{mOrientation=land mRotation=ROTATION_90mBound=W x H}”更新为“Config{mOrientation=land mRotation=ROTATION_90mBound=W'x H'}”。其中,W'x H'是系统默认配置的横屏方向对应的对应的屏幕尺寸信息。可以理解,在上述图9a所示 的旋转操作场景中,W'=H,H'=W;在上述图9b所示的折叠屏幕的操作场景中,W'=H,H'=1/2W。For example, at this time, the config management module 622 can update the config generated when executing the above step 706 to the config corresponding to the horizontal screen orientation of the system default configuration, for example, update "Config{mOrientation=land mRotation=ROTATION_90mBound=W x H}" to "Config{mOrientation=land mRotation=ROTATION_90mBound=W'x H'}". Wherein, W'x H' is the corresponding screen size information corresponding to the horizontal screen orientation of the system default configuration. It can be understood that in the above FIG. 9a, In the rotation operation scenario, W'=H, H'=W; in the folding screen operation scenario shown in FIG. 9b above, W'=H, H'=1/2W.
712:设备方向管理模块623将更新后的屏幕配置信息反馈给视频应用610。712 : The device orientation management module 623 feeds back the updated screen configuration information to the video application 610 .
示例性地,设备方向管理模块623可以将执行上述步骤711更新后的config反馈给视频应用610,例如可以通过调用onConfigurationChanged函数发送或者说回调给视频应用610来实现。Exemplarily, the device orientation management module 623 may feed back the updated config after executing the above step 711 to the video application 610 , for example, by calling the onConfigurationChanged function to send or call back to the video application 610 .
713:视频应用610基于更新后的屏幕配置信息,在横屏方向上进行全屏显示。713: The video application 610 performs full-screen display in the horizontal direction based on the updated screen configuration information.
示例性地,视频应用610获得系统反馈的横屏方向对应的config后,可以基于横屏显示资源下的全屏布局参数加载横屏显示资源,布局适应当前横屏方向对应的屏幕宽高比的全屏播放界面。Exemplarily, after obtaining the config corresponding to the landscape orientation fed back by the system, the video application 610 can load the landscape display resource based on the full-screen layout parameters under the landscape display resource, and layout a full-screen playback interface that adapts to the screen aspect ratio corresponding to the current landscape orientation.
可以理解,电子设备100在显示其他界面时,如果检测到用户旋转设备放置方向的操作,也可以相应切换显示方向并切换至相应显示方向的全屏播放界面或者其他界面,在此不做赘述。It is understandable that when the electronic device 100 is displaying other interfaces, if it detects that the user rotates the device placement direction, it can also switch the display direction accordingly and switch to the full-screen playback interface or other interface of the corresponding display direction, which is not elaborated here.
基于上述步骤701至713的交互流程,对于屏幕宽高比接近1:1的电子设备,本申请实施例所提供的全屏显示方法在电子设备100的系统内通过各软件结构之间的交互,能够在不依赖于应用程序的竖屏显示资源中是否适配有全屏布局参数的情况下,仍可以保持竖屏方向进行全屏显示。而当用户主动旋转设备放置方向或者折叠屏幕时,基于本申请方案电子设备也可以自如的切换至横屏方向进行全屏显示。如此,用户可以在电子设备的竖屏方向或横屏方向均能获得较好的全屏体验。Based on the interaction process of steps 701 to 713 above, for electronic devices with a screen aspect ratio close to 1:1, the full-screen display method provided in the embodiment of the present application can maintain the vertical screen orientation for full-screen display through the interaction between various software structures in the system of the electronic device 100, regardless of whether the full-screen layout parameters are adapted in the vertical screen display resources of the application. When the user actively rotates the device placement direction or folds the screen, the electronic device based on the solution of the present application can also switch to the horizontal screen orientation for full-screen display. In this way, the user can get a better full-screen experience in both the vertical screen orientation or the horizontal screen orientation of the electronic device.
为了便于更全面的理解本申请实施例所提供的全屏显示方法,下面结合另一流程图简单介绍以电子设备100为执行主体,实现本申请实施例提供的全屏显示方法的具体实施过程。In order to facilitate a more comprehensive understanding of the full-screen display method provided in the embodiment of the present application, the following briefly introduces the specific implementation process of the full-screen display method provided in the embodiment of the present application with the electronic device 100 as the execution subject in conjunction with another flowchart.
图10根据本申请实施例示出了一种全屏显示方法的实施流程。可以理解,图10所示流程的各步骤执行主体可以为电子设备100。为简化描述,以下介绍图10所示流程各步骤的执行过程时,将不再重复介绍各步骤的执行主体。FIG10 shows an implementation process of a full-screen display method according to an embodiment of the present application. It can be understood that the execution subject of each step of the process shown in FIG10 can be the electronic device 100. To simplify the description, when introducing the execution process of each step of the process shown in FIG10 below, the execution subject of each step will not be repeatedly introduced.
1001:接收到用户指示进行全屏显示的操作。1001: receiving a user instruction to perform a full-screen display operation.
示例性地,用户指示进行全屏显示的操作,可以参考上述步骤701中相关描述,在此不做赘述。Exemplarily, the operation of the user instructing to perform full-screen display may refer to the relevant description in the above step 701, which will not be described in detail here.
1002:判断当前显示方向是否为竖屏方向。若判断结果为是,则继续执行下述步骤1003,进一步判断是否需要切换显示方向;若判断结果为否,则可以执行下述步骤1007至1008,以横屏方向进行全屏显示。1002: Determine whether the current display orientation is a portrait orientation. If the determination result is yes, continue to execute the following step 1003 to further determine whether the display orientation needs to be switched; if the determination result is no, then execute the following steps 1007 to 1008 to perform full screen display in a landscape orientation.
示例性地,电子设备100判断当前显示方向是否为竖屏方向的过程,可以参考上述步骤704中相关描述,在此不做赘述。For example, the process of the electronic device 100 determining whether the current display orientation is a portrait orientation may refer to the relevant description in the above step 704 and will not be described in detail here.
1003:根据当前竖屏方向对应的宽高比,判断是否切换至横屏方向进行全屏显示。若判断结果为是,则继续执行下述步骤1004至1005,以竖屏方向进行全屏显示;若判断结果为否,则可以执行下述步骤1007至1008,以横屏方向进行全屏显示。1003: According to the aspect ratio corresponding to the current portrait orientation, determine whether to switch to the landscape orientation for full screen display. If the determination result is yes, continue to execute the following steps 1004 to 1005 to perform full screen display in the portrait orientation; if the determination result is no, then execute the following steps 1007 to 1008 to perform full screen display in the landscape orientation.
示例性地,电子设备100判断是否切换至横屏方向进行全屏显示的过程,可以参考上述步骤705中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 determining whether to switch to the horizontal screen orientation for full-screen display may refer to the relevant description in the above step 705, which will not be described in detail here.
1004:控制屏幕显示方向保持竖屏方向,并生成指示屏幕显示方向为横屏方向但包括竖屏方向对应屏幕尺寸信息的屏幕配置信息。1004: Control the screen display direction to maintain the vertical screen direction, and generate screen configuration information indicating that the screen display direction is the horizontal screen direction but including screen size information corresponding to the vertical screen direction.
示例性地,电子设备100生成以竖屏方向进行全屏显示的屏幕配置信息的过程,可以参考上述步骤706中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 generating screen configuration information for full-screen display in the portrait orientation may refer to the relevant description in the above step 706, which will not be described in detail here.
1005:在竖屏方向上进行全屏显示。1005: Full screen display in the vertical direction.
示例性地,电子设备100基于屏幕配置信息,在竖屏方向上进行全屏显示的过程,可以参考上述步骤707至708中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 performing full-screen display in the vertical direction based on the screen configuration information may refer to the relevant descriptions in the above steps 707 to 708, which will not be described in detail here.
1006:接收到用户旋转设备放置方向或者折叠屏幕的操作。1006: receiving an operation from the user to rotate the device or fold the screen.
示例性地,用户旋转设备放置方向或者折叠屏幕的操作,可以参考上述步骤709中相关描述,在此不做赘述。Exemplarily, the operation of the user rotating the device placement direction or folding the screen can refer to the relevant description in the above step 709, which will not be repeated here.
1007:控制屏幕显示方向切换为横屏方向,并生成指示屏幕显示方向已切换至横屏方向的屏幕配置信息。其中,该默认的屏幕配置信息可以包括指示当前横屏方向的信息以及横屏方向对应的屏幕尺寸信息。1007: Control the screen display direction to switch to the horizontal screen direction, and generate screen configuration information indicating that the screen display direction has switched to the horizontal screen direction. The default screen configuration information may include information indicating the current horizontal screen direction and screen size information corresponding to the horizontal screen direction.
示例性地,电子设备100生成以横屏方向进行全屏显示的屏幕配置信息的过程,可以参考上述步骤711中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 generating screen configuration information for full-screen display in the horizontal orientation may refer to the relevant description in the above step 711, which will not be described in detail here.
1008:在横屏方向上进行全屏显示。 1008: Full screen display in horizontal orientation.
示例性地,电子设备100基于横屏方向对应默认的屏幕配置信息,在横屏方向上进行全屏显示的过程,可以参考上述步骤712至713中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 performing full-screen display in the horizontal direction based on the default screen configuration information corresponding to the horizontal direction can refer to the relevant descriptions in the above steps 712 to 713, which will not be repeated here.
本申请实施例介绍了一种全屏显示方法的具体实现过程,该实现过程中包括两个判断步骤,即先判断当前电子设备100的显示方向是否为竖屏方向,再判断当前竖屏方向是否需要切换到横屏方向进行全屏显示的过程。下面结合另一实施例介绍另一种全屏显示方法的具体实现过程。The embodiment of the present application introduces a specific implementation process of a full-screen display method, which includes two judgment steps, namely, first judging whether the current display orientation of the electronic device 100 is a vertical orientation, and then judging whether the current vertical orientation needs to be switched to a horizontal orientation for full-screen display. The following introduces another specific implementation process of a full-screen display method in conjunction with another embodiment.
实施例2Example 2
本申请实施例提供了另一种全屏显示方法的具体实现过程。与上述实施例1提供的具体实现过程不同的是,本申请实施例提供的具体实现过程可以根据系统检测到的当前设备放置方向对应的屏幕显示方向、以及当前显示方向对应的屏幕尺寸信息直接判断是否切换至横屏方向进行全屏显示、或者说判断是否需要保持竖屏方向并生成指示横屏方向的屏幕配置信息。即,将实施例1中涉及的判断当前显示方向是否为竖屏方向、以及判断是否切换至横屏方向进行全屏显示的过程,在一个判断步骤中实现。The embodiment of the present application provides another specific implementation process of the full-screen display method. Different from the specific implementation process provided in the above-mentioned embodiment 1, the specific implementation process provided in the embodiment of the present application can directly determine whether to switch to the horizontal screen direction for full-screen display, or determine whether to maintain the vertical screen direction and generate screen configuration information indicating the horizontal screen direction, based on the screen display direction corresponding to the current device placement direction detected by the system and the screen size information corresponding to the current display direction. That is, the process of determining whether the current display direction is the vertical screen direction and determining whether to switch to the horizontal screen direction for full-screen display involved in embodiment 1 is implemented in one judgment step.
具体地,图11根据本申请实施例示出了另一种全屏显示方法的交互流程。可以理解,图11所示交互流程涉及上述图6所示的视频应用610、Activity管理模块621以及设备方向管理模块623之间的交互。Specifically, Figure 11 shows an interaction process of another full-screen display method according to an embodiment of the present application. It can be understood that the interaction process shown in Figure 11 involves the interaction between the video application 610, the Activity management module 621 and the device direction management module 623 shown in Figure 6 above.
在此需声明的是,本申请实施例中对方法、流程中的步骤进行编号是为了便于引用,而不是限定先后顺序,各步骤之间如有先后顺序,当以文字说明为准。It should be stated here that the steps in the methods and processes in the embodiments of the present application are numbered for ease of reference, rather than to limit the order of precedence. If there is an order between the steps, the text description shall prevail.
如图11所示,该交互流程可以包括以下步骤:As shown in FIG. 11 , the interaction process may include the following steps:
1101:视频应用610接收到用户指示进行全屏显示的操作。1101: The video application 610 receives a user instruction to perform a full-screen display operation.
1102:视频应用610向Activity管理模块621发送全屏显示请求。1102 : The video application 610 sends a full-screen display request to the Activity management module 621 .
1103:Activity管理模块621通知设备方向管理模块623处理接收到的全屏显示请求。1103: The Activity management module 621 notifies the device orientation management module 623 to process the received full-screen display request.
上述步骤1101至1103的执行过程与上述实施例1中图7所示流程中的步骤701至703对应相同,具体可以参考上述步骤701至703中相关描述,在此不做赘述。The execution process of the above steps 1101 to 1103 is the same as that of steps 701 to 703 in the process shown in Figure 7 in the above embodiment 1. For details, please refer to the relevant descriptions in the above steps 701 to 703, which will not be repeated here.
1104:设备方向管理模块623根据当前显示方向以及对应的宽高比,判断是否切换至横屏方向进行全屏显示。若判断结果为是,则可以继续执行下述步骤1110至1112,以横屏方向进行全屏显示;若判断结果为否,则可以继续执行下述步骤1105至1107,以竖屏方向进行全屏显示。1104: The device orientation management module 623 determines whether to switch to the horizontal orientation for full-screen display according to the current display orientation and the corresponding aspect ratio. If the determination result is yes, the following steps 1110 to 1112 may be continued to be performed to perform full-screen display in the horizontal orientation; if the determination result is no, the following steps 1105 to 1107 may be continued to be performed to perform full-screen display in the vertical orientation.
示例性地,设备方向管理模块623响应于接收到的全屏显示请求,可以先基于当前显示方向对应的宽高比,判断当前显示方向是否需要切换。其中,在本申请实施例中,上述宽高比例如可以是当前显示方向对应的宽高比。基于此,判断当前显示方向是否需要切换的方式,例如可以通过将当前显示方向对应的宽高比与预设范围进行比较,来确定判断结果。例如,上述预设范围为[0.9,1.1],则判断当前显示方向是否需要切换的结果可以包括以下几种情形:Exemplarily, in response to the received full-screen display request, the device orientation management module 623 may first determine whether the current display orientation needs to be switched based on the aspect ratio corresponding to the current display orientation. In the embodiment of the present application, the aspect ratio may be, for example, the aspect ratio corresponding to the current display orientation. Based on this, the method for determining whether the current display orientation needs to be switched may be, for example, by comparing the aspect ratio corresponding to the current display orientation with a preset range to determine the judgment result. For example, if the preset range is [0.9, 1.1], the result of determining whether the current display orientation needs to be switched may include the following situations:
(1)若当前显示方向的宽高比小于0.9,表明此时屏幕宽度小于屏幕高度,并且宽高差异较大,如果全屏显示则需要切换至横屏方向,才能获得较好的全屏体验。因此,此种情形下,判断结果为是,即需要切换至横屏方向。可以理解,此种情形下,如果系统检测到电子设备已经横向放置,则当前的横屏方向进行全屏显示即可;如果系统检测到电子设备竖向放置,则该电子设备的屏幕显示方向可以切换至横屏方向。此时用户可以根据显示方向的旋转对应引起的显示内容的旋转,旋转电子设备使其转动至横向放置即可。(1) If the aspect ratio of the current display direction is less than 0.9, it means that the screen width is less than the screen height, and the difference between the width and height is large. If it is displayed in full screen, it needs to be switched to the horizontal screen direction to obtain a better full screen experience. Therefore, in this case, the judgment result is yes, that is, it is necessary to switch to the horizontal screen direction. It can be understood that in this case, if the system detects that the electronic device is placed horizontally, the current horizontal screen direction can be displayed in full screen; if the system detects that the electronic device is placed vertically, the screen display direction of the electronic device can be switched to the horizontal screen direction. At this time, the user can rotate the electronic device to a horizontal position according to the rotation of the display content caused by the rotation of the display direction.
(2)若当前显示方向的宽高比在[0.9,1.1]内,表明此时屏幕宽度小于屏幕高度,但宽高差异较小,此种情形下,为了简化用户操作提高用户体验,如果系统检测到电子设备竖向放置,则进行全屏显示时也可以保持当前的竖屏方向,此时判断结果可以为否,即不需要切换至横屏方向,可以执行下述步骤1105,保持竖屏方向但需生成指示屏幕显示方向为横屏方向的屏幕配置信息,并将此时竖屏方向的屏幕尺寸信息设置在该屏幕配置信息中。(2) If the aspect ratio of the current display direction is within [0.9, 1.1], it indicates that the screen width is smaller than the screen height, but the difference between the width and height is small. In this case, in order to simplify user operations and improve user experience, if the system detects that the electronic device is placed vertically, the current vertical screen orientation can be maintained during full-screen display. In this case, the judgment result can be no, that is, there is no need to switch to the horizontal screen orientation. The following step 1105 can be executed to maintain the vertical screen orientation but generate screen configuration information indicating that the screen display orientation is the horizontal screen orientation, and set the screen size information of the vertical screen orientation in the screen configuration information.
如果系统检测到电子设备横向放置,则电子设备此时的屏幕显示方向已经切换至横屏方向,保持当前的横屏方向进行全屏显示即可。此时判断结果可以为是,执行下述步骤1110,用户在系统上设置为竖向或横向,按照设置来[0.9,1.1]If the system detects that the electronic device is placed horizontally, the screen display direction of the electronic device has been switched to the horizontal direction, and the current horizontal direction can be maintained for full screen display. At this time, the judgment result may be yes, and the following step 1110 is executed. The user sets the system to vertical or horizontal, and the setting is followed [0.9,1.1]
(3)若当前显示方向的宽高比大于1.1,表明此时屏幕宽度大于屏幕高度,并且宽高差异较大,此种情形下,如果系统检测到电子设备竖向放置,则相应地屏幕显示方向应保持为竖屏方向,则判断结果为否,则需要执行下述步骤1105,保持竖屏方向但需生成指示屏幕显示方向为横屏方向的屏幕配置 信息,并将此时竖屏方向的屏幕尺寸信息设置在该屏幕配置信息中。(3) If the aspect ratio of the current display direction is greater than 1.1, it indicates that the screen width is greater than the screen height and the difference between the width and height is large. In this case, if the system detects that the electronic device is placed vertically, the screen display direction should be kept in the vertical direction. If the judgment result is no, the following step 1105 needs to be executed to keep the vertical direction but generate a screen configuration indicating that the screen display direction is the horizontal direction. Information, and set the screen size information in the vertical direction at this time in the screen configuration information.
如果系统检测到电子设备横向放置,相应地屏幕显示方向已切换至横屏方向,此时判断结果可以为是,执行下述步骤1110,控制屏幕显示方向切换至横屏方向,并生成指示屏幕显示方向已经切换至横屏方向的屏幕配置信息,在横屏方向进行全屏显示。If the system detects that the electronic device is placed horizontally and the screen display direction has been switched to the horizontal direction, the judgment result can be yes, and the following step 1110 is executed to control the screen display direction to switch to the horizontal direction, and generate screen configuration information indicating that the screen display direction has been switched to the horizontal direction, and perform full-screen display in the horizontal direction.
可以理解,在另一些实施例中,上述预设范围的上限值和下限值也可以为其他值,例如预设范围也可以是[0.8,1]等,在此不做限制。It can be understood that in other embodiments, the upper limit value and the lower limit value of the above preset range may also be other values. For example, the preset range may also be [0.8, 1], etc., which is not limited here.
1105:设备方向管理模块623控制屏幕显示方向保持竖屏方向,并调用config管理模块622生成指示当前显示方向为横屏方向的屏幕配置信息。1105: The device orientation management module 623 controls the screen display orientation to maintain the vertical orientation, and calls the config management module 622 to generate screen configuration information indicating that the current display orientation is the horizontal orientation.
本步骤1105的执行过程与上述实施例1中图7所示流程中的步骤706对应的执行内容相同,具体可以参考上述步骤706中相关描述,在此不做赘述。The execution process of this step 1105 is the same as the execution content corresponding to step 706 in the process shown in Figure 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 706, which will not be repeated here.
1106:设备方向管理模块623将生成的屏幕配置信息反馈给视频应用610。1106 : The device orientation management module 623 feeds back the generated screen configuration information to the video application 610 .
本步骤1106的执行过程与上述实施例1中图7所示流程中的步骤707对应的执行内容相同,具体可以参考上述步骤707中相关描述,在此不做赘述。The execution process of step 1106 is the same as the execution content corresponding to step 707 in the process shown in FIG. 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 707, which will not be repeated here.
1107:视频应用610基于接收到的屏幕配置信息,在竖屏方向上进行全屏显示。1107 : The video application 610 performs full-screen display in the vertical direction based on the received screen configuration information.
本步骤1107的执行过程与上述实施例1中图7所示流程中的步骤708对应的执行内容相同,具体可以参考上述步骤708中相关描述,在此不做赘述。The execution process of step 1107 is the same as the execution content corresponding to step 708 in the process shown in FIG. 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 708, which will not be repeated here.
1108:视频应用610接收到用户旋转设备放置方向或者折叠屏幕的操作。1108: The video application 610 receives an operation from the user to rotate the device or fold the screen.
本步骤1108的执行过程与上述实施例1中图7所示流程中的步骤709对应的执行内容相同,具体可以参考上述步骤709中相关描述,在此不做赘述。The execution process of step 1108 is the same as the execution content corresponding to step 709 in the process shown in FIG. 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 709, which will not be repeated here.
1109:视频应用610通过Activity管理模块621通知设备方向管理模块623处理切换显示方向的请求。1109 : The video application 610 notifies the device direction management module 623 through the Activity management module 621 to process the request to switch the display direction.
本步骤1109的执行过程与上述实施例1中图7所示流程中的步骤710对应的执行内容相同,具体可以参考上述步骤710中相关描述,在此不做赘述。The execution process of step 1109 is the same as the execution content corresponding to step 710 in the process shown in FIG. 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 710, which will not be repeated here.
1110:设备方向管理模块623控制屏幕显示方向切换至横屏方向,并调用config管理模块622生成指示屏幕显示方向已切换至横屏方向的屏幕配置信息。1110: The device orientation management module 623 controls the screen display orientation to switch to the horizontal orientation, and calls the config management module 622 to generate screen configuration information indicating that the screen display orientation has switched to the horizontal orientation.
本步骤1110的执行过程与上述实施例1中图7所示流程中的步骤711对应的执行内容相同,具体可以参考上述步骤711中相关描述,在此不做赘述。The execution process of this step 1110 is the same as the execution content corresponding to step 711 in the process shown in Figure 7 in the above embodiment 1. For details, please refer to the relevant description of the above step 711, which will not be repeated here.
1111:设备方向管理模块623将更新后的屏幕配置信息反馈给视频应用610。1111 : the device orientation management module 623 feeds back the updated screen configuration information to the video application 610 .
本步骤1111的执行过程与上述实施例1中图7所示流程中的步骤712对应的执行内容相同,具体可以参考上述步骤712中相关描述,在此不做赘述。The execution process of step 1111 is the same as the execution content corresponding to step 712 in the process shown in FIG. 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 712, which will not be repeated here.
1112:视频应用610基于更新后的屏幕配置信息,在横屏方向上进行全屏显示。1112: The video application 610 performs full-screen display in the horizontal direction based on the updated screen configuration information.
本步骤1112的执行过程与上述实施例1中图7所示流程中的步骤713对应的执行内容相同,具体可以参考上述步骤713中相关描述,在此不做赘述。The execution process of step 1112 is the same as the execution content corresponding to step 713 in the process shown in FIG. 7 in the above embodiment 1. For details, please refer to the relevant description in the above step 713, which will not be repeated here.
基于上述步骤1101至1112的交互流程,对于宽高比在预设范围内的电子设备,本申请实施例所提供的全屏显示方法在电子设备100的系统内通过各软件结构之间的交互,能够在不依赖于应用程序的竖屏显示资源是否适配有全屏布局参数的情况下,仍可以保持竖屏方向进行全屏显示。而当用户主动旋转设备放置方向或者折叠屏幕时,基于本申请方案电子设备也可以自如的切换至用户操作指示的横屏方向进行全屏显示。如此,用户可以在电子设备的竖屏方向或横屏方向均能获得较好的全屏体验。Based on the interaction process of steps 1101 to 1112 above, for electronic devices with aspect ratios within a preset range, the full-screen display method provided in the embodiment of the present application can maintain the vertical screen orientation for full-screen display without relying on whether the vertical screen display resources of the application are adapted to the full-screen layout parameters through the interaction between various software structures in the system of the electronic device 100. When the user actively rotates the device placement direction or folds the screen, the electronic device based on the solution of the present application can also freely switch to the horizontal screen orientation indicated by the user's operation for full-screen display. In this way, the user can get a better full-screen experience in both the vertical screen orientation or the horizontal screen orientation of the electronic device.
为了便于更全面的理解本申请实施例所提供的全屏显示方法,下面结合另一流程图简单介绍以电子设备100为执行主体,实现本申请实施例提供的全屏显示方法的具体实施过程。In order to facilitate a more comprehensive understanding of the full-screen display method provided in the embodiment of the present application, the following briefly introduces the specific implementation process of the full-screen display method provided in the embodiment of the present application with the electronic device 100 as the execution subject in conjunction with another flowchart.
图12根据本申请实施例示出了一种全屏显示方法的实施流程。可以理解,图12所示流程的各步骤执行主体可以为电子设备100。为简化描述,以下介绍图12所示流程各步骤的执行过程时,将不再重复介绍各步骤的执行主体。FIG12 shows an implementation process of a full-screen display method according to an embodiment of the present application. It can be understood that the execution subject of each step of the process shown in FIG12 can be the electronic device 100. To simplify the description, when introducing the execution process of each step of the process shown in FIG12 below, the execution subject of each step will not be repeatedly introduced.
1201:接收到用户指示进行全屏显示的操作。1201: receiving a user instruction to perform a full-screen display operation.
示例性地,用户指示进行全屏显示的操作,可以参考上述步骤1101中相关描述,在此不做赘述。Exemplarily, the operation of the user instructing to perform full-screen display may refer to the relevant description in the above step 1101, which will not be described in detail here.
1202:根据当前屏幕显示方向对应的屏幕宽高比,判断是否切换至横屏方向进行全屏显示。若判断结果为是,则继续执行下述步骤1203至1204,以竖屏方向进行全屏显示;若判断结果为否,则可以执 行下述步骤1206至1207,以横屏方向进行全屏显示。1202: According to the screen aspect ratio corresponding to the current screen display direction, determine whether to switch to the horizontal screen direction for full screen display. If the judgment result is yes, continue to execute the following steps 1203 to 1204 to display the full screen in the vertical screen direction; if the judgment result is no, then you can execute Perform the following steps 1206 to 1207 to display the image in full screen in landscape orientation.
示例性地,电子设备100判断是否切换至横屏方向进行全屏显示的过程,可以参考上述步骤1104中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 determining whether to switch to the horizontal screen orientation for full-screen display may refer to the relevant description in the above step 1104 and will not be elaborated here.
1203:控制屏幕显示方向保持竖屏方向,并生成指示屏幕显示方向为横屏方向但包括竖屏方向对应屏幕尺寸信息的屏幕配置信息。1203: Control the screen display direction to maintain the vertical screen direction, and generate screen configuration information indicating that the screen display direction is the horizontal screen direction but including screen size information corresponding to the vertical screen direction.
示例性地,电子设备100生成以竖屏方向进行全屏显示的屏幕配置信息的过程,可以参考上述步骤1105中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 generating screen configuration information for full-screen display in the portrait orientation may refer to the relevant description in the above step 1105, which will not be described in detail here.
1204:在竖屏方向上进行全屏显示。1204: Full screen display in the vertical orientation.
示例性地,电子设备100基于屏幕配置信息,在竖屏方向上进行全屏显示的过程,可以参考上述步骤1106至1107中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 performing full-screen display in the vertical direction based on the screen configuration information can refer to the relevant descriptions in the above steps 1106 to 1107, which will not be repeated here.
1205:接收到用户旋转设备放置方向或者折叠屏幕的操作。1205: receiving an operation from the user to rotate the device or fold the screen.
示例性地,用户旋转设备放置方向或者折叠屏幕的操作,可以参考上述步骤1108中相关描述,在此不做赘述。Exemplarily, the operation of the user rotating the device placement direction or folding the screen can refer to the relevant description in the above step 1108, which will not be repeated here.
1206:控制屏幕显示方向切换为横屏方向,并生成指示屏幕显示方向已切换至横屏方向的屏幕配置信息。1206: Control the screen display direction to switch to the horizontal screen direction, and generate screen configuration information indicating that the screen display direction has switched to the horizontal screen direction.
示例性地,电子设备100生成以横屏方向进行全屏显示的第二显示信息的过程,可以参考上述步骤1110中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 generating the second display information for full-screen display in the horizontal orientation may refer to the relevant description in the above step 1110, which will not be described in detail here.
1207:在横屏方向上进行全屏显示。1207: Full screen display in landscape orientation.
示例性地,电子设备100基于横屏方向对应默认的屏幕配置信息,在横屏方向上进行全屏显示的过程,可以参考上述步骤1111至1112中相关描述,在此不做赘述。Exemplarily, the process of the electronic device 100 performing full-screen display in the horizontal direction based on the default screen configuration information corresponding to the horizontal direction can refer to the relevant description in the above steps 1111 to 1112, which will not be repeated here.
本申请实施例介绍了一种全屏显示方法的具体实现过程,该实现过程中可以将实施例1中涉及的判断当前显示方向是否为竖屏方向、以及判断是否切换至横屏方向进行全屏显示的过程,在一个判断步骤中实现。例如上述步骤1202中跟据系统检测到的当前设备放置方向对应的屏幕显示方向、以及当前显示方向对应的屏幕尺寸信息可以直接判断是否切换至横屏方向进行全屏显示、或者说判断是否需要保持竖屏方向并生成指示横屏方向的屏幕配置信息。只包括一个判断步骤,即基于当前显示方向的宽高比判断是否需要切换至横屏进行全屏显示的过程。如此,基于当期屏幕的宽高比直接确定是否切换至横屏方向进行全屏显示,简化了判断过程,利于提高电子设备的执行效率。The embodiment of the present application introduces a specific implementation process of a full-screen display method, in which the process of determining whether the current display direction is a portrait orientation and determining whether to switch to a landscape orientation for full-screen display involved in Example 1 can be implemented in one judgment step. For example, in the above step 1202, according to the screen display direction corresponding to the current device placement direction detected by the system, and the screen size information corresponding to the current display direction, it can be directly determined whether to switch to a landscape orientation for full-screen display, or it can be determined whether to maintain the portrait orientation and generate screen configuration information indicating the landscape orientation. It only includes one judgment step, that is, the process of determining whether to switch to a landscape orientation for full-screen display based on the aspect ratio of the current display direction. In this way, whether to switch to a landscape orientation for full-screen display is directly determined based on the aspect ratio of the current screen, which simplifies the judgment process and helps to improve the execution efficiency of the electronic device.
图13根据本申请实施例示出了一种电子设备100的硬件结构。FIG. 13 shows a hardware structure of an electronic device 100 according to an embodiment of the present application.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
在本申请实施例中,处理器110可以通过控制器控制执行本申请实施例提供的全屏显示方法的各个步骤,以根据用户实际需求实现竖屏方向或横屏方向的全屏显示过程。 In an embodiment of the present application, the processor 110 can control the execution of each step of the full-screen display method provided in the embodiment of the present application through a controller to implement a full-screen display process in a vertical or horizontal direction according to actual needs of the user.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从上述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。The charging management module 140 is used to receive charging input from a charger. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input via a wireless charging coil of the electronic device 100 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。The wireless communication module 160 can provide wireless communication solutions for application in the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Mini-LED,Micro-LED,Micro-OLED,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括 1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备100可以通过视频编解码器,GPU,显示屏194以及应用处理器等实现视频播放功能。The electronic device 100 can implement the video playback function through a video codec, a GPU, a display screen 194 and an application processor.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (universal flash storage, UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D may be the USB interface 130, or may be a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测该触摸操作的强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于视频播放界面上的全屏显示控件时,执行进行全屏显示的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作、或者触摸操作时间大于预设时长的触摸操作作用于视频播放界面时,可以执行快进播放的指令等。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the full-screen display control on the video playback interface, an instruction for full-screen display is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold, or a touch operation with a touch operation time greater than a preset time length acts on the video playback interface, a fast-forward playback instruction may be executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。The gyro sensor 180B may be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。 触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor may transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, at a different location from the display screen 194.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
马达191可以产生振动提示。Motor 191 can generate vibration prompts.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting the SIM card into or removing the SIM card from the SIM card interface 195 .
下面结合附图示例性的介绍电子设备100所搭载的操作系统架构。The operating system architecture of the electronic device 100 is exemplarily introduced below with reference to the accompanying drawings.
图14根据本申请实施例示出了一种电子设备100的系统架构。FIG. 14 shows a system architecture of an electronic device 100 according to an embodiment of the present application.
电子设备100的系统架构可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100系统的软件结构。The system architecture of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100 system.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
如图14所示,应用程序层可以包括一系列应用程序包。应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 14, the application layer may include a series of application packages. The application packages may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
应用程序框架层可以包括窗口管理服务,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。The application framework layer may include window management services, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理服务用于管理窗口程序。窗口管理服务可以获取显示屏大小,确定全屏显示所对应的宽高比,以及判断是否有状态栏,锁定屏幕,截取屏幕等。The window management service is used to manage window programs. The window management service can obtain the display size, determine the aspect ratio corresponding to full-screen display, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。该数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图 像渲染,合成,和图层处理等。The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, graphics Like rendering, compositing, and layer handling.
2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
下面结合用户点击全屏显示控件触发全屏显示的场景,示例性说明电子设备100软件以及硬件的工作流程。The following is an example of the workflow of the software and hardware of the electronic device 100, with reference to a scenario in which a user clicks on a full-screen display control to trigger full-screen display.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture static images or videos through the camera 193.
在说明书对“一个实施例”或“实施例”的引用意指结合实施例所描述的具体特征、结构或特性被包括在根据本申请实施例公开的至少一个范例实施方案或技术中。说明书中的各个地方的短语“在一个实施例中”的出现不一定全部指代同一个实施例。References to "one embodiment" or "an embodiment" in the specification mean that the specific features, structures, or characteristics described in conjunction with the embodiment are included in at least one exemplary implementation or technology disclosed according to the embodiment of the present application. The appearance of the phrase "in one embodiment" in various places in the specification does not necessarily all refer to the same embodiment.
本申请实施例的公开还涉及用于执行文本中的操作装置。该装置可以专门处于所要求的目的而构造或者其可以包括被存储在计算机中的计算机程序选择性地激活或者重新配置的通用计算机。这样的计算机程序可以被存储在计算机可读介质中,诸如,但不限于任何类型的盘,包括软盘、光盘、CD-ROM、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、EPROM、EEPROM、磁或光卡、专用集成电路(ASIC)或者适于存储电子指令的任何类型的介质,并且每个可以被耦合到计算机系统总线。此外,说明书中所提到的计算机可以包括单个处理器或者可以是采用针对增加的计算能力的多个处理器涉及的架构。The disclosure of the embodiment of the present application also relates to an operating device for executing the text. The device can be specially constructed for the required purpose or it can include a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program can be stored in a computer-readable medium, such as, but not limited to any type of disk, including a floppy disk, an optical disk, a CD-ROM, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic or optical card, an application-specific integrated circuit (ASIC) or any type of medium suitable for storing electronic instructions, and each can be coupled to a computer system bus. In addition, the computer mentioned in the specification may include a single processor or may be an architecture involving multiple processors for increased computing power.
另外,在本说明书所使用的语言已经主要被选择用于可读性和指导性的目的并且可能未被选择为描绘或限制所公开的主题。因此,本申请实施例公开旨在说明而非限制本文所讨论的概念的范围。 In addition, the language used in this specification has been primarily selected for readability and instructional purposes and may not be selected to describe or limit the disclosed subject matter. Therefore, the present application embodiment disclosure is intended to illustrate rather than limit the scope of the concepts discussed herein.

Claims (13)

  1. 一种全屏显示方法,应用于电子设备,所述电子设备用于显示第一应用,其特征在于,包括:A full-screen display method is applied to an electronic device, wherein the electronic device is used to display a first application, and is characterized by comprising:
    接收到第一用户操作,所述第一用户操作用于指示全屏显示所述第一应用的显示窗口;receiving a first user operation, where the first user operation is used to instruct to display a display window of the first application in full screen;
    确认所述电子设备当前放置方向为竖向且屏幕宽高比满足第一条件;Confirming that the current placement direction of the electronic device is vertical and the screen aspect ratio meets the first condition;
    在当前放置方向全屏显示所述第一应用的第一全屏窗口,在所述第一全屏窗口中加载所述第一应用的横屏显示资源,并且所述第一全屏窗口的窗口宽高比与竖屏方向对应的屏幕宽高比相适应。A first full-screen window of the first application is displayed in full screen in the current placement direction, a horizontal screen display resource of the first application is loaded in the first full-screen window, and a window aspect ratio of the first full-screen window is adapted to a screen aspect ratio corresponding to the vertical screen direction.
  2. 根据权利要求1所述的方法,其特征在于,所述在所述第一全屏窗口中加载所述第一应用的横屏显示资源,包括:The method according to claim 1, characterized in that loading the horizontal screen display resource of the first application in the first full-screen window comprises:
    基于所述第一应用的横屏显示资源下配置的全屏布局参数加载所述横屏显示资源。The horizontal screen display resource is loaded based on the full screen layout parameters configured under the horizontal screen display resource of the first application.
  3. 根据权利要求1所述的方法,其特征在于,所述第一应用的竖屏显示资源未配置全屏布局参数。The method according to claim 1 is characterized in that the vertical screen display resources of the first application are not configured with full-screen layout parameters.
  4. 根据权利要求3所述的方法,其特征在于,所述第一条件为:The method according to claim 3, characterized in that the first condition is:
    所述竖屏方向对应的屏幕宽高比在第一预设范围内。The screen aspect ratio corresponding to the vertical screen orientation is within a first preset range.
  5. 根据权利要求3所述的方法,其特征在于,所述在当前放置方向全屏显示所述第一应用的第一全屏窗口,包括:The method according to claim 3, characterized in that the step of displaying the first full-screen window of the first application in the current placement direction in full screen includes:
    响应于所述第一应用申请切换至横屏方向的第一请求,控制屏幕显示方向保持为竖屏方向,并向所述第一应用发送第一屏幕配置信息,其中所述第一屏幕配置信息包括指示所述电子设备的屏幕显示方向为横屏方向的第一信息、以及指示所述竖屏方向对应的屏幕宽高比的第二信息。In response to a first request from the first application to switch to a landscape orientation, the screen display orientation is controlled to remain in a portrait orientation, and first screen configuration information is sent to the first application, wherein the first screen configuration information includes first information indicating that the screen display orientation of the electronic device is a landscape orientation, and second information indicating the screen aspect ratio corresponding to the portrait orientation.
  6. 根据权利要求5所述的方法,其特征在于,所述控制屏幕显示方向保持为竖屏方向,并向所述第一应用发送第一屏幕配置信息,包括:The method according to claim 5, characterized in that the controlling the screen display direction to remain in a vertical direction and sending the first screen configuration information to the first application comprises:
    生成所述竖屏方向对应的第二屏幕配置信息,其中所述第一屏幕配置信息包括指示所述电子设备的屏幕显示方向为竖屏方向的第三信息、以及指示所述竖屏方向对应的屏幕宽高比的第四信息;generating second screen configuration information corresponding to the portrait orientation, wherein the first screen configuration information includes third information indicating that the screen display orientation of the electronic device is a portrait orientation, and fourth information indicating a screen aspect ratio corresponding to the portrait orientation;
    将所述第二屏幕配置信息中的所述第三信息修改为所述第一信息,生成所述第一屏幕配置信息。The third information in the second screen configuration information is modified into the first information to generate the first screen configuration information.
  7. 根据权利要求5或6所述的方法,其特征在于,所述在当前放置方向全屏显示所述第一应用的第一全屏窗口,包括:The method according to claim 5 or 6, characterized in that the step of displaying the first full-screen window of the first application in full screen in the current placement direction comprises:
    根据所述第一屏幕配置信息中的第一信息,所述第一应用基于所述横屏显示资源下的全局布局参数加载所述横屏显示资源;According to the first information in the first screen configuration information, the first application loads the horizontal screen display resource based on the global layout parameters under the horizontal screen display resource;
    根据所述第一屏幕配置信息中的第二信息,在当前的竖屏方向上布局并显示所述第一全屏窗口。The first full-screen window is laid out and displayed in the current vertical screen direction according to the second information in the first screen configuration information.
  8. 根据权利要求5至7中任一项所述的方法,其特征在于,所述第一屏幕配置信息、第二屏幕配置信息以及第三屏幕配置信息为config信息。The method according to any one of claims 5 to 7, characterized in that the first screen configuration information, the second screen configuration information and the third screen configuration information are config information.
  9. 根据权利要求1至7中任一项所述的方法,其特征在于,在保持所述电子设备竖向放置的情况下,所述方法还包括:The method according to any one of claims 1 to 7, characterized in that, while keeping the electronic device in a vertical position, the method further comprises:
    检测到所述电子设备的放置方向切换为横向;Detecting that the placement orientation of the electronic device is switched to landscape orientation;
    控制屏幕显示方向切换至横屏方向,在切换后的横屏方向上显示所述第一应用的第二全屏窗口,并在所述第二全屏窗口中加载所述横屏显示资源,并且所述第二全屏窗口的窗口宽高比与所述横屏方向对应的屏幕宽高比相适应。Control the screen display direction to switch to the horizontal screen direction, display the second full-screen window of the first application in the horizontal screen direction after switching, load the horizontal screen display resource in the second full-screen window, and the window aspect ratio of the second full-screen window is adapted to the screen aspect ratio corresponding to the horizontal screen direction.
  10. 根据权利要求1至7中任一项所述的方法,其特征在于,所述电子设备为展开状态下的第一折叠屏设备,所述第一折叠屏设备在折叠状态下的屏幕宽高比不满足所述第一条件,并且,所述方法还包括:The method according to any one of claims 1 to 7, characterized in that the electronic device is a first folding screen device in an unfolded state, the screen aspect ratio of the first folding screen device in a folded state does not meet the first condition, and the method further comprises:
    检测到将所述第一折叠屏设备从展开状态切换为折叠状态的折叠操作;Detecting a folding operation of switching the first folding screen device from an unfolded state to a folded state;
    控制屏幕显示方向切换至所述折叠状态下的横屏方向,在所述折叠状态下的横屏方向上显示所述第一应用的第三全屏窗口,并在所述第三全屏窗口中加载所述横屏显示资源,并且所述第三全屏窗口的窗口宽高比与所述第一折叠屏设备在折叠状态下的横屏方向对应的屏幕宽高比相适应。Control the screen display direction to switch to the horizontal screen direction in the folded state, display the third full-screen window of the first application in the horizontal screen direction in the folded state, load the horizontal screen display resource in the third full-screen window, and the window aspect ratio of the third full-screen window is adapted to the screen aspect ratio corresponding to the horizontal screen direction of the first folding screen device in the folded state.
  11. 根据权利要求1至7中任一项所述的方法,其特征在于,所述电子设备为折叠状态下的第二折叠屏设备,所述第二折叠屏设备在展开状态下的屏幕宽高比不满足所述第一条件,并且,所述方法还包括:The method according to any one of claims 1 to 7, characterized in that the electronic device is a second folding screen device in a folded state, and the screen aspect ratio of the second folding screen device in an unfolded state does not meet the first condition, and the method further comprises:
    检测到将所述第二折叠屏设备从折叠状态切换为展开状态的展开操作;Detecting an unfolding operation of switching the second folding screen device from a folded state to an unfolded state;
    控制屏幕显示方向切换至所述展开状态下的横屏方向,并在所述展开状态下的横屏方向上显示所述 第一应用的第四全屏窗口,并在所述第四全屏窗口中加载所述横屏显示资源,并且所述第四全屏窗口的窗口宽高比与所述第二折叠屏设备在展开状态下的横屏方向对应的屏幕宽高比相适应。Control the screen display direction to switch to the horizontal screen direction in the expanded state, and display the A fourth full-screen window of the first application is created, and the horizontal screen display resource is loaded in the fourth full-screen window, and the window aspect ratio of the fourth full-screen window is adapted to the screen aspect ratio corresponding to the horizontal screen direction of the second folding screen device in the unfolded state.
  12. 一种电子设备,其特征在于,包括:一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个程序,当所述一个或者多个程序被所述一个或多个处理器执行时,使得所述电子设备执行权利要求1至11中任一项所述的全屏显示方法。An electronic device, characterized in that it comprises: one or more processors; one or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the full-screen display method described in any one of claims 1 to 11.
  13. 一种计算机可读存储介质,其特征在于,所述存储介质上存储有指令,所述指令在计算机上执行时使所述计算机执行权利要求1至11中任一项所述的全屏显示方法。 A computer-readable storage medium, characterized in that instructions are stored on the storage medium, and when the instructions are executed on a computer, the computer executes the full-screen display method according to any one of claims 1 to 11.
PCT/CN2023/123605 2022-10-19 2023-10-09 Full-screen display method, electronic device and computer-readable storage medium WO2024082989A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211281948.XA CN117909001A (en) 2022-10-19 2022-10-19 Full screen display method, electronic device and computer readable storage medium
CN202211281948.X 2022-10-19

Publications (1)

Publication Number Publication Date
WO2024082989A1 true WO2024082989A1 (en) 2024-04-25

Family

ID=90693400

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/123605 WO2024082989A1 (en) 2022-10-19 2023-10-09 Full-screen display method, electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN117909001A (en)
WO (1) WO2024082989A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110430319A (en) * 2019-07-17 2019-11-08 咪咕动漫有限公司 A kind of processing method, terminal and computer readable storage medium
CN112130742A (en) * 2019-06-25 2020-12-25 华为技术有限公司 Full screen display method and device of mobile terminal
US20210012502A1 (en) * 2017-12-05 2021-01-14 Google Llc Method for converting landscape video to portrait mobile layout using a selection interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210012502A1 (en) * 2017-12-05 2021-01-14 Google Llc Method for converting landscape video to portrait mobile layout using a selection interface
CN112130742A (en) * 2019-06-25 2020-12-25 华为技术有限公司 Full screen display method and device of mobile terminal
CN110430319A (en) * 2019-07-17 2019-11-08 咪咕动漫有限公司 A kind of processing method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN117909001A (en) 2024-04-19

Similar Documents

Publication Publication Date Title
WO2021027747A1 (en) Interface display method and device
CN109977333B (en) Webpage display method and device, computer equipment and storage medium
US20210058704A1 (en) Speaker control method and mobile terminal
WO2022052772A1 (en) Application interface display method under multi-window mirroring scenario, and electronic device
WO2021104030A1 (en) Split-screen display method and electronic device
CN114546190A (en) Application display method and electronic equipment
WO2021129253A1 (en) Method for displaying multiple windows, and electronic device and system
CN110602321A (en) Application program switching method and device, electronic device and storage medium
CN111263002B (en) Display method and electronic equipment
CN107193524B (en) Multi-display device and method of operating the same
CN113961157B (en) Display interaction system, display method and equipment
CN112114912A (en) User interface layout method and electronic equipment
WO2021051982A1 (en) Method for calling hardware interface and electronic device
WO2023130921A1 (en) Method for page layout adapted to multiple devices, and electronic device
WO2021175272A1 (en) Method for displaying application information and related device
WO2024021519A1 (en) Card display method and terminal device
WO2022089407A1 (en) Display method and electronic device
WO2022161119A1 (en) Display method and electronic device
WO2022166713A1 (en) Electronic device and display method for application thereof, and medium
CN114489529A (en) Screen projection method of electronic device, medium thereof and electronic device
WO2022143180A1 (en) Collaborative display method, terminal device, and computer readable storage medium
WO2022001279A1 (en) Cross-device desktop management method, first electronic device, and second electronic device
WO2021190524A1 (en) Screenshot processing method, graphic user interface and terminal
WO2023179428A1 (en) Adaptive display method of interface, and terminal device
WO2023066165A1 (en) Animation effect display method and electronic device