CN115361468B - Display optimization method and device during screen rotation and storage medium - Google Patents

Display optimization method and device during screen rotation and storage medium Download PDF

Info

Publication number
CN115361468B
CN115361468B CN202211293081.XA CN202211293081A CN115361468B CN 115361468 B CN115361468 B CN 115361468B CN 202211293081 A CN202211293081 A CN 202211293081A CN 115361468 B CN115361468 B CN 115361468B
Authority
CN
China
Prior art keywords
screen
display
application interface
image
occlusion image
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202211293081.XA
Other languages
Chinese (zh)
Other versions
CN115361468A (en
Inventor
刘雅坤
肖坊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211293081.XA priority Critical patent/CN115361468B/en
Publication of CN115361468A publication Critical patent/CN115361468A/en
Application granted granted Critical
Publication of CN115361468B publication Critical patent/CN115361468B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a display optimization method and device during screen rotation and a storage medium, and belongs to the technical field of screen display. The method comprises the following steps: displaying a first application interface of the application, wherein the display strategy of the blocked image corresponding to the first application interface is a first display strategy; responding to the screen rotation operation, and acquiring a second display strategy, wherein the second display strategy is a shielding image display strategy corresponding to a second application interface after the first application interface is subjected to interface rotation; and under the condition that the first display strategy is different from the second display strategy, switching the first application interface to the second application interface, and hiding or displaying the shielding image before switching to the second application interface according to the second display strategy. Therefore, when the screen rotates, the shielding image can be displayed or hidden on the hole digging screen in advance before the screen rotates, so that the time difference between the displayed or hidden shielding image and the rotation of the application interface is shortened, and the visual blockage during the rotation of the screen is relieved.

Description

Display optimization method and device during screen rotation and storage medium
Technical Field
The present disclosure relates to the field of screen display technologies, and in particular, to a method and an apparatus for optimizing display when a screen rotates, and a storage medium.
Background
The hole digging screen is a screen structure frequently used in electronic equipment such as a mobile phone at present, and for the hole digging screen equipment (namely, the electronic equipment with the hole digging screen), if a currently displayed application interface is not matched with the hole digging screen, the hole digging screen equipment can display shielding images in a top area and/or a side area of the screen, for example, black bars on the top and the side of the hole digging screen are dug, so that the corresponding area is shielded.
When a screen of the electronic device displays an application interface of an application, if the screen rotates, for example, the vertical screen mode is switched to the horizontal screen mode, the electronic device needs to switch the vertical screen application interface of the application to the horizontal screen application interface. However, the display strategies of the corresponding shielding images of the vertical screen display interface and the horizontal screen display interface may be different according to whether the vertical screen display interface and the horizontal screen display interface are matched with the hole digging screen. For example, if the vertical screen application interface of the application is adapted to the hole-digging screen and the horizontal screen application interface is not adapted to the hole-digging screen, the shielding image needs to be hidden when the vertical screen application interface is switched to the horizontal screen application interface. And if the vertical screen application interface is not matched with the hole digging screen and the horizontal screen application interface is matched with the hole digging screen, displaying the shielding image when the vertical screen application interface is switched to the horizontal screen application interface.
In the existing electronic equipment, a long time difference exists between displaying or hiding a shielding image and rotating an application interface, and poor use experience is caused for a user.
Disclosure of Invention
The application provides a display optimization method, a device and a storage medium during screen rotation, which can shorten the time difference between displaying or hiding a shielding image and application interface rotation and improve the visual experience of adjusting the shielding image during screen rotation. The technical scheme is as follows:
in a first aspect, a display optimization method for screen rotation is provided, and is applied to an electronic device configured with a hole digging screen, and the method includes: displaying a first application interface of the application, wherein a display strategy of a shielding image corresponding to the first application interface is a first display strategy; responding to the screen rotation operation, and acquiring a second display strategy, wherein the second display strategy is a shielding image display strategy corresponding to a second application interface after the first application interface performs interface rotation; and under the condition that the first display strategy is different from the second display strategy, switching the first application interface to the second application interface, and hiding or displaying the shielding image before switching to the second application interface according to the second display strategy.
Therefore, when the screen rotates, the shielding image can be displayed or hidden on the hole digging screen in advance before the screen rotates, so that the time difference between the displayed or hidden shielding image and the rotation of the application interface is shortened, the phenomenon that the shielding image is hidden or displayed during the rotation of the screen and the blockage in vision is caused is relieved, and the use experience of a user is improved.
Wherein the occlusion image is used to occlude a top region and/or a side region of the excavation screen. For example, the occlusion image may include a top black bar and/or side black bars.
In one possible example, the first display policy is to display an occlusion image on a dig hole screen, and the second display policy is to not display the occlusion image on the dig hole screen; a first application interface to display an application, comprising: displaying a first application interface of an application, and displaying the shielding image on a hole digging screen; hiding or displaying an occlusion image prior to switching to the second application interface, comprising: and hiding the shielding image displayed on the hole digging screen before switching to the second application interface.
Therefore, under the condition that the shielding image display strategy corresponding to the first application interface is to display the shielding image and the shielding image display strategy corresponding to the rotated second application interface is not to display the shielding image, the shielding image displayed on the hole digging screen is hidden in advance before the second application interface is switched, the time difference between the hidden shielding image and the rotation of the application interface is shortened, and the visual blocking caused by the hidden shielding image when the screen rotates is relieved.
In one possible example, hiding the occlusion image displayed on the excavation screen includes: gradually reducing the size of the shielding image displayed on the hole digging screen until the shielding image is hidden; or the transparency of the shielding image displayed on the hole digging screen is gradually improved until the shielding image is hidden.
Therefore, the shielding image can be hidden with a fade-out effect, the jump from displaying to hiding the shielding image is relieved, the process feeling and the smoothness feeling of hiding the shielding image are visually increased, and the use experience of a user is enhanced.
In one possible example, the first display strategy is to display no occlusion images on the excavation screen, and the second display strategy is to display the occlusion images on the excavation screen; hiding or displaying the occlusion image prior to switching to the second application interface, comprising: displaying the occlusion image on a dug-hole screen before switching to a second application interface.
Therefore, when the shielding image display strategy corresponding to the first application interface is not to display the shielding image, and the shielding image display strategy corresponding to the rotated second application interface is to display the shielding image, the shielding image is displayed on the hole digging screen in advance before the second application interface is switched, the time difference between the display of the shielding image and the rotation of the application interface is shortened, and the blockage in vision caused by the display of the shielding image when the screen rotates is relieved.
In one possible example, displaying an occlusion image on a dug screen includes: displaying a partial area of the shielding image on the hole digging screen, and gradually increasing the size of the partial area of the displayed shielding image until the complete shielding image is displayed on the hole digging screen; or displaying the shielding image on the hole digging screen with the first transparency, and gradually reducing the transparency of the shielding image until the transparency of the shielding image is reduced to the second transparency, wherein the second transparency is smaller than the first transparency.
Therefore, the shielding image can be displayed with a fade-in effect, the jump from hiding to displaying the shielding image is relieved, the process feeling and the smoothness feeling of displaying the shielding image are visually increased, and the use experience of a user is enhanced.
In one possible example, the first display strategy and the second display strategy both comprise a display strategy of a first occlusion image and a display strategy of a second occlusion image, the first occlusion image is used for occluding a top area of the hole digging screen, and the second occlusion image is used for occluding a side area of the hole digging screen; hiding or displaying the occlusion image prior to switching to the second application interface, comprising:
hiding or displaying the first occlusion image before switching to the second application interface under the condition that the display strategies of the first occlusion image in the first display strategy and the second occlusion image in the second display strategy are different and the display strategies of the second occlusion image are the same;
hiding or displaying the second occlusion image before switching to the second application interface under the condition that the display strategies of the first occlusion image and the second occlusion image in the first display strategy and the second display strategy are the same and the display strategies of the second occlusion image are different;
and under the condition that the display strategies of the first occlusion image and the second occlusion image in the first display strategy and the second display strategy are different, hiding or displaying the first occlusion image and hiding or displaying the second occlusion image before switching to the second application interface.
Therefore, the diversity of the shielding image display strategies is increased, and the shielding image display strategies corresponding to the horizontal and vertical screen application interfaces can be flexibly configured according to needs. In addition, the occlusion image can be adaptively hidden or displayed before switching to the second application interface according to various occlusion image display strategies.
In one possible example, an operating system of an electronic device includes a window management service module, a system user interface, and a display rotation module; responding to the screen rotation operation, and acquiring a second display strategy, wherein the second display strategy comprises the following steps:
if the window management service module detects a screen rotation instruction, inquiring a shielding image display strategy corresponding to a second application interface, wherein the shielding image display strategy corresponding to the second application interface is a second display strategy, and the screen direction comprises a transverse screen direction and a vertical screen direction;
switching the first application interface to the second application interface, and hiding or displaying the occlusion image before switching to the second application interface according to a second display strategy, wherein the switching comprises the following steps:
the window management service module informs the display rotation module of screen rotation and informs the system user interface of hiding or displaying a shielding image according to a second display strategy; the display rotation module responds to the notice of the window management service module and switches the first application interface to the second application interface; and the system user interface responds to the notification of the window management service module and hides or displays the shielding image before the display rotation module switches the first application interface to the second application interface.
Therefore, before informing the display rotation module to rotate the screen, the WMS can acquire the shielding image display strategy corresponding to the rotated application interface in advance, and before the display rotation module finishes the rotation of the screen, the WMS informs the system user interface of hiding or displaying the shielding image in advance according to the shielding image display strategy corresponding to the rotated application interface, so that the time difference between the hiding or displaying of the shielding image and the rotation of the application interface is shortened, and the visual blockage caused by the hiding or displaying of the shielding image during the rotation of the screen is relieved.
Wherein the screen rotation instruction is used for indicating that the screen needs to be rotated. The window management service module can determine that a screen rotation instruction is detected when the screen needs to be rotated according to the gravity direction change event after the gravity direction change event of the electronic device is received. Or when the horizontal and vertical screen posture change event is received, determining that the screen rotation instruction is detected. Alternatively, it is determined that a screen rotation instruction is detected upon receiving a trigger event of the auto-rotation function button. Of course, the screen rotation instruction may also be determined to be detected in other cases, which is not limited in this application.
In one possible example, the operating system further comprises a surfacemaker; the display rotation module responds to the notice of the window management service module and switches the first application interface to the second application interface, and the method comprises the following steps:
and the display rotation module responds to the notification of the window management service module and notifies the SurfaceFlinger to play a screen rotation animation effect, wherein the screen rotation animation effect is an animation effect for switching the first application interface to the second application interface. Through playing the screen rotation animation effect when the screen rotates, the process sense and the smoothness sense of screen rotation can be increased, and the visual experience of a user is improved.
In one possible example, the system user interface may hide the occlusion image with a fade-out effect or display the occlusion image with a fade-in effect. For example, the window management service module may notify the display rotation module to rotate the screen, and notify the system user interface to play a fade-in animation effect or a fade-out animation effect of the occlusion image according to the second display policy. And the display rotation module responds to the notification of the window management service module and notifies the SurfaceFlinger to play the screen rotation animation effect, and meanwhile, the system user interface responds to the notification of the window management service module and plays the fade-in animation effect or the fade-out animation effect of the shielding image. Therefore, the screen rotating effect and the fading effect of the shielding image can be ensured to be carried out simultaneously, the shielding image is not hidden or displayed except the screen rotating effect is played, and the user experience is enhanced.
In one possible example, the operating system of the electronic device further includes a sensor module, the sensor module is configured to acquire a landscape screen gesture of the electronic device; before the window management service module queries the occlusion image display policy corresponding to the second application interface, the method further includes: if the sensor module detects that the horizontal and vertical screen postures of the electronic equipment change, a horizontal and vertical screen posture change event is sent to the window management service module; and the window management service module receives the horizontal and vertical screen posture change event and determines that a screen rotation instruction is detected according to the received horizontal and vertical screen posture change event.
In a second aspect, a display optimization device during screen rotation is provided, and the display optimization device during screen rotation has a function of implementing the behavior of the display optimization method during screen rotation in the first aspect. The display optimization device during screen rotation comprises at least one module, and the at least one module is used for realizing the display optimization method during screen rotation provided by the first aspect.
In a third aspect, a display optimization device during screen rotation is provided, where the display optimization device during screen rotation includes a processor and a memory, and the memory is used to store a program for supporting the display optimization device during screen rotation to execute the display optimization method during screen rotation provided in the first aspect, and to store data for implementing the display optimization method during screen rotation in the first aspect. The processor is configured to execute programs stored in the memory. The display optimization device when the screen is rotated may further include a communication bus for establishing a connection between the processor and the memory.
In a fourth aspect, there is provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the method for display optimization when a screen is rotated according to the first aspect described above.
In a fifth aspect, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of display optimization when the screen is rotated as described above in the first aspect.
The technical effects obtained by the second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described herein again.
Drawings
Fig. 1 is a schematic diagram illustrating that a vertical screen application interface not adapted to a hole-digging screen and an occlusion image are displayed on the hole-digging screen in a vertical screen mode by a mobile phone according to an embodiment of the present application;
fig. 2 is a schematic view of a scenario that a mobile phone switches from a vertical screen application interface of an adaptive digging hole screen to a horizontal screen application interface of an unadapted digging hole screen provided in the related art;
fig. 3 is a scene schematic diagram illustrating a mobile phone switching from a vertical screen application interface of an unadapted hole digging screen to a horizontal screen application interface of an adapted hole digging screen according to the related art;
fig. 4 is a schematic view of a scenario that a mobile phone switches from a horizontal screen application interface adapted to a hole-digging screen to a vertical screen application interface not adapted to the hole-digging screen according to an embodiment of the present application;
fig. 5 is a schematic view of a scenario that a mobile phone switches from a vertical screen application interface that is not adapted to an excavation screen to a horizontal screen application interface that is adapted to the excavation screen according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 7 is a block diagram of a software system of an electronic device according to an embodiment of the present application;
fig. 8 is a flowchart of a display method when a screen is rotated, which is provided in the related art;
FIG. 9 is a flowchart of a method for optimizing display during screen rotation according to an embodiment of the present disclosure;
fig. 10 is a signaling diagram of a display optimization method during screen rotation according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference to "a plurality" in this application means two or more. In the description of this application, "/" indicates an inclusive meaning, for example, A/B may indicate either A or B; "and/or" herein is only an association relationship describing an association object, and means that there may be three relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, for the convenience of clearly describing the technical solutions of the present application, the terms "first", "second", and the like are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
To facilitate understanding of the present application, terms that may be referred to in the embodiments of the present application will be described first.
The screen is fully displayed: the full-screen device refers to an electronic device that obtains a high screen occupation ratio by reducing the size of a bezel. The screen occupation ratio refers to the ratio of the area of the screen to the area of the front surface of the electronic device (generally, the surface where the screen is located is the front surface). By reducing the width of the frame, the screen occupation ratio of the full screen can reach 80 to 90 percent.
Waterfall screen equipment: the waterfall screen is a product after further improvement on the basis of full-screen equipment. The side edge of the screen of the waterfall screen device has a certain radian, so that compared with the full screen device, the waterfall screen device can completely cancel the frames on the two sides of the screen, thereby further improving the screen occupation ratio, and ensuring that the screen occupation ratio of the waterfall screen device can reach more than 90%.
Digging a hole screen: the full screen and the waterfall screen provided with the hole digging areas can be collectively called as hole digging screens, and electronic equipment with the screens as the hole digging screens can be called as hole digging screen equipment.
Generally, a hole digging area can be arranged on the screen of the comprehensive screen device and the waterfall screen device, the shape of the hole digging area can be a circle, a rounded rectangle or other irregular shapes, the hole digging area can be located at one corner of the screen (for example, located near the upper left corner) or at the center of the top of the screen, and the position and the shape of the hole digging area are not limited in the embodiment of the application. The components of the electronic device that need to be mounted on the front side can be mounted in the region of the cutout. The devices that need to be mounted on the front side may include a front camera, a proximity light sensor, and the like.
And (3) blocking the image: the occlusion image refers to an image which is displayed on the top area and/or the side area of the screen by the electronic equipment and is used for occluding the corresponding area. The pattern and size of the occlusion image may be determined based on a default configuration of the system or may be determined based on user settings. For example, if the application interface does not fit the dug-hole screen, the electronic device may display the occlusion image in the top area and/or the side area of the dug-hole screen while displaying the application interface.
Next, an application scenario according to the application example will be explained.
When the screen of the electronic device is a hole-digging screen, the adaptation conditions of the application interfaces of different applications to the hole-digging screen may be different, and the adaptation conditions of the vertical screen application interface and the horizontal screen application interface of the same application to the hole-digging screen may also be different. The vertical screen application interface is an application interface which is adapted to a vertical screen in a vertical screen mode. A landscape application interface refers to an application interface that fits in a landscape screen in landscape mode.
For example, for some applications, the portrait screen application interfaces of the applications fit the cut hole screens, while the landscape screen application interfaces do not fit the cut hole screens. Therefore, the vertical screen application interface can occupy the whole screen when displayed on the hole digging screen, and the electronic equipment does not need to display the shielding image in the top area and/or the side area of the screen when displaying the vertical screen application interface matched with the hole digging screen. And when the transverse screen application interface is displayed on the hole digging screen, the whole screen cannot be occupied, and when the electronic equipment displays the transverse screen application interface which is not suitable for the hole digging screen, a shielding image can be displayed in the top area and/or the side area of the screen, so that the non-shielded visual area on the screen is matched with the transverse screen application interface.
For another example, for other applications, the portrait screen application interfaces do not fit the dug screen, while the landscape screen application interfaces fit the dug screen. Therefore, the vertical screen application interface cannot occupy the whole screen when displayed on the hole digging screen, and when the electronic equipment displays the vertical screen application interface which is not suitable for the hole digging screen, the electronic equipment can display a shielding image in the top area and/or the side area of the screen, so that the non-shielded visible area on the screen is matched with the vertical screen application interface. The whole screen can be occupied when the transverse screen application interface is displayed on the hole digging screen, and the electronic equipment does not need to display a shielding image in the top area and/or the side area of the screen when the transverse screen application interface matched with the hole digging screen is displayed.
According to the method, the shielding image display strategies corresponding to the vertical screen application interface and the horizontal screen application interface of the application can be set according to whether the corresponding application interfaces are matched with the hole digging screen or not. For example, if the application interface is adapted to the hole-digging screen, the corresponding occlusion image display strategy is to not display the occlusion image on the hole-digging screen, that is, hide the occlusion image on the hole-digging screen. And if the application interface is not matched with the hole digging screen, the corresponding shielding image display strategy is to display a shielding image on the hole digging screen.
In addition, when a horizontal screen application interface or a vertical screen application interface which is not adapted to the hole digging screen is displayed, according to the area covered on the hole digging screen by the application interface, the electronic device can simultaneously display the shielding image in the top area and the side area, or only display the shielding image in the top area, or only display the shielding image in the side area. In short, the specific position for displaying the occlusion image may be determined according to the currently displayed application interface, which is not limited in this embodiment.
Therefore, the display strategy of the shielding image corresponding to the application interface which is not matched with the hole digging screen can comprise a plurality of display strategies. For example, the following display strategies are included: displaying an occlusion image in a top area and a side area; displaying the occlusion image in the top region but not the side region; the occlusion image is displayed in the side area but not in the top area.
From the above, even if neither the vertical screen application interface nor the horizontal screen application interface is adapted to the hole-digging screen, the corresponding display strategies of the occlusion images may be different. For example, the display policy of the blocked image corresponding to the vertical screen application interface is as follows: the occlusion image is displayed in the top area and the side area. The display strategy of the shielding image corresponding to the horizontal screen application interface is as follows: the occlusion image is displayed in the top area but not in the side area.
If the electronic equipment performs screen rotation when displaying an application interface of a certain application, that is, the horizontal and vertical screen modes are switched, the electronic equipment switches from the vertical screen application interface to the horizontal screen application interface or from the horizontal screen application interface to the vertical screen application interface. When the electronic device is switched from the vertical screen application interface to the horizontal screen application interface or from the horizontal screen application interface to the vertical screen application interface, if the display strategies of the blocked images corresponding to the application interface before switching and the application interface after switching are different, the electronic device displays or hides the blocked images on the screen after the application interfaces are switched. For example, if the application interface before rotation is adapted to the hole-digging screen and the application interface after rotation is not adapted to the hole-digging screen, the blocking image will be displayed on the hole-digging screen after the application interface is rotated. And if the application interface before rotation is not suitable for the hole digging screen and the application interface after rotation is suitable for the hole digging screen, hiding the shielding image on the hole digging screen after the application interface is rotated.
It should be noted that the electronic device related to the embodiment of the present application is an electronic device configured with a hole-digging screen, and specifically may be a mobile phone, a tablet computer, a smart wearable device, and the like. For ease of understanding, the electronic device will be exemplified as a mobile phone.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating that a vertical screen application interface not adapted to a hole-digging screen and an occlusion image are displayed on the hole-digging screen in a vertical screen mode by a mobile phone according to an embodiment of the present application. As shown in fig. 1, a hole area 101 is provided on the screen of the mobile phone 100, and a front camera is installed in the hole area 101. The top of the screen, i.e. the area where the hole-digging area 101 is located, is the top area 102 of the hole-digging screen, and the strip-shaped areas on both sides of the screen are the side areas 103 of the hole-digging screen.
When the mobile phone 100 runs the video application in the vertical screen mode, a vertical screen application interface of the video application shown in the figure is displayed on the hole digging screen of the mobile phone 100. Because the vertical screen application interface of the video application is not adapted to the hole-digging screen, while the electronic device displays the vertical screen application interface of the video application, the top black bar 104 shown in fig. 1 is displayed in the top area 102 of the hole-digging screen, and the side black bar 105 shown in fig. 1, the top black bar 104 and the side black bar 105 shown in fig. 1 are displayed in the side area 103 of the hole-digging screen, which is a specific implementation form of the occlusion image described in the embodiment of the present application.
In addition to the scene shown in fig. 1, in practical applications, when a vertical screen application interface or a horizontal screen application interface not adapted to the excavation screen is displayed, the electronic device may display the occlusion images in the top area and the side area at the same time, or may display the occlusion images only in the top area, or may display the occlusion images only in the side area, according to an area covered by the application interface on the excavation screen. In short, the specific position for displaying the occlusion image may be determined according to the currently displayed application interface, which is not limited in this embodiment.
When the screen of the mobile phone is rotated, for example, when the mobile phone is switched from the portrait screen mode to the landscape screen mode, the mobile phone may switch the currently displayed portrait screen application interface to the landscape screen application interface adapted to the landscape screen. If the vertical screen application interface is not matched with the hole digging screen, and the horizontal screen application interface is matched with the hole digging screen, the shielding image can be hidden when the mobile phone displays the horizontal screen application interface. For example, when the mobile phone 100 is screen rotated to switch the vertical screen display interface shown in fig. 1 to the horizontal screen application interface adapted to the hole-digging screen, the occlusion image on the screen, i.e. the top black bar of the top area 102 and the side black bars of the side areas 103, are hidden, so that the horizontal screen application interface occupies the screen.
In the related art, when the electronic device rotates to display or hide the occlusion image along with the application interface, the following problems exist:
when the current electronic equipment is switched from a vertical screen application interface to a horizontal screen application interface or from the horizontal screen application interface to the vertical screen application interface, the display or hiding of a shielding image on a screen is adjusted after the playing of a screen rotation animation effect is finished. The jump after the screen rotation animation effect is played can cause visual pause feeling, namely, a user feels that the electronic equipment is jammed and flickers in the screen rotation process.
For example, referring to fig. 2, fig. 2 is a schematic view of a scene that a mobile phone switches from a vertical screen application interface of an adaptive digging hole screen to a horizontal screen application interface of an unadapted digging hole screen provided in the related art.
When the mobile phone is in the vertical screen mode, the user opens the video application installed on the mobile phone to play a video, the mobile phone starts the video application in response to the operation of the user, the video is played through the video application, and a vertical screen application interface of the video application in the vertical screen mode is displayed as shown in fig. 2 (a). Because the vertical screen application interface of the video application in the vertical screen mode is matched with the hole digging screen, when the vertical screen application interface is displayed, the shielding image is not displayed on the hole digging screen. During the video playing of the video application, the user performs a screen rotation operation, and the mobile phone switches the vertical screen application interface of the video application to the horizontal screen application interface in response to the screen rotation operation, so as to display the horizontal screen application interface of the video application as shown in (b) of fig. 2. In addition, in the process that the mobile phone switches from the vertical screen application interface to the horizontal screen application interface of the video application, a screen rotation animation effect can be played, wherein the screen rotation animation effect refers to the animation effect switched from the vertical screen application interface to the horizontal screen application interface. After the mobile phone is switched to the horizontal screen application interface shown in the (b) diagram in fig. 2, a blocking image display strategy corresponding to the horizontal screen application interface is obtained. If the occlusion image display strategy corresponding to the horizontal screen application interface is to display the top black bar and the side black bar, the interface shown in the diagram (b) in fig. 2 is switched to the interface shown in the diagram (c) in fig. 2, that is, the top black bar is displayed in the top area of the screen, and the side black bar is displayed in the side area.
For another example, referring to fig. 3, fig. 3 is a schematic view of a scene of a mobile phone switching from a vertical screen application interface of an unadapted hole digging screen to a horizontal screen application interface of an adapted hole digging screen provided in the related art.
When the mobile phone is in the vertical screen mode, the user opens the video application installed on the mobile phone to play a video, the mobile phone starts the video application in response to the operation of the user, the video is played through the video application, and a vertical screen application interface of the video application in the vertical screen mode is displayed as shown in (a) of fig. 3. Due to the fact that the vertical screen application interface of the video application in the vertical screen mode is matched with the hole digging screen, when the vertical screen application interface is displayed, a shielding image is displayed on the hole digging screen and comprises the top black bars and the side black bars. During the video playing of the video application, the user performs a screen rotation operation, the mobile phone switches the vertical screen application interface of the video application to the horizontal screen application interface in response to the screen rotation operation, and displays the horizontal screen application interface of the video application and the occlusion image as shown in (b) of fig. 3. In addition, in the process of switching the mobile phone from the vertical screen application interface to the horizontal screen application interface of the video application, the screen rotation animation effect can be played. After the mobile phone is switched to the horizontal screen application interface shown in the diagram (b) in fig. 3, a blocking image display strategy corresponding to the horizontal screen application interface is obtained. If the occlusion image display strategy corresponding to the horizontal screen application interface is that the top black bar and the side black bar are not displayed, the interface shown in the diagram (b) in fig. 3 is switched to the interface shown in the diagram (c) in fig. 3, that is, the top black bar in the top area and the side black bar in the side area are hidden.
As can be seen from fig. 2, in the related art, when switching from the vertical screen application interface adapted to the hole-digging screen to the horizontal screen application interface not adapted to the hole-digging screen, the vertical screen application interface hiding the occlusion image is switched to the horizontal screen application interface hiding the occlusion image, and then the occlusion image is added to the horizontal screen application interface. As can be seen from fig. 3, in the related art, when switching from the vertical screen application interface that is not adapted to the hole-digging screen to the horizontal screen application interface that is adapted to the hole-digging screen, the vertical screen application interface that displays the blocking image is switched to the horizontal screen application interface that displays the blocking image, and then the blocking image on the horizontal screen application interface is hidden. When the application interface of the mobile phone is rotated, the visual effect seen by the user is generally that after the screen rotation animation effect is played, the interface displayed on the screen jumps, and the interface displaying the occlusion image is directly switched to the interface hiding the occlusion image, or the interface hiding the occlusion image is switched to the interface displaying the occlusion image. The jump after the screen rotation animation effect is played can cause visual pause feeling, namely, a user feels that the mobile phone is jammed and flickers in the screen rotation process.
In view of the above problems, an embodiment of the present application provides a display optimization method when a screen rotates, so as to improve a click feeling and a flicker feeling of an electronic device when the screen rotates, and improve a user experience. In the display optimization method provided by the embodiment of the application, when a first application interface of an application is displayed, if a screen rotation operation is detected, a shielding image display strategy corresponding to a second application interface after the first application interface is subjected to interface rotation is acquired in response to the screen rotation operation. And if the shielding image display strategy corresponding to the second application interface is different from that corresponding to the first application interface, switching the first application interface to the second application interface, and hiding or displaying the shielding image before switching to the second application interface according to the shielding image display strategy of the second application interface. Therefore, when the screen rotates, the shielding image can be displayed or hidden on the hole digging screen in advance before the screen rotates, and the blocking feeling when the screen rotates is relieved.
The second application interface is obtained after interface rotation is performed on the first application interface, namely, the application interface obtained after horizontal and vertical screen switching is performed on the first application interface. That is to say, the first application interface and the second application interface are different display forms of the same application interface of the application in the horizontal and vertical screen modes. For example, if the first application interface is a portrait application interface, the second application interface is a landscape application interface. And if the first application interface is a horizontal screen application interface, the second application interface is a vertical screen application interface.
A scene of a mobile phone applying the display optimization method according to the embodiment of the present application when the screen rotates is described below by taking a specific electronic device, namely, a mobile phone, as an example.
Referring to fig. 4, fig. 4 is a schematic view of a scenario that a mobile phone switches from a horizontal screen application interface adapted to a hole-digging screen to a vertical screen application interface not adapted to the hole-digging screen according to an embodiment of the present application.
When the mobile phone is in the vertical screen mode, the user opens the video application installed on the mobile phone and plays the video, the mobile phone starts the video application in response to the operation of the user, the video application starts playing the video, and a vertical screen application interface of the video application in the vertical screen mode is displayed as shown in fig. 4 (a). Because the vertical screen application interface of the video application in the vertical screen mode is matched with the hole digging screen, when the vertical screen application interface is displayed, the shielding image is not displayed on the hole digging screen. During the video playing of the video application, a user executes screen rotation operation, the mobile phone responds to the screen rotation operation, firstly obtains a shielding image display strategy of a transverse screen application interface corresponding to a currently displayed vertical screen application interface, if the shielding image display strategy of the transverse screen application interface is to display a top black bar and a side black bar, the vertical screen application interface is switched to the transverse screen application interface, and according to the shielding image display strategy of the transverse screen application interface, the top black bar and the side black bar are displayed on the hole digging screen in advance before the transverse screen application interface is switched. Thus, as shown in fig. 4 (b), when the screen rotation is completed, the horizontal screen application interface, the top black bar and the side black bar can be directly displayed on the hole-digging screen, so that the visual blockage caused by firstly displaying the switched horizontal screen application interface and then adding the shielding image on the horizontal screen application interface during the screen rotation is relieved.
The screen rotation operation refers to an operation of triggering a screen to rotate, and may be an operation of rotating a mobile phone by a user, an operation of clicking an automatic rotation function icon, and the like.
For another example, please refer to fig. 5, where fig. 5 is a schematic view of a scene that a mobile phone switches from a vertical screen application interface that is not adapted to a hole-digging screen to a horizontal screen application interface that is adapted to the hole-digging screen according to an embodiment of the present application.
When the mobile phone is in the vertical screen mode, the user opens the video application installed on the mobile phone and plays the video, the mobile phone starts the video application in response to the operation of the user, the video application starts playing the video, and a vertical screen application interface of the video application in the vertical screen mode is displayed as shown in (a) of fig. 5. Because the vertical screen application interface of the video application in the vertical screen mode is the adaptive hole-digging screen, when the vertical screen application interface in the vertical screen mode is displayed, a shielding image is displayed on the hole-digging screen and comprises top black bars and side black bars. During the video playing of the video application, a user executes screen rotation operation, the mobile phone responds to the screen rotation operation, firstly obtains a shielding image display strategy of a transverse screen application interface corresponding to a currently displayed vertical screen application interface, if the shielding image display strategy of the transverse screen application interface is to hide a shielding image (not displaying a top black bar and a side black bar), the vertical screen application interface is switched to the transverse screen application interface, and according to the shielding image display strategy of the transverse screen application interface, the top black bar and the side black bar are hidden on the hole digging screen in advance before the transverse screen application interface is switched. Thus, as shown in fig. 5 (b), when the screen rotation is completed, the horizontal screen application interface in which the top black bar and the side black bar are hidden can be directly displayed on the hole-digging screen, and the visual blockage caused by firstly displaying the switched horizontal screen application interface and the shielding image and then hiding the shielding image during the screen rotation is relieved.
In addition, when the shielding image is displayed on the hole digging screen in advance before the rotation of the screen is completed, the shielding image can be displayed in a fade-in effect, for example, a fade-in animation effect of the shielding image is played, so that the jump from hiding to displaying the shielding image is relieved, the process feeling and the smoothness feeling of displaying the shielding image are visually increased, and the user experience is enhanced. For example, the size of the occlusion image is gradually increased on the screen until the complete occlusion image is displayed on the screen; alternatively, the transparency of the occlusion image is successively reduced on the screen until the transparency of the occlusion image is reduced to a transparency at which the occlusion image can be clearly seen. Of course, other ways may also be adopted to display the occlusion image with a fade-in effect, which is not limited in the embodiment of the present application.
In addition, when the shielding image is hidden on the hole digging screen in advance before the rotation of the screen is completed, the shielding image can be hidden through a fade-out effect, for example, a fade-out animation effect of the shielding image is played, so that the jump from display to hiding of the shielding image is relieved, the process feeling and the smoothness feeling of the hiding of the shielding image are visually increased, and the user experience is enhanced. For example, the size of the occlusion image is gradually reduced on the screen until the occlusion image is hidden; alternatively, the transparency of the occlusion image is successively increased on the screen until the occlusion image is hidden. Of course, other ways may also be adopted to hide the occlusion image with a fade-out effect, which is not limited in the embodiment of the present application.
Next, an electronic device according to an embodiment of the present application will be described.
Fig. 6 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure, which may be specifically a mobile phone, a tablet computer, a wearable device, and the like. Referring to fig. 6, 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, a Subscriber Identity Module (SIM) card interface 195, and the like. 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, and the like.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), among others. Wherein, the different processing units may be independent devices or may be integrated in one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an 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 alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being an integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when taking a picture, open the shutter, on light passed through the lens and transmitted camera light sensing element, light signal conversion was the signal of telecommunication, and camera light sensing element transmits the signal of telecommunication to ISP and handles, turns into the image that the naked eye is visible. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being an integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability 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. Such as saving files of music, video, etc. in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, and the like) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created by the electronic device 100 during use, 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 magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The acceleration sensor 180E may also be used to identify the posture of the electronic device 100, and may be applied to horizontal and vertical screen switching, pedometer, and other applications. Of course, the acceleration sensor 180E may also be combined with the gyro sensor 180B to recognize the posture of the electronic device 100, and is applied to horizontal and vertical screen switching.
The gyro sensor 180B may be used to determine a motion attitude of the terminal 100. In some embodiments, the angular velocity of terminal 100 about three axes (i.e., x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the terminal 100, calculates a distance to be compensated for the lens module according to the shake angle, and allows the lens to counteract the shake of the terminal 100 by a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B can also be used for horizontal and vertical screen switching, navigation and motion sensing game scenes.
The above is a specific description of the embodiments of the present application taking the electronic device 100 as an example. It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The electronic device provided in the embodiment of the present application may be a User Equipment (UE), for example, a mobile terminal (e.g., a mobile phone), a tablet computer, a desktop computer, a laptop computer, a handheld computer, a netbook, a personal digital assistant (PAD), and other devices.
In addition, an operating system runs on the above components. Such as the IOS operating system developed by apple, the Android open source operating system developed by google, the Windows operating system developed by microsoft, and so on. In that
The software system of the electronic device 100 may employ a hierarchical architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In order to more clearly illustrate the display optimization method during screen rotation provided in the embodiment of the present application, a software system of the electronic device 100 is exemplarily illustrated by taking an Android (Android) system with a layered architecture as an example in the embodiment of the present application.
Fig. 7 is a block diagram of a software system of an electronic device 100 according to an embodiment of the present disclosure. Referring to fig. 7, the electronic device may include a hardware layer and a software layer, wherein the Android system of the hierarchical architecture may include an application layer, an application framework layer, a system library layer, and a kernel layer. In some optional embodiments, the system of the electronic device may further include a level not mentioned in the above technical architecture, such as Android Runtime (Android Runtime).
The application layer may include a series of application packages such as navigation applications, music applications, video applications, and the like. As shown in FIG. 7, the application packages may include video, chat, etc. applications, as well as a System user interface (System UI).
Video, chat, etc. applications are used to provide corresponding services to users. For example, a user views a video using a video application, chats with other users using a chat application, and listens to music using a music application.
The system UI is used for managing a User Interface (UI) of the electronic equipment, and in the embodiment of the application, the system UI is used for managing display and hiding of a shielding image in the edge area of the hole digging screen.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in fig. 7, the application framework layer may include a Window Management Service (WMS), a display rotation module (also called display rotation), an Application Management Service (AMS), an Input management module (also called Input), and the like.
WMS is used to manage window programs. The window manager can obtain the size of the screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. In the embodiment of the application, the WMS may create and manage a window corresponding to an application.
The display rotation module is used for controlling the screen to rotate, and the screen presents the layout of a vertical screen or a horizontal screen through rotation. For example, when it is determined that screen rotation is needed, the surfefringer is notified to perform horizontal and vertical screen switching of the application interface.
The AMS is used to start a specific application according to a user's operation. For example, when a user clicks a video application icon of a desktop, the AMS sets the video application to a foreground operating state, and creates an application stack corresponding to the video application, so that the video application can operate normally.
The system library layer may include a plurality of functional modules, such as: a sensor module (also known as a sensor) and a surface flinger.
The sensor module is used for acquiring data acquired by the sensor, such as acquiring gravity direction information of the electronic device acquired by the acceleration sensor. Or, the sensor module may also determine horizontal and vertical screen state information of the electronic device according to the gravity direction information of the electronic device, where the horizontal and vertical screen state information is used to indicate whether the electronic device is in a horizontal screen state or a vertical screen state.
The Surfaceflinger is a system service used for the functions of creating, controlling and managing the image layer. In the embodiment of the present application, the surfeflinger may be used to perform horizontal and vertical screen switching of an application interface, for example, play a screen rotation animation effect.
In addition, the system library layer may further include: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like. The surface manager is used to manage the display subsystem and provide a fusion of the 2D and 3D layers for multiple applications. The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like. The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. In an embodiment of the present application, the kernel layer at least includes a touch driving module and a display driving module.
The display driving module is used for displaying corresponding images on the touch screen according to the image data provided by the modules of the application framework layer and the application programs of the application layer. For example, a video application transfers image data of one frame of a video to a display driving module, and the display driving module displays an image of one frame of the video on the touch screen according to the image data. The SystemUI transmits the image data of the occlusion image to the display driving module, and the display driving module displays the occlusion image in an area designated by the hole digging screen according to the image data of the occlusion image.
The touch driving module is used for monitoring capacitance values of all areas of the touch screen. When a user clicks or slides on the touch screen, the capacitance value of the clicked or slid area changes, the touch driving module can monitor the change of the capacitance value of each area on the touch screen and send a capacitance value change message to the input management module, and the capacitance value change message carries information such as the change amplitude of the capacitance value (or a capacitance sampling value) of each area of the touch screen, the time of the change and the like.
The input management module can determine touch operation according to the reported capacitance value change message, and then sends the identified touch operation to other modules. The touch operation may include a click operation, a drag operation, and a specific gesture operation (e.g., a slide-up gesture operation, a slide-down gesture operation, etc.).
The hardware layer comprises a hole digging screen, an attitude sensor and the like, and the attitude sensor can comprise an acceleration sensor and a gyroscope. The attitude sensor is used for detecting attitude information of the electronic device, such as gravity direction information and the like.
For example, when the mobile phone is in the vertical screen posture, the user rotates the mobile phone to change the mobile phone from the vertical screen posture to the horizontal screen posture, the sensor module recognizes that the gravity direction of the mobile phone changes according to data reported by the acceleration sensor, then sends a gravity direction change event to the WMS, the WMS judges that the mobile phone is rotated from the vertical screen posture to the horizontal screen posture according to the gravity direction change event, and then determines that the screen rotation is required. Or the sensor module identifies the change of the horizontal and vertical screen states of the mobile phone according to the data reported by the acceleration sensor, and then sends a horizontal and vertical screen posture change event to the WMS, and the WMS determines that the screen rotation is required according to the horizontal and vertical screen state change event.
For another example, the mobile phone provides an automatic rotation function icon on a related interface, for example, an automatic rotation function icon is provided on a menu bar or a video playing interface, after the user clicks the automatic rotation function icon, the input management module identifies a click operation of the automatic rotation function icon according to the reported capacitance value change message, then reports a click event of the automatic rotation function icon to the WMS, and the WMS determines that screen rotation is required according to the click event of the automatic rotation function icon.
It should be noted that although the embodiment of the present application is described by taking an Android system as an example, the basic principle is also applicable to electronic devices based on an os, windows, or other operating systems.
The above technical architecture lists modules and devices in an electronic device that the present application may relate to. In practical applications, the electronic device may include all or part of the modules and devices of the above technical architecture, and other modules and devices not mentioned in the above technical architecture, and of course, may also include only the modules and devices of the above technical architecture, which is not limited in this embodiment.
In order to facilitate understanding of the display optimization method during screen rotation provided in the embodiment of the present application, first, a technical architecture of an electronic device shown in fig. 7 is combined, and an electronic device is taken as an example to describe an implementation manner of a display method during screen rotation provided in the related art.
Referring to fig. 8, fig. 8 is a flowchart illustrating a display method when a screen rotates according to a related art, the method including the steps of:
step 801: the user rotates the handset.
For example, the user rotates the mobile phone while the mobile phone displays the first application interface of the application. The first application interface may be a landscape application interface or a portrait application interface.
Step 802: the sensor module detects that the gravity direction of the mobile phone changes.
The sensor module can acquire the gravity information reported by the acceleration sensor installed on the mobile phone, and detects that the gravity direction of the mobile phone changes according to the gravity information reported by the acceleration sensor in the rotation process of the mobile phone.
Step 803: the sensor module sends a gravity direction change event to a window management service module (hereinafter abbreviated as WMS).
The sensor module can send a gravity direction change event to the WMS after detecting that the gravity direction of the mobile phone changes.
Step 804: and after receiving the gravity direction change event, the WMS judges whether the mobile phone needs to rotate the screen according to the gravity direction change event.
Wherein, the gravity direction change event may include gravity direction information before and after the change. The WMS may determine a posture change of the mobile phone according to the information of the gravity direction before and after the change, and determine whether a screen posture of the mobile phone changes according to the posture change of the mobile phone, for example, whether to rotate from a landscape screen posture to a portrait screen posture, or whether to rotate from a portrait screen posture to a landscape screen posture. If the screen posture of the mobile phone changes, it is determined that the mobile phone needs to perform screen rotation, and if the screen posture does not change, it is determined that the mobile phone does not need to perform screen rotation.
Step 805: and if the WMS determines that the mobile phone needs to rotate the screen, the WMS informs the display rotation module to rotate the screen.
Step 806: the display rotation module notifies the surfaflinger to play the screen rotation animation effect in response to the notification of the WMS.
Wherein, the screen rotation animation effect refers to the animation effect of switching from the first application interface to the second application interface. The second application interface is the application interface after the interface rotation is carried out on the currently displayed first application interface. For example, if the first application interface is a portrait application interface, the second application interface is a landscape application interface. And if the first application interface is a horizontal screen application interface, the second application interface is a vertical screen application interface.
That is, in the related art, when it is determined that the mobile phone needs to rotate the screen, the WMS immediately notifies the display rotation module to rotate the screen, so as to switch the first application interface to the second application interface.
Step 807: and after detecting that the screen rotates, the WMS queries a shielding image display strategy corresponding to the rotated interface.
The rotated interface refers to a second application interface obtained after the interface of the currently displayed first application interface is rotated. The occlusion image display policy may be to display an occlusion image or to hide an occlusion image.
For example, the WMS may query the occlusion image display policy corresponding to the rotated interface from the window management information. The window management information stores shielding image display strategies corresponding to the horizontal screen display interfaces and the vertical screen display interfaces of the multiple applications respectively.
Step 808: and the WMS informs the System UI to hide or display the occlusion image according to the occlusion image display strategy corresponding to the rotated interface.
For example, if the occlusion image display policy corresponding to the rotated interface is to hide an occlusion image, the systemuui is notified to hide the occlusion image. And if the shielding image display strategy corresponding to the interface after rotation is to display the shielding image, informing the System UI to hide and display the shielding image.
Step 809: the SystemUI hides or displays the occlusion image in response to the notification of the WMS.
In the related art, when the WMS determines that the mobile phone needs to rotate the screen, the WMS first notifies the display rotation module to rotate the screen, and then queries the block image display policy corresponding to the rotated interface after detecting that the screen has rotated, and notifies the system ui to hide or display the block image according to the block image display policy corresponding to the rotated interface, so that the WMS hides or displays the block image according to the block image display policy corresponding to the rotated interface after completing the screen rotation. The visual effect seen by the user is generally that after the screen rotation animation effect is played, an interface displayed on the screen jumps, and the interface displaying the occlusion image is directly switched to the interface hiding the occlusion image, or the interface hiding the occlusion image is switched to the interface displaying the occlusion image. The jumping after the screen rotation animation effect is played can cause visual pause, namely, a user feels that the electronic equipment is stuck and flickers in the screen rotation process.
In view of the above problems, the embodiment of the application provides a display optimization method during screen rotation, so as to improve the click feeling and the flicker feeling of an electronic device during screen rotation, and improve the use experience of a user.
In the following, a technical architecture of the electronic device shown in fig. 7 is described, taking the electronic device as a mobile phone as an example, to describe an implementation manner of the display optimization method during screen rotation provided in the embodiment of the present application.
Referring to fig. 9, fig. 9 is a flowchart of a display optimization method during screen rotation according to an embodiment of the present application, where the method includes the following steps:
step 901: the application management service module starts the application.
The application may be any application installed on the electronic device, for example, a chat application or a video application.
An application management service module (hereinafter, abbreviated as AMS) may start an application in response to an operation of opening the application by a user. When using the electronic device, the user may open an application installed on the electronic device in a variety of ways, such as clicking an application icon on a desktop, clicking a notification message of an application in a message notification bar, and so on.
Step 902: the AMS notifies the window management service module of the window in which the application is started.
After the AMS starts the application, the window management service module is informed of the window for starting the application, so that the WMS is triggered to create the window of the application. For example, the AMS may send a window start notification to the WMS, which carries an application identification of the application that was started by the AMS.
Step 903: the WMS creates a window corresponding to the application in response to the notification by the AMS.
For example, after receiving the window start notification, the WMS may create a window corresponding to the application according to the application identifier carried in the window start notification.
After the window corresponding to the application is started, the application which is switched to the foreground to run sends the image data of the application interface to the display driving module, and the display driving module can display the application interface of the started application on the screen according to the image data of the application interface.
Step 904: and under the condition that the mobile phone displays the first application interface of the application, the user rotates the mobile phone, and the shielding image display strategy corresponding to the first application interface is the first display strategy.
When the first application interface is displayed, the mobile phone can be in a horizontal screen state or a vertical screen state, and accordingly, the first application interface can be a horizontal screen application interface or a vertical screen application interface.
The display strategy of the blocked image corresponding to the first application interface can be displaying the blocked image or hiding the blocked image. For example, if the first display strategy is to display an occlusion image, the occlusion image is displayed on the screen when the first application interface is displayed, such as displaying the occlusion image in a top area and/or a side area of the screen. And if the first display strategy is to hide the image, hiding the shielding image on the screen when the first application interface is displayed.
Further, the occlusion image display policy may include a display policy of the first occlusion image and a display policy of the second occlusion image. The first occlusion image is used to occlude the top area of the screen, e.g. the first occlusion image is a top black bar. The second occlusion image is used for occluding a side area of the screen, for example, the second occlusion image is a side black bar. The display strategy of the first occlusion image comprises displaying or hiding the first occlusion image. The display strategy of the second occlusion image comprises displaying or hiding the occlusion image.
For example, if the first display policy is to display a first occlusion image and a second occlusion image, the first occlusion image is displayed in a top area of the screen and the second occlusion image is displayed in a side area of the screen when the first display interface is displayed. If the first display strategy is to display the first occlusion image and hide the second occlusion image, the first occlusion image is displayed in the top area of the screen when the first display interface is displayed, and the second occlusion image in the side area is hidden. If the first display strategy is to hide the first occlusion image and display the second occlusion image, the first occlusion image on the top area of the screen is hidden when the first display interface is displayed, and the second occlusion image is displayed in the side area of the screen. And if the first display strategy is to hide the first occlusion image and the second occlusion image, hiding the first occlusion image on the top area of the screen and hiding the second occlusion image on the side area when the first display interface is displayed.
Step 905: the sensor module detects that the gravity direction of the mobile phone changes.
The sensor module can acquire the gravity information reported by the acceleration sensor installed on the mobile phone, and detects that the gravity direction of the mobile phone changes according to the gravity information reported by the acceleration sensor in the rotation process of the mobile phone.
Step 906: the sensor module sends a gravity direction change event to the WMS.
The sensor module may send a gravity direction change event to the WMS after detecting that the gravity direction of the mobile phone has changed.
Step 907: after receiving the gravity direction change event, the WMS judges whether the mobile phone needs to rotate the screen according to the gravity direction change event.
The WMS can adopt a preset judgment strategy to judge whether the mobile phone needs to rotate the screen according to the gravity direction change event.
For example, the gravity direction change event may include gravity direction information before and after the change. The WMS can determine the posture change of the mobile phone according to the gravity direction information before and after the change, and can determine whether the horizontal and vertical screen postures of the mobile phone are changed according to the posture change of the mobile phone, such as whether the mobile phone is rotated from the horizontal screen posture to the vertical screen posture or whether the mobile phone is rotated from the vertical screen posture to the horizontal screen posture. If the horizontal and vertical screen postures of the mobile phone are changed, the mobile phone is determined to need to rotate the screen, and if the horizontal and vertical screen postures are not changed, the mobile phone is determined not to need to rotate the screen.
It should be understood that the preset judgment policy may also be in other implementation forms, and the embodiment of the present application does not limit this.
In addition, the embodiment of the application is only exemplified by the way that the WMS determines whether the mobile phone needs to perform screen rotation according to the gravity direction change event, and it should be understood that the WMS may also determine whether the mobile phone needs to perform screen rotation according to other information.
For example, the sensor module can recognize that the horizontal and vertical screen postures of the mobile phone change according to data reported by the acceleration sensor, and then send a horizontal and vertical screen posture change event to the WMS, and the WMS judges whether screen rotation is required according to the horizontal and vertical screen posture change event.
For another example, the mobile phone provides an automatic rotation function icon on a related interface, for example, an automatic rotation function icon is provided on a menu bar or a video playing interface, after the user clicks the automatic rotation function icon, the input management module identifies a click operation of the automatic rotation function icon according to the reported capacitance value change message, then reports a click event of the automatic rotation function icon to the WMS, and the WMS determines that screen rotation is required according to the click event of the automatic rotation function icon.
Step 908: and if the WMS judges that the mobile phone needs to rotate the screen, acquiring a second display strategy, wherein the second display strategy is a shielding image display strategy corresponding to a second application interface after the currently displayed first application interface is subjected to interface rotation.
The WMS may obtain, through the interface of the application, an occlusion image display policy corresponding to the second application interface of the application after the application is installed.
After the application is installed, the WMS can obtain information of each Activity of the application through the application interface, namely task information (Activity info), wherein the task information comprises the adaptation condition of the application interface corresponding to the Activity to the hole digging screen, namely whether the application interface corresponding to each Activity is adapted to the hole digging screen or not is obtained. Activity-corresponding application interfaces may include landscape application interfaces and portrait application interfaces.
For application interfaces that do not fit into a trombone screen, the WMS may determine the area where the occlusion image needs to be displayed based on system default configuration information. For example, the configuration information may be that a black border needs to be displayed in a top area when an application interface of the unadapted hole digging screen is displayed, or the black border needs to be displayed in the top area and a side area when the application interface of the unadapted hole digging screen is displayed, or the black border needs to be displayed in the side area when the application interface of the unadapted hole digging screen is displayed.
In summary, the WMS may determine the occlusion image display policy of each application interface of the application according to the adaptation condition of the application interface corresponding to Activity in the task information of the application and the default configuration information. Of course, the occlusion image display policy of each application interface of the application may be determined in other ways.
Step 909: the WMS notifies the display rotation module to perform screen rotation.
Step 910: the display rotation module notifies the surfaceflunger to play a screen rotation animation effect in response to the notification of the WMS.
The screen rotation animation effect refers to an animation effect for switching the first application interface to the second application interface.
The display rotation module can control the surface flunger to start playing the screen rotation animation effect by informing the surface flunger to play the screen rotation animation effect, namely, the first application interface is controlled to start switching to the second application interface. That is, the animation effect of the first application interface switching to the second application interface begins at step 910.
Step 911: the surfaceflunger plays the screen rotation animation effect in response to a notification to display the rotation module.
Step 912: under the condition that the first display strategy is different from the second display strategy, the WMS notifies the systemuui of playing a fade-out animation effect or a fade-in animation effect of the occlusion image according to the second display strategy.
In the case where the first display policy is different from the second display policy, the WMS may notify the systemou that the occlusion image is hidden or displayed according to the second display policy. The embodiment of the present application only uses the fade-in effect to gradually hide the occlusion image, and uses the fade-out effect to gradually display the occlusion image as an example for illustration, and certainly, other manners may also be used to hide or display the occlusion image, which is not limited in the embodiment of the present application.
For example, if the first display policy is to hide an occlusion image and the second display policy is to display an occlusion image, the WMS may notify the systemizu to play a fade-in animation effect of the occlusion image before the screen rotation animation effect is played according to the second display policy. Or, if the first display policy is to display the occlusion image and the second display policy is to hide the occlusion image, the WMS may notify the systemizo ui of playing the fade-in animation effect of the occlusion image before the screen rotation animation effect is played according to the second display policy.
Further, if the first display policy and the second display policy both include a display policy for the first occlusion image and a display policy for the second occlusion image, notifying the systemou ui to hide or display the occlusion image before the first application interface is switched to the second application interface may further include the following several cases:
in the first case: when the display policy of the first occlusion image is different from that of the second occlusion image in the first display policy and the second display policy, and the display policy of the second occlusion image is the same, the system ui is notified to hide or display the first occlusion image before switching to the second application interface.
For example, if a first occlusion image display policy in the first display policy is to display a first occlusion image, and a second occlusion image display policy in the second display policy is to hide the first occlusion image, the systemuui is notified to hide the first occlusion image before switching to the second application interface. If the first occlusion image display strategy in the first display strategy is to hide the first occlusion image, and the first occlusion image display strategy in the second display strategy is to display the first occlusion image, notifying the systemin ui to display the first occlusion image before switching to the second application interface, for example, notifying the systemin to play a fade-in animation effect of the first occlusion image.
In the second case: and under the condition that the display strategy of the first occlusion image is the same as that of the second occlusion image in the first display strategy and the second display strategy, and the display strategy of the second occlusion image is different, notifying the systemuui of hiding or displaying the second occlusion image before switching to the second application interface, for example, notifying the systemuui of playing a fade-out animation effect or a fade-in animation effect of the second occlusion image.
For example, if the second occlusion image display policy in the first display policy is to display a second occlusion image, and the second occlusion image display policy in the second display policy is to hide the second occlusion image, the system ui is notified to hide the second occlusion image before switching to the second application interface. If the second occlusion image display strategy in the first display strategy is to hide the second occlusion image, and the second occlusion image display strategy in the second display strategy is to display the second occlusion image, notifying the systemuui to display the second occlusion image before switching to the second application interface, for example, notifying the systemuui to play a fade-in animation effect of the second occlusion image.
In the third case: in the case that the display policy of the first occlusion image is different from that of the second occlusion image in the first display policy and the second display policy, and the display policy of the second occlusion image is also different, notifying the systemuui to hide or display the first occlusion image and to hide or display the second occlusion image before switching to the second application interface, for example, notifying the systemuui to play a fade-out animation effect or a fade-in animation effect of the first occlusion image and to play a fade-out animation effect or a fade-in animation effect of the second occlusion image.
It should be understood that the specific implementation manner of the third case can be inferred according to the combination of the first case and the second case, and the description of the application example is not repeated here.
As an example, the WMS may notify the systemin of playing a fade-in animation effect or a fade-out animation effect of the shielding image while notifying the display rotation module to rotate the screen, or notify the systemin of playing a fade-in animation effect or a fade-out animation effect of the shielding image within a preset time period after notifying the display rotation module to rotate the screen, where the preset time period is a time period required for playing the screen rotation animation effect, so that the synchronous playing of the fade-in and fade-out animation effects of the shielding image is completed before the playing of the screen rotation effect is completed, thereby improving the visual smoothness of the screen rotation process, and further improving the user embodiment.
In a possible implementation manner, step 908 and step 909 may be executed simultaneously, that is, after determining that the mobile phone needs to perform screen rotation, the WMS may obtain the second display policy while notifying the display rotation module to perform screen rotation. Thereafter, step 910 and step 912 may be performed simultaneously, that is, while the display rotation module notifies the surface flunger to play the screen rotation effect, the WMS notifies the system ui to play the fade-in and fade-out effect of the occlusion image according to the second display policy. Thereafter, step 911 and step 913 may be performed simultaneously, that is, the systemin plays the fade-in or fade-out effect of the occlusion image while the surfefinger plays the screen rotation effect. Therefore, the screen rotation effect and the fading effect of the shielding image can be synchronously performed, and the user experience is improved.
Step 913: the SystemUI plays a fade-in animation effect or a fade-out animation effect of the occlusion image in response to the notification of the WMS.
The systemuui may hide or display the occlusion image in response to the notification of the WMS. Wherein, if the WMS notifies the SystemUI to hide the occlusion image, the SystemUI hides the occlusion image in response to the notification of the WMS. If the WMS notifies the systemou that the occlusion image is displayed, the systemou displays the occlusion image in response to the notification of the WMS.
The embodiment of the present application only uses the fade-in effect to gradually hide the occlusion image, and uses the fade-out effect to gradually display the occlusion image as an example for illustration. For example, if the WMS notifies the SystemUI to play the fade-out animation effect of the occlusion image, the SystemUI plays the fade-out animation effect of the occlusion image in response to the notification of the WMS. If the WMS notifies the systemhui to play the fade-in animation effect of the occlusion image, the systemhui displays the fade-in animation effect of playing the occlusion image in response to the notification of the WMS.
For example, the implementation form of the fade-out animation effect of the occlusion image may include: gradually reducing the size of the occlusion image on the screen until the occlusion image is hidden; alternatively, the transparency of the occlusion image is successively increased on the screen until the occlusion image is hidden. Of course, other ways may also be adopted to hide the occlusion image with a fade-out effect, which is not limited in the embodiment of the present application.
For example, the fade-in animation effect of the occlusion image may be implemented in the form of: gradually increasing the size of the occlusion image on the screen until the complete occlusion image is displayed on the screen; alternatively, the transparency of the occlusion image is successively reduced on the screen until the transparency of the occlusion image is reduced to a transparency at which the occlusion image can be clearly seen. Of course, other ways may also be adopted to display the occlusion image with a fade-in effect, which is not limited in the embodiment of the present application.
In one possible implementation, a partial area of the occlusion image is displayed on the screen first, and then the size of the partial area of the occlusion image is increased successively until the complete occlusion image is displayed on the screen. The partial area where the occlusion image is displayed on the screen may be preset, for example, the partial area may be an upper area or a lower area of the occlusion image, and this is not limited in this embodiment of the application.
In another possible implementation manner, the occlusion image is displayed on the hole digging screen with a first transparency, and then the transparency of the occlusion image is gradually reduced until the transparency of the occlusion image is reduced to a second transparency. The second transparency is smaller than the first transparency, and the second transparency is a transparency through which the shielding image can be clearly seen. The first transparency and the second transparency may be preset according to needs, which is not limited in the embodiment of the present application.
In the embodiment of the application, after it is determined that screen rotation is needed, before the display rotation module rotates the screen, the WMS may obtain in advance a shielding image display policy corresponding to the rotated application interface, and before the screen rotation effect playing is completed, notify the system user interface in advance according to the shielding image display policy corresponding to the rotated application interface to play a fade-in animation effect or a fade-out animation effect of a shielding image, so that before the screen rotation effect playing is completed, the synchronous playing of the fade-in and fade-out effects of the shielding image is completed, smooth visual feeling of the screen rotation process is improved, visual blockage caused by hiding or displaying the shielding image during screen rotation is relieved, and user experience is improved.
Generally, the interaction between the modules in the electronic device and the implementation of the functions of the modules themselves depend on the calls to the functions in the system. In order to further understand the display optimization method provided by the present application, a scenario in which the electronic device switches from a vertical screen application interface of the unadapted hole digging screen to a horizontal screen application interface of the adapted hole digging screen as shown in fig. 5 is taken as an example, and a function call relationship inside the electronic device in the process is described below.
Referring to fig. 10, fig. 10 is a signaling diagram of a display optimization method during screen rotation according to an embodiment of the present application.
As shown in fig. 10, the WMS may specifically include the following components:
a display management component, also called displaymanager service; a display content component, also known as DisplayContent; the phone window management component is also called HwPhoneWindowManager.
The surfaceflag may include the following components:
the Screen Rotation Animation component is also called Screen Rotation Animation.
When the mobile phone displays the vertical screen application interface and the shielding image shown in (a) in fig. 5, if the user rotates the mobile phone, the sensor module can detect that the gravity direction of the mobile phone changes, and then the sensor module calls the following steps that 1: a sensor event, also called sensorEvent (), is an event triggered by a change in the detection data of a sensor module. The sensor module reports the gravity direction change event of the mobile phone to the display management component by calling the sensor event.
The process of calling 1 can be regarded as a specific implementation manner of step 906 in fig. 9.
After the display management component receives the gravity direction change event reported by the sensor module, whether the mobile phone needs to be rotated by the screen can be judged according to the gravity direction change event, if the mobile phone needs to be rotated by the screen, the display management component calls 2: and the display switching function is called to inform the display content component that the currently displayed vertical screen display interface needs to be rotated by the screen.
The display content component, in response to the notification by the display management component, invokes 3: the display content component may configure rotation data by calling the rotation switching confirmation function, such as configuring a rotation angle, a length and a width of a rotated landscape screen application interface, and report the configured rotation data to the display rotation module.
After the display rotation module receives the rotation data reported by the display content component, 4: and starting a rotating animation function, which is also called startrotanation (), and controlling a screen rotating animation assembly to start playing a screen rotating animation effect by calling the rotating animation function, namely starting playing the animation effect of switching from a vertical screen application interface to a horizontal screen application interface. That is, the animation effect of switching from the portrait application to the landscape application is to start playing from the time of call 4.
In the embodiment of the present application, the process of invoking 3 may be regarded as a specific implementation of the foregoing step 907, and the process of invoking 4 may be regarded as a specific implementation of the foregoing step 909.
In addition, after the display rotation module receives the rotation data reported by the display content component, while calling 4, it can also call 5: and inquiring a screen edge control strategy function, namely querynotchcontrolfiletforciescreen, and sending an inquiry request for inquiring the shielding image display strategy corresponding to the rotated horizontal screen application interface to the telephone window management component by calling the inquiry screen edge control strategy function. And after receiving the query request, the telephone window management component queries the occlusion image display strategy corresponding to the rotated transverse screen application interface from the window management information, wherein the occlusion image display strategy corresponding to the transverse screen application interface comprises display strategies of top black bars and side black bars. If the shielding image display strategy corresponding to the cross-screen application interface is inquired to be the top black bar and the side black bar, the telephone window management component calls 6: and a screen edge visualization function, also called setscreen side box visualization animation (), which feeds back the occlusion image display strategy corresponding to the landscape screen application interface as a hidden top black bar and a hidden side black bar to the display rotation module.
After receiving the shielding image display strategy corresponding to the horizontal screen application interface fed back by the telephone window management component, the display rotation module can call 7: and opening a hidden animation function, which is also called startFadeaanimation (). The display management component can inform the system user interface to hide the occlusion image by calling the open hidden animation function. After receiving the notification of hiding the occlusion image, the system user interface may hide the black bars displayed at the top and the side of the screen in a predetermined hiding manner, for example, hide the black bars displayed at the top and the side of the screen in a shallow effect, and call 8 after the hiding is completed: the hidden animation completion function, also called openanimation end (), notifies the display rotation module that the top and side black bars have been completely hidden.
In addition, after the screen rotation animation component finishes playing the screen rotation animation effect, the following steps can be also called for 9: and a rotation animation completion function, also called onRotationActimationEnd (), for notifying the display management component that the screen rotation animation effect is played completely.
In addition, the display content component can respond to the notification call 5 of the display management component and then call 7 according to the information fed back by the telephone window management component, so as to notify the user interface of the system to hide the occlusion image.
In this embodiment, the display rotation module may query the display policy of the rotated interface for the occlusion image while notifying the screen rotation animation component to play the screen rotation effect, that is, call the function 4, and notify the system user interface to play the hidden animation of the occlusion image according to the queried display policy, that is, call the functions 5 to 7. Therefore, the screen rotation effect and the hidden animation for shielding the image can be simultaneously carried out, so that the time difference between the hidden shielding image and the screen rotation is shortened, and the visual effect of switching the hole digging screen from an application interface which is not matched with the hole digging screen to an application interface which is matched with the hole digging screen is improved.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, a hard Disk, a magnetic tape), an optical medium (e.g., a Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), etc.
The above description is not intended to limit the present application to the particular embodiments disclosed, but rather, the present application is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present application.

