Application startup display method and electronic device

By displaying the startup interface of the application in a horizontal screen on an electronic device in a full screen state, and displaying the main interface that does not support horizontal screen full screen display through a floating window, the problem that the application under horizontal screen cannot be displayed in full screen is solved, and the screen utilization rate and User experience.

CN118689358BActive Publication Date: 2025-01-03HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411162351.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-01-03
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

In the horizontal screen state, the application cannot display the full screen, resulting in low screen utilization, and the user needs to change the grip posture to adapt to the vertical screen display, which brings inconvenience to the user.

Method used

Provide an application startup display method, supports multi-directional display electronic devices, display the startup interface of the application in a horizontal screen state, and displays the main interface and other interfaces that do not support horizontal screen full screen display through a floating window to maintain horizontal screen Display status to improve screen utilization.

Benefits of technology

Users do not need to change their grip posture, which improves screen utilization and browsing efficiency and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689358B_ABST
    Figure CN118689358B_ABST
Patent Text Reader

Abstract

The present application provides an application startup display method and an electronic device. The method can be applied to target electronic devices such as foldable screen mobile phones and tablet computers. When implementing the above method, after detecting the user operation of opening the target application, the target electronic device can first determine the current screen state. When in a horizontal screen state and the target application supports horizontal full-screen display, the target electronic device can display the user interface of the target application in a horizontal full-screen display; when in a horizontal screen state and the target application does not support horizontal full-screen display, the target electronic device can display a vertical floating window corresponding to the vertical screen, and display the user interface of the target application in the above vertical floating window. In addition to the vertical floating window, the target electronic device can continue to display other user interfaces. In this way, the user does not need to change the holding posture, and it is beneficial to improve the utilization rate of the screen, killing two birds with one stone.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to an application startup display method and an electronic device. Background Art

[0002] Due to layout resource configuration reasons, some applications can only be displayed in full screen in portrait mode. In landscape mode, the application either obtains a vertical screen area and displays the application interface in this area, or displays the application interface in portrait mode. When the application displays the application interface in the vertical screen area, the screen outside the area is idle and the screen utilization rate is low. When switching to vertical screen display, the user needs to adaptively change the holding posture from horizontal to vertical, which brings inconvenience to the user. Summary of the invention

[0003] The present application provides an application startup display method and an electronic device.

[0004] In a first aspect, the present application provides an application startup display method. The method is applied to an electronic device that supports multi-directional display. The method includes: in a scenario where a first interface is displayed in horizontal screen, after a first operation of opening a first application is detected, the startup interface of the first application is displayed in full horizontal screen; after the startup interface of the first application is displayed in full horizontal screen, the second interface is displayed, the second interface includes the first interface and the first floating window, the first floating window displays the main interface of the first application, and the main interface of the first application does not support full horizontal screen display; close the first application, and display the first interface in vertical screen; in a scenario where the first interface is displayed in vertical screen, after a second operation of opening the first application is detected, the startup interface of the first application is displayed in full vertical screen, and the main interface of the first application is displayed in full vertical screen.

[0005] The target electronic device is an electronic device that supports multi-directional display. Preferably, the target electronic device is a foldable screen mobile phone or a tablet computer.

[0006] By implementing the method provided in the first aspect, for a first application (such as a chat application) that only supports full-screen display in portrait mode, target electronic devices such as foldable screen mobile phones and tablet computers can display the startup interface, main interface and other interfaces of the application in full screen in a portrait mode; in a landscape mode, when the startup interface supports full-screen display in landscape mode, the startup interface of the application is displayed in full screen in landscape mode, and then the main interface and other interfaces of the application that do not support full-screen display in landscape mode are displayed in a floating window.

[0007] Compared to switching to a vertical screen, the above method can maintain a horizontal screen display. In this way, the user does not need to change the holding posture. On the other hand, compared to the method of occupying the entire screen in a horizontal screen state and then centering the vertical screen display, the above method is also conducive to improving the utilization of the screen. In addition to the floating window, users can also browse and operate other interfaces to improve browsing efficiency.

[0008] In some embodiments, the method also includes: in a scenario where the first interface is displayed in landscape mode, after detecting a third operation to open a second application, displaying the startup interface and main interface of the second application in full landscape mode, and the main interface of the second application supports full landscape mode display.

[0009] For a second application that supports full-screen horizontal display (such as a note-taking application), in a horizontal screen scenario, the target electronic device can display the startup interface, main interface and other interfaces of the second application in full-screen horizontal display, thereby displaying as much content of the second application as possible and as clearly as possible, thereby improving the user's browsing experience.

[0010] In some embodiments, after displaying the startup interface of the first application in full screen horizontally, the method further includes: displaying the main interface in full screen vertically when the main interface of the first application does not support floating window display.

[0011] In some embodiments, after detecting the first operation of opening the first application, the method also includes: when the startup interface does not support horizontal screen display but supports floating window display, displaying a second floating window on the first interface, displaying the startup interface of the first application in the second floating window, and continuing to display the main interface of the first application in the second floating window; when the startup interface does not support horizontal screen display and does not support floating window display, displaying the startup interface and main interface of the first application in full vertical screen.

[0012] In some embodiments, the aspect ratio of the first floating window is the same as the aspect ratio of the screen of the electronic device in portrait mode.

[0013] In some embodiments, the electronic device includes an activity manager AMS and a window manager WMS, and displays the startup interface in full-screen landscape mode, specifically including: when a first condition is met, the AMS sends a first indication message to the WMS, sets the window mode to full-screen, and displays the startup interface in full-screen landscape mode; the first condition includes: the number of activities in the activity stack is 1 and the activity corresponds to the startup interface, and the startup interface is a horizontal screen interface.

[0014] In some embodiments, displaying the second interface specifically includes: when the second condition is met, the AMS sends a second indication message to the WMS, sets the window mode to a floating window, and displays the second interface; the second condition includes: the number of activities in the activity stack is greater than 1, and the current screen state is horizontal, and the current window mode is full screen, and the main interface is a vertical interface.

[0015] Through the above method, in the horizontal screen state, AMS can confirm in turn whether the startup interface and the main interface support horizontal screen display. If they do not support horizontal screen, the window mode is set to the floating window mode, and then the startup interface, main interface and other interfaces of the application are displayed through the floating window.

[0016] In some embodiments, the electronic device includes an activity manager AMS and a window manager WMS, the horizontal screen mark bit of the first application is a first value, and the second interface is displayed, specifically including: when the third condition is met, determining whether the fourth condition is met; the third condition includes: the number of activities in the activity stack is 1 and the activity corresponds to the startup interface, or the horizontal screen mark bit of the application is the first value; when the fourth condition is met, the AMS sends a third indication message to the WMS, sets the window mode to a floating window, and displays the second interface; the fourth condition includes: the current screen state is horizontal, the current window mode is full screen, and the main interface is a vertical screen interface.

[0017] After the AMS sends the third indication information to the WMS, the method further includes: updating the horizontal screen mark bit of the first application to a second value.

[0018] Through the above method, in the horizontal screen state, AMS can also confirm in sequence whether the startup interface and the main interface support horizontal screen display. On the other hand, the above method is conducive to improving the code reuse rate, reducing the program size, and saving storage space in code implementation.

[0019] In a second aspect, the present application provides an electronic device, comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer programs, and when the one or more processors execute the computer programs, the electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.

[0020] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions so that the electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, including a computer program. When the above-mentioned computer program runs on an electronic device, the above-mentioned electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.

[0022] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0023] It can be understood that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1A is a schematic diagram of a vertical screen provided in an embodiment of the present application;

[0025] Figure 1B is a horizontal screen schematic diagram provided in an embodiment of the present application;

[0026] Figure 2A is a schematic diagram of a vertical screen display provided in an embodiment of the present application;

[0027] Figure 2B is a schematic diagram of horizontal screen display provided by an embodiment of the present application;

[0028] Figure 3 is a schematic diagram of partial horizontal screen display in horizontal screen state provided by an embodiment of the present application;

[0029] Figure 4 This is a schematic diagram of switching from a horizontal screen state to a vertical screen state provided in an embodiment of the present application;

[0030] Figure 5 is a flow chart of an application startup display method provided in an embodiment of the present application;

[0031] Figure 6A-6D is a set of user interface schematic diagrams provided in an embodiment of the present application;

[0032] Figure 7 is a flowchart of another application startup display method provided by an embodiment of the present application;

[0033] Figure 8A-8C is a set of user interface schematic diagrams provided in an embodiment of the present application;

[0034] Figure 9A-9C is a set of user interface schematic diagrams provided in an embodiment of the present application;

[0035] Fig.10 It is a timing diagram of the software structure provided by the embodiment of the present application;

[0036] Fig.11 is an AMS timing diagram provided in an embodiment of the present application;

[0037] Fig.12 It is a schematic diagram of the structure of a target electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.

[0039] Different from flat-screen mobile phones, target electronic devices such as foldable-screen mobile phones and tablets usually support multi-directional display, such as horizontal display, vertical display, etc.

[0040] refer to Figure 1A The state where the short border of the device is perpendicular to the user's standing direction is called the portrait state. Figure 1B The state where the long border of the device is perpendicular to the user's standing direction is called the horizontal screen state. The reading direction of "from left to right, from top to bottom" is the general reading direction. Figure 2A In vertical screen mode, displaying in the normal reading direction is called vertical screen display. Figure 2B In landscape mode, displaying in the normal reading direction is called landscape display.

[0041] Usually, an application will be configured with at least one set of layout resources suitable for vertical screen display (also called vertical screen layout resources). In this way, when the above application is run on a flat screen mobile phone, and when the above application is run on a folding screen mobile phone or tablet in vertical screen, the user interface of the above application can fill the screen vertically for user browsing. Some applications will also be configured with one set of layout resources suitable for horizontal screen display (also called horizontal screen layout resources). In this way, when the above application is run on a folding screen mobile phone or tablet in horizontal screen, the user interface of the above application can also fill the screen vertically, improving the user's browsing experience.

[0042] For applications that are configured with both vertical and horizontal layout resources, target electronic devices such as foldable phones and tablets can determine whether to display the above applications in vertical or horizontal mode based on the current device state. Figure 2A , when in the vertical screen state, the target electronic device can display the above application in full vertical screen according to the vertical screen layout resource; reference Figure 2B When in landscape mode, the target electronic device may display the above application in full landscape mode according to landscape layout resources.

[0043] This not only conforms to the user's reading habits when holding the screen vertically or horizontally, but also maximizes screen utilization and improves the user's browsing experience.

[0044] For an application that is only configured with vertical screen layout resources, in the vertical screen state, the target electronic device can display the above application in full vertical screen according to the vertical screen layout resources; in the horizontal screen state, since the horizontal screen layout resources suitable for horizontal screen display cannot be obtained, the target electronic device cannot display the above application in full vertical screen according to the vertical screen layout resources. Figure 2B The above application is displayed in full screen in landscape mode.