Claims (11)

1. A display optimization method during screen rotation is characterized in that the method is applied to electronic equipment provided with a hole digging screen, and comprises the following steps:
displaying a first application interface of an application, wherein a display strategy of an occlusion image corresponding to the first application interface is a first display strategy, and the occlusion image is used for occluding a top area and/or a side area of the hole digging screen;
responding to screen rotation operation, and acquiring a second display strategy, wherein the second display strategy is a shielding image display strategy corresponding to a second application interface after the first application interface performs interface rotation;
and under the condition that the first display strategy is different from the second display strategy, switching the first application interface to the second application interface, and hiding or displaying the shielding image before switching to the second application interface according to the second display strategy.
2. The method of claim 1, wherein said first display policy is to display said occlusion image on said trombone screen and said second display policy is to not display said occlusion image on said trombone screen;
the first application interface of the display application comprises:
displaying a first application interface of the application, and displaying the shielding image on the hole digging screen;
the hiding or displaying the occlusion image before switching to the second application interface includes:
hiding the occlusion image displayed on the excavation screen prior to switching to the second application interface.
3. The method of claim 2, wherein said concealing said occlusion image displayed on said excavation screen comprises:
gradually reducing the size of the shielding image displayed on the hole digging screen until the shielding image is hidden;
or,
and gradually improving the transparency of the shielding image displayed on the hole digging screen until the shielding image is hidden.
4. The method of claim 1, wherein the first display strategy is to not display the occlusion image on the excavation screen, and the second display strategy is to display the occlusion image on the excavation screen;
the hiding or displaying the occlusion image before switching to the second application interface includes:
displaying the occlusion image on the excavation screen prior to switching to the second application interface.
5. The method of claim 4, wherein said displaying said occlusion image on said excavation screen comprises:
displaying a partial area of the shielding image on the hole digging screen, and gradually increasing the size of the displayed partial area of the shielding image until the complete shielding image is displayed on the hole digging screen;
or,
and displaying the shielding image on the hole digging screen in a first transparency, and gradually reducing the transparency of the shielding image until the transparency of the shielding image is reduced to a second transparency, wherein the second transparency is smaller than the first transparency.
6. The method of claim 1, wherein the first display strategy and the second display strategy each comprise a display strategy of a first occlusion image for occluding a top area of the hole-cutting screen and a display strategy of a second occlusion image for occluding a side area of the hole-cutting screen;
the hiding or displaying the occlusion image before switching to the second application interface includes:
hiding or displaying the first occlusion image before switching to the second application interface under the condition that the display strategies of the first occlusion image and the second occlusion image in the first display strategy and the second display strategy are different and the display strategies of the second occlusion image are the same;
hiding or displaying the second occlusion image before switching to the second application interface under the condition that the display strategies of the first occlusion image and the second occlusion image in the first display strategy and the second display strategy are the same and the display strategy of the second occlusion image is different;
and hiding or displaying the first occlusion image and hiding or displaying the second occlusion image before switching to the second application interface under the condition that the display strategies of the first occlusion image and the second occlusion image in the first display strategy and the second display strategy are different.
7. The method of any of claims 1-6, wherein an operating system of the electronic device includes a window management service module, a system user interface, and a display rotation module;
the obtaining of the second display strategy in response to the screen rotation operation includes:
if the window management service module detects a screen rotation instruction, inquiring an occlusion image display strategy corresponding to the second application interface, wherein the occlusion image display strategy corresponding to the second application interface is the second display strategy;
the switching the first application interface to the second application interface, and hiding or displaying the occlusion image before switching to the second application interface according to the second display policy includes:
the window management service module informs the display rotation module of screen rotation and informs the system user interface of hiding or displaying the occlusion image according to the second display strategy;
the display rotation module responds to the notification of the window management service module and switches the first application interface to the second application interface;
and the system user interface responds to the notice of the window management service module and hides or displays the shielding image before the display rotation module switches the first application interface to the second application interface.
8. The method of claim 7, wherein the operating system further comprises a surface flinger;
the display rotation module responds to the notification of the window management service module and switches the first application interface to the second application interface, and the method comprises the following steps:
and the display rotation module responds to the notification of the window management service module and notifies the surface flag to play a screen rotation animation effect, wherein the screen rotation animation effect is an animation effect for switching the first application interface to the second application interface.
9. The method of claim 7, wherein the operating system of the electronic device further comprises a sensor module for obtaining a landscape and portrait pose of the electronic device;
before the window management service module queries the occlusion image display policy corresponding to the second application interface, the method further includes:
if the sensor module detects that the horizontal and vertical screen postures of the electronic equipment change, a horizontal and vertical screen posture change event is sent to the window management service module;
and the window management service module receives the horizontal and vertical screen posture change event and determines to detect the screen rotation instruction according to the received horizontal and vertical screen posture change event.
10. An electronic device, characterized in that the electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, which computer program, when executed by the processor, implements the method according to any of claims 1 to 9.
11. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-9.
CN202211293081.XA 2022-10-21 2022-10-21 Display optimization method and device during screen rotation and storage medium Active CN115361468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211293081.XA CN115361468B (en) 2022-10-21 2022-10-21 Display optimization method and device during screen rotation and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211293081.XA CN115361468B (en) 2022-10-21 2022-10-21 Display optimization method and device during screen rotation and storage medium