[0045] In some embodiments, when a horizontal screen layout resource suitable for horizontal screen display cannot be obtained, the target electronic device can determine a display area of ​​W2×H1 (W2H1). The display area of ​​W2×H1 can be regarded as a small vertical screen. Preferably, W2 / H1=H1 / W1. At this time, the above-mentioned small vertical screen matches the vertical screen layout resource. Therefore, in the horizontal screen state, the target electronic device can display the application user interface in the above-mentioned small vertical screen according to the vertical screen layout resources for the user to browse. The above-mentioned display method is also called partial horizontal screen display (the vertical screen layout resources are actually used, not the horizontal screen layout resources).<h1>

[0046] refer to Figure 3 In the scenario where the desktop 20 is displayed in landscape mode, the target electronic device can detect a user operation, such as a click operation, on the chat application icon. In response to the above operation, the target electronic device can determine a display area 22 (small vertical screen) of W2×H1 (W2H1), and then display the chat list interface 21 of the chat application in the display area 22 based on the vertical screen layout resources for the user to browse.<h1>

[0047] like Figure 3 As shown, at this time, the screen outside the display area 22 is idle and the screen utilization rate is low.

[0048] Therefore, in other embodiments, in order to improve screen utilization, in the horizontal screen state, when a horizontal screen layout resource suitable for horizontal screen display cannot be obtained, the target electronic device can switch to vertical screen display. Figure 4 In the scenario where the desktop 20 is displayed in landscape mode, after detecting a user operation on a chat application icon, the target electronic device may display a chat list interface 21 of the chat application in full portrait mode.

[0049] At this time, in order to facilitate reading, the user needs to adaptively change the holding posture to vertical holding, that is, switch the target electronic device to vertical state, which brings inconvenience to the user.

[0050] In view of this, an embodiment of the present application provides an application startup display method. The method can be applied to target electronic devices such as foldable screen mobile phones and tablet computers. Not limited to foldable screen mobile phones and tablet computers, the target electronic device can also be other types of electronic devices, and the embodiment of the present application does not impose any special restrictions on this.

[0051] When implementing the above method, after detecting the user operation of opening the target application, the target electronic device can first determine the current screen state. When in the portrait state, the target electronic device can obtain the portrait layout resources of the target application, determine whether the target application supports portrait display, and when it supports portrait display (i.e., it is configured with portrait layout resources), the target electronic device can display the user interface of the target application in full portrait mode; when in the landscape state, the target electronic device can obtain the landscape layout resources, determine whether the target application supports landscape display, and when it supports landscape display (i.e., it is configured with landscape layout resources), the target electronic device can display the user interface of the target application in full landscape mode.

[0052] When in landscape mode and the target application is not configured with landscape layout resources (i.e., landscape full-screen display is not supported), the target electronic device can display a vertical floating window corresponding to the portrait screen, draw the user interface of the target application based on the portrait layout resources, and then display the user interface of the target application in the above-mentioned vertical floating window.

[0053] In addition to the vertical floating window, the target electronic device can continue to display other user interfaces, thus eliminating the need for the user to change the holding posture and improving screen utilization, killing two birds with one stone.

[0054] Figure 5 This is a flowchart of an application startup display method provided in an embodiment of the present application.

[0055] S501: Start the target application.

[0056] The target electronic device may detect a user operation on any application icon, and in response to the operation, the target electronic device may start the application corresponding to the application icon (ie, the target application). Figure 3 As shown, the target electronic device can detect the user operation acting on the chat application icon, and in response to the above operation, the target electronic device can start the chat application corresponding to the chat application icon.

[0057] S502: Get screen status.

[0058] During the process of starting the target application, the target electronic device obtains the first user interface of the target application from the program package of the target application, and draws and displays the above user interface.

[0059] Given that the target electronic device supports multi-directional display, in the embodiment of the present application, before drawing the first user interface of the target application, the target electronic device may first obtain the screen state to determine whether it is currently in the portrait state or the landscape state. When in the landscape state, the target electronic device continues to execute S503. When in the portrait state, the target electronic device may obtain the portrait layout resource, and draw and display the first user interface of the target application according to the portrait layout resource and the portrait aspect ratio.

[0060] S503. Does the target application support horizontal full-screen display?

[0061] When in landscape mode, the target electronic device can obtain landscape layout resources to determine whether the target application supports landscape full-screen display. When the target application is configured with landscape layout resources, the target application supports landscape full-screen display; when the target application is not configured with landscape layout resources, the target application does not support landscape full-screen display.

[0062] S504: Set the window mode to full screen, and display the user interface of the target application in full screen horizontally.

[0063] When the target application supports landscape display, the target electronic device can set the window mode (WindowMode) to full screen. Then, the target electronic device can generate a full screen window. At the same time, after determining that the target application supports landscape full screen display, the target electronic device can draw the first user interface of the target application according to the landscape layout resources and the landscape aspect ratio, and then display the above user interface in the above full screen window in the landscape state, that is, display the above user interface in landscape full screen. Subsequently, the target electronic device can continue to display other user interfaces of the target application in the above landscape full screen window for users to browse.

[0064] S505. Does the target application support floating window display?

[0065] When the target application does not support horizontal screen display, the target electronic device continues to execute S505 to confirm whether the target application supports floating window display.