Publications (2)

Publication Number Publication Date
CN115361468A CN115361468A (en) 2022-11-18
CN115361468B true CN115361468B (en) 2023-02-28

Family

ID=84007719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211293081.XA Active CN115361468B (en) 2022-10-21 2022-10-21 Display optimization method and device during screen rotation and storage medium

Country Status (1)

Country Link
CN (1) CN115361468B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389496B (en) * 2023-09-19 2024-10-18 荣耀终端有限公司 Folding screen display method, electronic equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3495935A1 (en) * 2017-12-11 2019-06-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd Method for screenshot and related products
CN109885373A (en) * 2019-02-27 2019-06-14 腾讯科技(深圳)有限公司 A kind of rendering method and device of user interface
CN110134475A (en) * 2019-04-17 2019-08-16 深圳壹账通智能科技有限公司 Method, apparatus, computer equipment and the storage medium of display interface parameter configuration
CN110874177A (en) * 2018-08-29 2020-03-10 中兴通讯股份有限公司 Display method of display screen, electronic equipment and storage medium
WO2020078273A1 (en) * 2018-10-15 2020-04-23 华为技术有限公司 Photographing method, and electronic device
CN114168031A (en) * 2022-02-11 2022-03-11 荣耀终端有限公司 Display optimization method and device for hole digging screen and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3495935A1 (en) * 2017-12-11 2019-06-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd Method for screenshot and related products
CN110874177A (en) * 2018-08-29 2020-03-10 中兴通讯股份有限公司 Display method of display screen, electronic equipment and storage medium
WO2020078273A1 (en) * 2018-10-15 2020-04-23 华为技术有限公司 Photographing method, and electronic device
CN109885373A (en) * 2019-02-27 2019-06-14 腾讯科技(深圳)有限公司 A kind of rendering method and device of user interface
CN110134475A (en) * 2019-04-17 2019-08-16 深圳壹账通智能科技有限公司 Method, apparatus, computer equipment and the storage medium of display interface parameter configuration
CN114168031A (en) * 2022-02-11 2022-03-11 荣耀终端有限公司 Display optimization method and device for hole digging screen and storage medium