[0066] S506: Set the window mode to a floating window, and display the user interface of the target application through the floating window.

[0067] When the target application supports floating window display, the target electronic device can set the window mode to a floating window. Thus, the target electronic device can generate a vertical floating window. The aspect ratio of the vertical floating window is consistent with the aspect ratio of the display area indicated by the vertical screen layout resource. At the same time, after determining that the target application does not support horizontal screen display but supports floating window display, the target electronic device can draw the first user interface of the target application according to the vertical screen layout resources and the aspect ratio of the display area indicated by the vertical screen layout resources, and then display the above user interface in the above vertical floating window. Subsequently, the target electronic device can continue to display other user interfaces of the target application in the above vertical floating window for the user to browse.

[0068] S507: Set the window mode to full screen, and display the user interface of the target application in full vertical screen.

[0069] When the target application does not support floating window display, the target electronic device can set the window mode to full screen. Then, the target electronic device can generate a full-screen window. At the same time, after determining that the target application does not support horizontal full-screen display and does not support floating window display, the target electronic device can draw the first user interface of the target application according to the vertical screen layout resources and the vertical screen aspect ratio, and switch to the vertical screen state, and then display the above user interface in the vertical full-screen window, that is, the vertical full-screen display of the above user interface. Subsequently, the target electronic device can continue to display other user interfaces of the target application in the above vertical full-screen window for user browsing.

[0070] Figure 6A-6D This is a set of user interface schematic diagrams provided in an embodiment of the present application.

[0071] refer to Fig. 6A , in the scenario where the desktop 20 is displayed in landscape mode, the target electronic device can detect the user operation on the note application icon. The note application (second application) corresponding to the note application icon is configured with vertical layout resources and horizontal layout resources, that is, the note application supports vertical and horizontal display. At this time, refer to Figure 6B In response to the above operation, the target electronic device can display the user interface 23 of the note application in full screen horizontally.

[0072] refer to Figure 6C , in the scenario where the desktop 20 is displayed in landscape mode, the target electronic device can detect the user operation on the chat application icon. Among them, the chat application corresponding to the chat application icon is only configured with vertical layout resources, but not with horizontal layout resources, that is, the chat application does not support horizontal full screen display. At the same time, the chat application supports floating window display. At this time, refer to Fig.6D In response to the above operation, the target electronic device may display a vertical floating window 24 on the desktop 20 , and display a chat list interface 21 of the chat application in the vertical floating window 24 .

[0073] It can be understood that in other interfaces such as the negative one screen and the application center, the target electronic device can also detect user operations acting on a certain application icon. In response to the above operations, when the target application corresponding to the above application icon does not support horizontal full-screen display but supports floating window display, the target electronic device can display a floating window in the above-mentioned other interfaces, and display the user interface of the target application adapted to vertical screen display in the above-mentioned floating window.

[0074] When the user interface of a certain application is displayed in full screen in landscape mode, the target electronic device may also obtain the dock bar through touch operation, and then obtain one or more application icons. Then, the target electronic device may also detect the user operation acting on a certain application icon in the dock bar, and in response to the above operation, when the target application corresponding to the above application icon does not support full screen display in landscape mode but supports floating window display, the target electronic device may display a floating window in the above other interface, and display the user interface of the target application adapted to vertical display in the above floating window.

[0075] In this way, when users browse applications that do not support horizontal full-screen display through a floating window, they can also operate the negative first screen, application center, and controls in the application interface, further meeting users' browsing and interaction needs and improving screen utilization.

[0076] refer to Figure 4 When the chat application does not support horizontal full-screen display and does not support floating window display, the target electronic device can display the chat list interface 21 of the chat application in vertical full-screen display, which will not be repeated here.

[0077] In order to improve the slow loading experience during cold start, some applications will set a startup interface. During cold start, the target electronic device will first play the above startup interface. After the application homepage is rendered, the target electronic device can display the application homepage, such as the chat list interface 21. In this way, through the startup interface, the user can easily ignore the startup loading process, thereby ignoring the waiting time, improving the bad experience of long cold start loading waiting time.

[0078] Preferably, in some embodiments, the style of the startup interface corresponds to the layout resources configured by the application. That is, when the application is configured with a vertical screen layout resource, the application is correspondingly configured with a startup interface of the same size as the vertical screen layout resource; when the application is configured with a horizontal screen layout resource, the application is correspondingly configured with a startup interface of the same size as the horizontal screen layout resource.

[0079] In this way, when the target application is started in portrait mode, the target electronic device can display the startup interface in full portrait mode, and then display the main page and other interfaces of the target application in full portrait mode; when the target application is started in landscape mode, the target electronic device can display the startup interface in full landscape mode, and then display the main page and other interfaces of the target application in full landscape mode.

[0080] However, in some applications, the style of the startup interface can also be set to support both landscape and portrait modes independently, regardless of whether other interfaces of the application support both landscape and portrait modes. In this case, in landscape mode, the target electronic device can display the startup interface in landscape full screen regardless of whether the application supports landscape full screen display of other interfaces of the target application.

[0081] The system usually determines whether an application supports horizontal / vertical display based on the display status of the first interface of the application.

[0082] When the style of the startup interface corresponds one-to-one to the layout resources configured by the application, after obtaining the layout resources of the startup interface matching the current screen state, the target electronic device can keep displaying the startup interface and other interfaces of the target application in the same state.

[0083] For example, in the landscape state, after obtaining the layout resources of the startup interface that matches the landscape screen, the target electronic device can continue to obtain the landscape layout resources of other interfaces, and then display the startup interface and other interfaces of the target application in full landscape mode; when the layout resources of the startup interface that matches the landscape screen are not obtained, the target electronic device can determine that the startup interface and other interfaces of the target application do not support full landscape mode, so the target electronic device can display a vertical floating window to display the startup interface and other interfaces of the target application in the vertical floating window, or switch to the vertical screen to display the startup interface and other interfaces of the target application in the vertical screen.

[0084] However, when the style of the startup interface does not correspond one-to-one to the layout resources configured by the application, after displaying the startup interface in full-screen landscape, the target electronic device needs to continue to obtain the display status of the second interface of the target application, and determine whether the target application supports landscape / portrait display based on the display status of the second interface.

[0085] In view of this, further, an embodiment of the present application provides another application startup display method.

[0086] Figure 7 This is a flowchart of another application startup display method provided in an embodiment of the present application.

[0087] S701: Start the target application.

[0088] S702: Get screen status.

[0089] S703: Get a startup interface.

[0090] When in landscape mode, the target electronic device can obtain the layout resources of the startup interface that matches the landscape mode, and then draw a startup interface that is suitable for landscape full-screen display. Of course, the application may not be configured with the layout resources of the startup interface that matches the landscape mode, but only with the layout resources of the startup interface that matches the portrait mode. At this time, the target electronic device draws the startup interface that is suitable for vertical floating window and portrait display according to the layout resources of the startup interface that matches the portrait mode.

[0091] S704. Is the startup interface suitable for horizontal full-screen display?

[0092] S705. Set the window mode to full screen, and display the startup page in full horizontal screen.

[0093] When the startup interface is adapted to full-screen display in landscape mode, the target electronic device may set the window mode to full-screen. Thus, the target electronic device may generate a full-screen window. Then, in landscape mode, the target electronic device may display the startup interface in the full-screen window, i.e., display the startup page in landscape full-screen mode for the user to browse.

[0094] S706. Is the startup interface suitable for floating window display?

[0095] S707: Set the window mode to a floating window, and display the startup page through the floating window.

[0096] When the startup interface supports floating window display, the target electronic device can set the window mode to a floating window. Thus, the target electronic device can generate a vertical floating window. Then, the target electronic device can display the startup interface in the vertical floating window, that is, display the startup page through the floating window for the user to browse.

[0097] S708: Set the window mode to full screen, and display the user interface of the target application in full vertical screen.

[0098] When the target application does not support floating window display, the target electronic device can set the window mode to full screen. Then, the target electronic device can generate a full screen window. The target electronic device can draw the first user interface of the target application according to the vertical screen layout resources and the vertical screen aspect ratio, switch to the vertical screen state, and then display the above user interface in the vertical screen full screen window, that is, display the above user interface in the vertical screen full screen for the user to browse.

[0099] S709, obtain the next interface.

[0100] The next interface of the startup interface is usually the main interface of the target application, such as the chat list interface 21 of the chat application.

[0101] Similarly, in landscape mode, the target electronic device will first obtain the layout resources of the main interface that matches the landscape mode (landscape layout resources) and draw the main interface that is suitable for landscape full-screen display. When the application does not configure the landscape layout resources of the main interface, the target electronic device will obtain the portrait layout resources of the main interface and then draw the main interface that is suitable for vertical floating window and / or portrait display according to the portrait layout resources.

[0102] In some embodiments, the next interface of the launch interface may also be the interface where the user last exited the target application.

[0103] S710. Is the next interface (e.g., the main interface) suitable for horizontal full-screen display?

[0104] S711. Set the window mode to full screen, and display the next interface of the startup page in full horizontal screen.

[0105] When the next interface of the startup interface is adapted to full-screen display in landscape mode, the target electronic device may set the window mode to full-screen. The target electronic device may generate a full-screen window. Then, in landscape mode, the target electronic device may display the next interface of the startup interface in the full-screen window, i.e., display the next interface of the startup page in landscape full-screen. The next interface of the startup page is, for example, the main interface of the target application.

[0106] S712: Set the window mode to a floating window, and display the next interface of the startup page through the floating window.

[0107] Unlike the startup interface, the main interface and other interfaces of the target application include complex elements. Therefore, in the embodiment of the present application, the interface adapted to the vertical screen display is drawn according to the vertical screen layout resources, which is not necessarily adapted to the vertical floating window display at the same time. The application package can carry a floating window mark, such as a resize attribute, indicating whether the application is adapted to the vertical floating window display.

[0108] Therefore, when the next interface of the startup interface is not suitable for horizontal full-screen display, the target electronic device continues to confirm whether the above interface is suitable for vertical floating window display. When the above interface is suitable for vertical floating window display, the target electronic device can set the window mode to floating window. Then, the target electronic device can generate a vertical floating window and display the above interface in the vertical floating window.

[0109] S713. Set the window mode to full screen, and display the next interface of the startup page in full vertical screen.

[0110] When the next interface of the startup interface is not suitable for vertical floating window display, the target electronic device can set the window mode to full screen and switch to the vertical screen state. The target electronic device can generate a full screen window and then display the above user interface in the full screen window of the vertical screen, that is, display the above user interface in the vertical full screen.

[0111] Figure 8A-8C This is a set of user interface schematic diagrams provided in an embodiment of the present application.

[0112] refer to Fig. 8A In the scenario of displaying the desktop 20 (first interface) in horizontal screen, the target electronic device can detect the user operation (first operation) acting on the chat application icon. The chat application (first application) corresponding to the chat application icon is configured with layout resources of the startup interface adapted to horizontal full screen display and layout resources of the startup interface adapted to vertical full screen display. The main interface and other interfaces of the chat application are only configured with vertical layout resources, but not with horizontal layout resources, that is, other interfaces support vertical display and floating window display, but do not support horizontal full screen display.

[0113] At this time, refer to Figure 8B In response to the above operation, the target electronic device may first display the chat application startup interface 25 in full screen horizontally. Then, refer to Figure 8C , based on the main interface and other interfaces of the chat application are only configured with vertical screen layout resources, supporting vertical screen display and floating window display, the target electronic device can display a vertical floating window 26 (first floating window), and display the chat list interface 21 (main interface) of the chat application in the vertical floating window 26. Figure 8C The interface shown may be referred to as a second interface.

[0114] Preferably, after switching to the floating window display, the target electronic device can continue to display the desktop 20 under the vertical floating window 26. In this way, the user can continue to open other applications and browse the chat application and other applications at the same time, thereby improving the user's browsing efficiency and browsing experience.

[0115] Figure 9A-9C This is a set of user interface schematic diagrams provided in an embodiment of the present application.

[0116] Assume that the note application is configured with layout resources for the startup interface that adapts to horizontal full-screen display, and layout resources for the startup interface that adapts to vertical full-screen display. The main interface and other interfaces of the note application are only configured with vertical layout resources, but not horizontal layout resources. That is, other interfaces support vertical display, but do not support floating window display and horizontal full-screen display.

[0117] At this time, refer to Fig.9A , Fig. 9B and Fig. 9C In the scenario of displaying the desktop 20 in landscape mode, after detecting a user operation on the note application icon, the target electronic device may first display the startup interface 25 of the note application in landscape mode in full screen. Then, based on the fact that the main interface and other interfaces of the note application are only configured with vertical layout resources and only support vertical display, the target electronic device may display the chat list interface 21 of the chat application in portrait mode.

[0118] The target electronic device may adopt a system architecture design such as a layered architecture, an event-driven architecture, a micro-core architecture, etc. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the target electronic device.

[0119] The Android system includes, from top to bottom, the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0120] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer, such as the Activity Manager Service (AMS) and the Window Manager Service (WMS).

[0121] Fig.10 It is a software structure timing diagram provided in an embodiment of the present application.

[0122] In the embodiment of the present application, after detecting a user operation of starting a target application, the target electronic device may load an executable program (APP) of the target application into a processor for execution.

[0123] During operation, the APP can call the method provided by AMS (such as StartActivity) to create an activity stack, then create the first activity (Activity1), and push Activity1 into the activity stack. In the target application for setting the startup interface, Activity1 created by the APP corresponds to the above startup interface.

[0124] Then, the AMS can determine the window mode corresponding to Activity1. When the startup interface is suitable for horizontal full-screen display, the target electronic device can set the window mode to full-screen and display the startup interface corresponding to Activity1 in horizontal full-screen display; when the startup interface does not support horizontal full-screen display, the target electronic device can set the window mode to a floating window, generate a vertical floating window, and display the startup interface corresponding to Activity1 in the vertical floating window.

[0125] Then, AMS can create a second activity (Activity2) and push Activity2 into the activity stack. Generally, the next interface of the startup interface is the main interface. Therefore, in some specific implementations, Activity2 corresponds to the main interface.

[0126] Then, AMS can determine the window mode corresponding to Activity2. When the main interface is adapted to full-screen display in landscape mode, the target electronic device can set the window mode to full-screen and display the main interface corresponding to Activity2 in landscape mode; when the main interface does not support full-screen display in landscape mode, the target electronic device can set the window mode to floating window, generate a vertical floating window, and display the main interface corresponding to Activity2 in the vertical floating window; or, when the main interface does not support full-screen display in landscape mode and does not support floating window display, the target electronic device can set the window mode to full-screen and display the main interface corresponding to Activity2 in portrait mode.

[0127] In one implementation, the AMS may determine and modify the window mode corresponding to the activity in the following manner (pseudo code):

[0128] If (activity stack = 1 && the interface in the stack is the splash interface (splash_activity)) {

[0129] Set application window mode = full screen;

[0130] Modify application bounds = full screen bounds} / / that is, display the startup interface in full screen horizontally or vertically.

[0131] If (activity stack>1&&the bottom interface of the stack is the startup interface) {

[0132] If (current screen state = landscape && window mode = full screen && contains resize attribute (i.e. supports floating window) && current interface = portrait (isPortrait)) {

[0133] Play switching animation;

[0134] Set application window mode = floating window;

[0135] Modify application bounds = floating window bounds} / / That is, when the current interface is not suitable for horizontal full-screen display, switch to the floating window, and display the application interface that adapts to vertical screen display through the floating window in horizontal state.

[0136] }

[0137] In another implementation, the AMS may determine and modify the window mode corresponding to the activity in the following manner (pseudo code):

[0138] If ((activity stack = 1 && the interface in the stack is the startup interface) || horizontal screen mark = 0) {

[0139] If (current screen state = landscape && window mode = full screen && contains resize attribute && current interface = portrait (isPortrait)) {

[0140] Set application window mode = floating window;

[0141] Horizontal screen flag = 1}

[0142] If (current interface = horizontal screen) {

[0143] Horizontal screen flag = 0}

[0144] }

[0145] Among them, the initial horizontal screen flag bit can be set according to the target application. When the target application is configured with horizontal screen layout resources and can support horizontal screen display, the horizontal screen flag bit of the target application can be set to 1. In this way, the target electronic device does not need to consider that the target application does not support horizontal full screen display, and then does not need to switch the window mode to a floating window. The user interface of the target application is displayed in a partial horizontal screen through the floating window, which is conducive to improving code utilization and saving signaling expenses.

[0146] Fig.11 This is an AMS timing diagram provided in an embodiment of the present application.

[0147] AMS includes ActivityStarter module, HwActivityStarter module, ActivityOptions module, Task module and TaskFragment module.

[0148] After detecting the StartActivity operation of the APP, the ActivityStarter module can execute the StartActivityInner operation to start the Activity, such as Activity 1. If the Activity that has already been started is started, it will definitely add the Activity to the top of the stack, or pass the new intent to the Activity that is already at the top of the stack.

[0149] Then, the ActivityStarter module can call HwActivityStarter to determine whether to set the floating window display. The specific method of determining whether to set the floating window display is shown in the above pseudo code.

[0150] After determining to set the floating window display, HwActivityStarter can send a window setting instruction (SetLaunchWindowingMode) to the ActivityOptions module to set the window mode to a floating window. Accordingly, the Task module can change the configuration information (OnConfigurationChanged) according to the new window mode, modify the bounds, and the TaskFragment module can parse the overlay configuration information (ResolveOverrideConfiguration). Then, the target electronic device can display the user interface of the target application through a floating window. If the conditions for the floating window display are not met, HwActivityStarter can send other window setting instructions to the ActivityOptions module, set the window mode to full screen, and then display the user interface of the target application in full screen horizontally or vertically.

[0151] By analogy, the ActivityStarter module can start the next Activity, such as Activity2. Similarly, the ActivityStarter module can call HwActivityStarter to determine whether to set the floating window display. If so, send a window setting instruction to the ActivityOptions module, set the window mode to a floating window, and display the user interface of the target application through the floating window, and update and overwrite the configuration information accordingly; if so, send a window setting instruction to the ActivityOptions module, set the window mode to full screen, and display the user interface of the target application in horizontal full screen or vertical full screen.

[0152] Fig.12 1 is a schematic diagram of a target electronic device provided in an embodiment of the present application. Specifically, the target electronic device is, for example, a tablet computer, a foldable screen mobile phone or other electronic device as exemplified in the above embodiments.

[0153] The target electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0154] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the target electronic device. In other embodiments of the present application, the target electronic device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0155] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0156] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0157] Exemplarily, the processor 110 can be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through the I2C bus interface. The processor 110 can be coupled to the audio module 170 through the I2S bus interface to realize the communication between the processor 110 and the audio module 170. The audio module 170 can transmit the audio signal to the wireless communication module 160 through the PCM interface to realize the function of answering the call through the Bluetooth headset. The processor 110 can communicate with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. The audio module 170 can transmit the audio signal to the wireless communication module 160 through the UART interface to realize the function of playing music through the Bluetooth headset. The MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices. The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), etc. The processor 110 and the camera 193 can communicate through the CSI interface to realize the shooting function of the target electronic device. The processor 110 and the display screen 194 can communicate through the DSI interface to realize the display function of the target electronic device. The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc. The USB interface 130 can be used to connect a charger to charge the target electronic device, and can also be used to transmit data between the target electronic device and peripheral devices. It can also be used to connect headphones and play audio through headphones. The interface can also be used to connect other target electronic devices, such as AR devices, etc.

[0158] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the target electronic device. In other embodiments of the present application, the target electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0159] The charging management module 140 is used to receive charging input from the charger. While the charging management module 140 is charging the battery 142, it can also power the target electronic device through the power management module 141. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and powers the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.

[0160] The wireless communication function of the target electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0161] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to target electronic devices. Wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied to target electronic devices.

[0162] In some embodiments, the antenna 1 of the target electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the target electronic device can provide other wireless communication technologies. The other wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS), etc.

[0163] In an embodiment of the present application, through the wireless communication function provided by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, the application on the target electronic device can access the Internet, perform uplink and downlink data transmission, and then display text, images and audio resources to the user for the user to browse and use.

[0164] The target electronic device implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor, and is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0165] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microled, micro-oled, a quantum dot light emitting diode (QLED), etc. In some embodiments, the target electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0166] In the embodiment of the present application, the target electronic device can display the display function provided by the GPU, the display screen 194, and the application processor. Figure 6A-6D , Figure 8A-8C , Figure 9A-9C The user interface shown.

[0167] The target electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0168] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0169] RAM may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally called DDR5 SDRAM), etc. NVM may include disk storage devices and flash memory.

[0170] RAM can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc. NVM can also store executable programs and store user and application data, etc., and can be loaded into RAM in advance for direct reading and writing by the processor 110.

[0171] In the embodiment of the present application, the executable program code of the application startup display method can be stored in NVM. After the target electronic device is powered on, the target electronic device can load the above executable program code stored in NVM into RAM, so that the target electronic device can provide the user with Figure 5 and / or Figure 7 The application shown starts the display function.

[0172] The external memory interface 120 may be used to connect to an external NVM to expand the storage capacity of the target electronic device.

[0173] The target electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0174] The key 190 includes a power button, a volume button, etc. The key 190 may be a mechanical key. It may also be a touch key. The target electronic device may receive key input through the key 190 and generate key signal input related to user settings and function control of the target electronic device. The motor 191 may generate a vibration prompt. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or may be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.

[0175] The term "user interface (UI)" in the specification, claims and drawings of this application refers to the medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface of an application is source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on the terminal device, and finally presented as content that the user can recognize, such as pictures, text, buttons and other controls. A control, also called a widget, is a basic element of a user interface. Typical controls include a toolbar, menu bar, text box, button, scrollbar, picture and text. The properties and contents of controls in the interface are defined by tags or nodes, such as XML through <textview> 、 <imgview> 、 <videoview>The controls contained in the interface are specified by nodes such as HTML, CSS, and JavaScript. A node corresponds to a control or attribute in the interface. After parsing and rendering, the node is presented as user-visible content. In addition, many applications, such as hybrid applications, usually also contain web pages in their interfaces. A web page, also known as a page, can be understood as a special control embedded in the application interface. A web page is source code written in a specific computer language, such as hypertext markup language (HTML), cascading style sheets (CSS), JavaScript (JS), etc. The web page source code can be loaded and displayed as user-recognizable content by a browser or a web page display component with similar functions to a browser. The specific content contained in a web page is also defined by tags or nodes in the web page source code. For example, HTML is defined by 、 、 <video> 、 <canvas>To define the elements and attributes of a web page.

[0176] The most common form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operation that is displayed in a graphical manner. It can be an icon, window, control or other interface element displayed on the display screen of an electronic device, where a control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements.

[0177] As used in the specification and appended claims of the present application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more of the listed items. As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrase "when determining..." or "if (stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "when (stated condition or event) is detected" or "in response to detecting (stated condition or event)", depending on the context.

[0178] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in 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 a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0179] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.< / canvas> < / video> < / videoview> < / imgview> < / textview>

Claims

1. An application startup display method, applied to an electronic device, characterized in that: The method comprises: In a scenario where the first interface is displayed in landscape mode, after a first operation of starting a first application is detected, a startup interface of the first application is displayed in full landscape mode; After displaying the startup interface of the first application in full-screen horizontal mode, displaying a second interface when the main interface of the first application does not support full-screen horizontal mode, the second interface includes the first interface and a first floating window, the first floating window is a vertical window that matches the full-screen vertical mode of the electronic device, and the main interface of the first application is displayed in the first floating window; Close the first application and display the first interface in portrait mode; In the scenario where the first interface is displayed in portrait mode, after a second operation of starting the first application is detected, a startup interface of the first application is displayed in full portrait mode, and a main interface of the first application is displayed in full portrait mode.

2. The method according to claim 1, characterized in that The method further comprises: In the scenario where the first interface is displayed in landscape mode, after detecting the third operation of opening the second application, if both the startup interface and the main interface of the second application support landscape full-screen display, the startup interface and the main interface of the second application are displayed in landscape full-screen.

3. The method according to claim 1 or 2, characterized in that: After the startup interface of the first application is displayed in full screen in landscape orientation, the method further includes: When the main interface of the first application does not support floating window display, the main interface is displayed in full screen in portrait mode.

4. The method according to claim 1, characterized in that: After detecting a first operation of starting the first application, the method further includes: In the case where the startup interface does not support horizontal screen display but supports floating window display, displaying a second floating window on the first interface, wherein the startup interface of the first application is displayed in the second floating window, and the main interface of the first application continues to be displayed in the second floating window; When the startup interface does not support horizontal screen display and does not support floating window display, the startup interface and main interface of the first application are displayed in full vertical screen.

5. The method according to claim 1, characterized in that The aspect ratio of the first floating window is the same as the aspect ratio of the screen of the electronic device in the vertical screen state.

6. The method according to claim 1, characterized in that The electronic device includes an activity manager AMS and a window manager WMS, and the horizontal full-screen display of the startup interface of the first application specifically includes: When the first condition is met, the AMS sends a first indication message to the WMS, sets the window mode to full screen, and displays the startup interface of the first application in full screen horizontally; The first condition includes: the number of activities in the activity stack is 1 and the activity corresponds to the startup interface, and the startup interface is a horizontal screen interface.

7. The method according to claim 6, characterized in that The displaying of the second interface specifically includes: When the second condition is met, the AMS sends a second instruction message to the WMS, sets the window mode to a floating window, and displays the second interface; The second condition includes: the number of activities in the activity stack is greater than 1, the current screen state is horizontal, the current window mode is full screen, and the main interface is a vertical interface.

8. The method according to claim 1, characterized in that The electronic device includes an activity manager AMS and a window manager WMS, the horizontal screen flag of the first application is a first value, and the displaying of the second interface specifically includes: When the third condition is met, determining whether the fourth condition is met; The third condition includes: the number of activities in the activity stack is 1 and the activity corresponds to the startup interface, or the horizontal screen flag bit of the application is the first value; When the fourth condition is met, the AMS sends a third instruction message to the WMS, sets the window mode to a floating window, and displays the second interface; The fourth condition includes: the current screen state is horizontal, the current window mode is full screen, and the main interface is a vertical screen interface.

9. The method according to claim 8, characterized in that After the AMS sends the third indication information to the WMS, the method further includes: updating the horizontal screen mark bit of the first application to a second value.

10. An electronic device, characterized in that: The method comprises one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program, and when the one or more processors execute the computer program, the method according to any one of claims 1 to 9 is executed.

11. A computer program product comprising instructions, characterized in that When the computer program product runs on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 9.

12. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 9.