Also Published As

Publication number Publication date
CN115361468A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
CN112269527B (en) Application interface generation method and related device
JP7497943B2 (en) Device with foldable screen, touch control method for foldable screen device, computer-readable storage medium and computer program
CN111966252A (en) Application window display method and electronic equipment
CN113805745B (en) Control method of suspension window and electronic equipment
CN114168031B (en) Display optimization method and device for hole digging screen and storage medium
CN112860145B (en) Application control method and electronic equipment
CN115361468B (en) Display optimization method and device during screen rotation and storage medium
CN114637451B (en) Display optimization method, device and storage medium during application switching
CN114780012B (en) Display method and related device of screen locking wallpaper of electronic equipment
WO2023040666A1 (en) Keyboard display method, foldable screen device, and computer-readable storage medium
CN115643485A (en) Shooting method and electronic equipment
CN117724781A (en) Playing method for starting animation by application program and electronic equipment
US20240129621A1 (en) Video recording method and electronic device
CN117894256B (en) Display processing method and device and electronic equipment
CN117746762B (en) Display processing method and device and electronic equipment
CN117130510B (en) Brightness control method and related equipment
CN116755748B (en) Card updating method, electronic device, and computer-readable storage medium
WO2024066976A1 (en) Control display method and electronic device
CN117130509B (en) Brightness control method and related equipment
CN116672707B (en) Method and electronic device for generating game prediction frame
JP7571961B2 (en) INTERFACE DISPLAY METHOD AND ELECTRONIC DEVICE
CN114816311B (en) Screen movement method and device
EP4383191A1 (en) Display method and electronic device
WO2023093167A1 (en) Photographing method and electronic device
WO2023193720A9 (en) Control method and central control equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant