Page display method and device, storage medium and program product
By obtaining posture information and preset display direction in the terminal device, judging and matching the display direction, the page rotation problem between horizontal and vertical screens is solved, and the user experience and the stability of application startup are improved.
Patent Information
- Application Number
- CN202410502375.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-24
AI Technical Summary
In terminal devices, page rotation between landscape and portrait modes leads to a poor user experience, especially during the screen rotation process when determining the device type.
When the terminal device receives the start command, it obtains the current posture information and the preset display direction, and determines whether the two match. If they do not match, it stops responding to the preset display request and determines the target display direction based on the posture information to avoid page rotation.
By avoiding page rotation, the user experience is improved and the stability and consistency of the terminal device when launching the application are ensured.
Smart Images

Figure CN120832191A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of electronic information, and particularly relates to a page display method and device, a storage medium and a program product. BACKGROUND
[0002] At present, many applications do not allow landscape use on some terminal devices (such as mobile phone devices), but hope to allow landscape use on other terminal devices (such as PAD (English: Portable Android Device, Chinese: tablet computer)). In order to take into account all terminal devices, many applications are adapted on the original logic, and a landscape start is adopted, and then in the start process, it is judged according to the device type whether to continue portrait or to follow the device direction and then to be converted to landscape, so that there is a picture rotation process when starting on some terminal devices, which affects the user experience. SUMMARY
[0003] In order to overcome the problems in the related art, the present disclosure provides a page display method and device, a storage medium and a program product.
[0004] According to a first aspect of an embodiment of the present disclosure, a page display method is provided, applied to a terminal device, comprising:
[0005] In response to receiving a start instruction of a target application in the terminal device, obtaining current pose information of the terminal device and a preset display direction of a start page of the target application;
[0006] generating a first display request according to the preset display direction, the first display request being used to request the terminal device to display the start page of the target application according to the preset display direction;
[0007] stopping responding to the first display request in a case where the pose information does not match the preset display direction, and determining a target display direction of the start page according to the pose information;
[0008] displaying the start page of the target application according to the target display direction.
[0009] Optionally, the method further comprises:
[0010] responding to the first display request to display the start page according to the preset display direction in a case where the pose information matches the preset display direction.
[0011] Optionally, the stopping of responding to the first display request in the case where the pose information does not match the preset display direction comprises:
[0012] In a case where the pose information does not match the preset display direction, first component information of a target component of the target application is obtained from a preset database;
[0013] In a case where the first component information exists in the preset database, the first display request is stopped from being responded to.
[0014] Optionally, the method further includes:
[0015] In a case where the first component information does not exist in the preset database, second component information of the target component is obtained;
[0016] The second component information is stored to the preset database.
[0017] Optionally, the method further includes:
[0018] In a case where the first component information does not exist in the preset database, the first display request is responded to, so that the start page is displayed in the preset display direction;
[0019] A second display request is generated according to the pose information or a device type of the terminal device, the second display request being used to request the terminal device to display a start page of the target application in a specified display direction;
[0020] The start page of the target application is displayed in the specified display direction.
[0021] Optionally, the obtaining, in a case where the first component information does not exist in the preset database, of the second component information of the target component includes:
[0022] In a case where the first component information does not exist in the preset database and the target application satisfies a preset storage condition, the second component information is obtained; the preset storage condition includes that display directions requested by the first display request and the second display request are different.
[0023] Optionally, the component information includes at least one of a name of the target application, a name of the target component, and the preset display direction.
[0024] According to a second aspect of the embodiments of the present disclosure, a page display apparatus applied to a terminal device includes:
[0025] A first obtaining module is configured to, in response to receiving a start instruction of a target application in the terminal device, obtain current pose information of the terminal device and a preset display direction of a start page of the target application;
[0026] The generating module is configured to generate a first display request according to the preset display direction, the first display request being used to request the terminal device to display a start page of the target application according to the preset display direction;
[0027] The determining module is configured to, in a case where the pose information does not match the preset display direction, stop responding to the first display request, and determine a target display direction of the start page according to the pose information;
[0028] The first display module is configured to display the start page of the target application according to the target display direction.
[0029] Optionally, the apparatus further comprises:
[0030] The second display module is configured to, in a case where the pose information matches the preset display direction, respond to the first display request to display the start page according to the preset display direction.
[0031] Optionally, the determining module is configured to:
[0032] In a case where the pose information does not match the preset display direction, acquire first component information of a target component of the target application from a preset database;
[0033] In a case where the first component information exists in the preset database, stop responding to the first display request.
[0034] Optionally, the apparatus further comprises:
[0035] The second acquisition module is configured to, in a case where the first component information does not exist in the preset database, acquire second component information of the target component;
[0036] The storage module is configured to store the second component information to the preset database.
[0037] Optionally, the apparatus further comprises:
[0038] The third display module is configured to, in a case where the first component information does not exist in the preset database, respond to the first display request to display the start page according to the preset display direction;
[0039] The second generating module is configured to generate a second display request according to the pose information or a device type of the terminal device, the second display request being used to request the terminal device to display a start page of the target application according to a specified display direction;
[0040] A fourth display module configured to display the start page of the target application according to the specified display direction.
[0041] Optionally, the second obtaining module is configured to:
[0042] obtain the second component information in a case where the first component information does not exist in the preset database and the target application satisfies a preset storage condition; and the preset storage condition comprises that the display direction requested by the first display request is different from the display direction requested by the second display request.
[0043] Optionally, the component information comprises at least one of a name of the target application, a name of the target component, and the preset display direction.
[0044] According to a third aspect of an embodiment of the present disclosure, a page display apparatus is provided, comprising:
[0045] a processor;
[0046] a memory for storing processor-executable instructions;
[0047] wherein the processor is configured to:
[0048] obtain current pose information of the terminal device and a preset display direction of a start page of a target application in the terminal device in response to receiving a start instruction of the target application;
[0049] generate a first display request according to the preset display direction, the first display request being used to request the terminal device to display the start page of the target application according to the preset display direction;
[0050] stop responding to the first display request in a case where the pose information does not match the preset display direction, and determine a target display direction of the start page according to the pose information;
[0051] display the start page of the target application according to the target display direction.
[0052] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method according to the first aspect of the present disclosure.
[0053] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, and the computer program is executed by a processor to implement the steps of the method according to the first aspect of the present disclosure.
[0054] Embodiments of the present disclosure provide technical solutions that can include the following beneficial effects: In the case that the present disclosure receives a starting instruction of a target application in a terminal device, the current pose information of the terminal device and a preset display direction of a starting page of the target application are obtained, and a first display request is generated according to the preset display direction. In the case that the pose information does not match the preset display direction, the first display request is stopped from being responded, and a target display direction of the starting page is determined according to the pose information, and then the starting page of the target application is displayed according to the target display direction. In the case that the current pose information of the terminal device does not match the preset display direction of the starting page of the target application, the first display request for requesting the terminal device to display the starting page according to the preset display direction is stopped from being responded, and the starting page is displayed according to the target display direction corresponding to the pose information, which can avoid the problem that the starting page is rotated in the process of starting the target application in the terminal device, and improve the user experience.
[0055] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the description.
[0057] Figure 1 is a display schematic diagram of a starting page in related technologies.
[0058] Figure 2 is a flowchart of a method for displaying a page according to an exemplary embodiment.
[0059] Figure 3 is a flowchart of another method for displaying a page according to an exemplary embodiment.
[0060] Figure 4 is a flowchart of another method for displaying a page according to an exemplary embodiment.
[0061] Figure 5 is a flowchart of another method for displaying a page according to an exemplary embodiment.
[0062] Figure 6 is a flowchart of another method for displaying a page according to an exemplary embodiment.
[0063] Figure 7 is a system-side execution logic diagram of a terminal device according to an exemplary embodiment.
[0064] Figure 8is a flowchart of an identification flow according to an exemplary embodiment.
[0065] Figure 9 is a block diagram of an apparatus of a page display according to an exemplary embodiment.
[0066] Figure 10 is a block diagram of an apparatus of another page display according to an exemplary embodiment.
[0067] Figure 11 is a block diagram of an apparatus of another page display according to an exemplary embodiment.
[0068] Figure 12 is a block diagram of an apparatus of another page display according to an exemplary embodiment.
[0069] Figure 13 is a block diagram of an apparatus of another page display according to an exemplary embodiment. DETAILED DESCRIPTION
[0070] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals refer to like elements, unless the context of use indicates otherwise. The following description of exemplary embodiments is not representative of all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0071] The following description of some embodiments of the present disclosure is not representative of all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0072] Before introducing a page display method, apparatus, storage medium and program product according to an embodiment of the present disclosure, the application scenario of the embodiment of the present disclosure is introduced first.
[0073] At present, an application on a terminal device statically declares the start direction of an Activity of the application as a portrait screen in a Manifest file. When the start of the Activity of the application reaches an onCreate() stage, the device type of the terminal device is judged. If the terminal device is a large-screen device, the screen direction strategy of the Activity is dynamically modified, and the application window is allowed to rotate to a landscape screen. As shown in Figure 1 The above scheme can cause the application to be displayed in a portrait screen direction first when the Activity of the large-screen device is started in a landscape screen, and then rotated to a landscape screen state after related logic is executed, which greatly affects the user experience.
[0074] In the case that the current pose information of the terminal device does not match the preset display direction of the start page of the target application, the terminal device stops responding to the first display request of displaying the start page according to the preset display direction, and displays the start page according to the target display direction corresponding to the pose information, so that the problem of rotation of the start page in the process of starting the target application is avoided, and the user experience is improved.
[0075] The terminal device in the embodiments of the present disclosure can be a mobile terminal such as a smartphone, a tablet computer, a smart television, a smart watch, a PDA (Personal Digital Assistant), a portable computer, and the like. The terminal device can also be a smart home device such as a sweeping robot, an air purifier, an air conditioner, a lighting lamp, a sound box, a robot, and the like. The terminal device can access any one of NB-IOT, EMTC, MMTC, and the like, or can access a Wi-Fi (Wireless Fidelity), Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, 5G, and the like. The present disclosure does not limit this.
[0076] Figure 2 is a flowchart of a method of displaying a page according to an example embodiment, as shown in Figure 2 The method can be applied in a terminal device and can include the following steps.
[0077] In step S101, in response to receiving a start instruction of a target application in a terminal device, current pose information of the terminal device and a preset display direction of a start page of the target application are obtained.
[0078] For example, a user can trigger a start instruction by clicking an icon of a target application, so as to start the target application. The target application starts one or more target components, for example, an Activity, in the process of starting. In the case that the terminal device receives the start instruction, the terminal device can obtain current pose information of the terminal device, wherein the pose information can be used to represent whether the terminal device is currently placed horizontally or vertically, and the pose information can be measured by a gyroscope, a gravity sensor, and the like. The terminal device can also obtain a preset display direction of a start page of the target application, wherein the preset display direction can be a display direction of an Activity corresponding to the start page declared statically in a Manifest file, and the preset display direction can be a horizontal direction or a vertical direction.
[0079] In step S102, a first display request is generated according to the preset display direction, and the first display request is used to request the terminal device to display the start page of the target application according to the preset display direction.
[0080] For example, the target application can generate the first display request through the preset display direction during the start process, and send the first display request to the operating system of the terminal device to request the terminal device to display the start page of the target application according to the preset display direction. In the case where the preset display direction is a horizontal screen direction, the first display request is used to request the terminal device to display the start page of the target application in a horizontal screen mode; in the case where the preset display direction is a vertical screen, the first display request is used to request the terminal device to display the start page of the target application in a vertical screen mode.
[0081] In step S103, in the case where the pose information does not match the preset display direction, the first display request is stopped, and the target display direction of the start page is determined according to the pose information.
[0082] In step S104, the start page of the target application is displayed according to the target display direction.
[0083] For example, it can be judged whether the pose information of the terminal device matches the preset display direction, wherein the case where the pose information matches the preset display direction can include: 1) the pose information represents that the terminal device is placed in a horizontal screen mode, and the preset display direction is a horizontal screen direction; 2) the pose information represents that the terminal device is placed in a vertical screen mode, and the preset display direction is a vertical screen direction. The case where the pose information does not match the preset display direction can include: 1) the pose information represents that the terminal device is placed in a horizontal screen mode, and the preset display direction is a vertical screen direction; 2) the pose information represents that the terminal device is placed in a vertical screen mode, and the preset display direction is a horizontal screen direction.
[0084] In a case where the pose information does not match the preset display direction, if the first display request is responded to, the terminal device can first display the start page according to the preset display direction, and then display the start page according to the display direction corresponding to the pose information of the terminal device, which can cause a page rotation problem in the start process. Therefore, the first display request can be intercepted to stop responding to the first display request, and the target display direction of the start page can be determined according to the pose information of the terminal device. The target display direction can match the pose information, for example, in a case where the pose information indicates that the terminal device is placed in a horizontal screen mode, the target display direction can be determined as a horizontal screen direction; and in a case where the pose information indicates that the terminal device is placed in a vertical screen mode, the target display direction can be determined as a vertical screen direction. In this way, in a case where the pose information of the terminal device does not match the preset display direction, by stopping responding to the first display request and displaying the start page of the target application according to the target display direction, the problem of rotation of the start page in the process of starting the target application can be avoided, and the user experience is improved.
[0085] In summary, in a case where a start instruction of a target application in a terminal device is received, the pose information of the terminal device and a preset display direction of a start page of the target application are obtained, and a first display request is generated according to the preset display direction. In a case where the pose information does not match the preset display direction, the first display request is stopped from being responded to, and a target display direction of the start page is determined according to the pose information, and then the start page of the target application is displayed according to the target display direction. In a case where the pose information of the terminal device does not match the preset display direction of the start page of the target application, the first display request for requesting the terminal device to display the start page according to the preset display direction is stopped from being responded to, and the start page is displayed according to the target display direction corresponding to the pose information, which can avoid the problem of rotation of the start page in the process of starting the target application, and improves the user experience.
[0086] Figure 3 is a flowchart of another method of page display according to an example embodiment, as shown in Figure 3 The method can further include:
[0087] In step S105, in a case where the pose information matches the preset display direction, the first display request is responded to to display the start page according to the preset display direction.
[0088] For example, if the pose information matches the preset display direction, for example, the pose information indicates that the terminal device is placed horizontally, and the preset display direction is a horizontal direction, or the pose information indicates that the terminal device is placed vertically, and the preset display direction is a vertical direction, it indicates that the starting process will always be started according to the preset display direction, and there will be no page rotation problem, and the first display request can be responded to, so that the starting page is displayed according to the preset display direction.
[0089] Figure 4 FIG. 10 is a flowchart illustrating another method of page display according to an example embodiment. Figure 4 As shown in FIG. 10, step S103 can be implemented by the following steps:
[0090] In step S1031, in a case where the pose information does not match the preset display direction, first component information of a target component of a target application is obtained from a preset database.
[0091] In step S1032, in a case where the preset database has the first component information, the first display request is stopped from being responded to.
[0092] For example, in a case where the pose information does not match the preset display direction, first component information of a target component of a target application can be further searched from a preset database, where the target component can be an Activity corresponding to a starting page. If the preset database has the first component information, where the first component information can include at least one of a name of the target application, a name of the target component, and the preset display direction, it indicates that the related information of starting the target component is stored when the target application is started before, and thus the first display request can be safely intercepted, and the starting page of the target application can be displayed according to a target display direction corresponding to the pose information. In this way, in a case where it is determined that the preset database has the first component information, the first display request is intercepted to stop the first display request from being responded to, which can avoid the problem that the first display request is intercepted when the target application is started for the first time, resulting in an abnormal start, so that the stable operation of the target application is ensured while avoiding the rotation of the starting page during the starting of the target application.
[0093] Figure 5 FIG. 11 is a flowchart illustrating another method of page display according to an example embodiment. Figure 5 As shown in FIG. 11, the method can further include:
[0094] In step S106, in a case where the preset database does not have the first component information, second component information of the target component is obtained.
[0095] In step S107, the second component information is stored to the preset database.
[0096] In an example, in a case where the first component information does not exist in the preset database, second component information of the target component can be acquired, where the second component information can include at least one of a name of the target application, a name of the target component, and a preset display direction. The second component information is then stored to the preset database, so that when the target application is started next time, the first display request can be safely intercepted, and the start page of the target application is displayed according to the target display direction corresponding to the pose information, so that the rotation of the start page in the process of starting the target application is avoided, and the stable operation of the target application is ensured.
[0097] Figure 6 is a flowchart of another method of page display according to an example embodiment, as shown in Figure 6 The method can further include:
[0098] In step S108, in a case where the first component information does not exist in the preset database, the first display request is responded to, so that the start page is displayed according to a preset display direction.
[0099] In step S109, a second display request is generated according to the pose information or the device type of the terminal device, and the second display request is used to request the terminal device to display the start page of the target application according to a specified display direction.
[0100] In step S110, the start page of the target application is displayed according to the specified display direction.
[0101] In an example, in a case where the first component information does not exist in the preset database, it indicates that the target component is started for the first time, and if the first display request is intercepted and the start page of the target application is displayed according to the target display direction corresponding to the pose information, it may cause the target application to start abnormally, which is not conducive to the stable start of the target application. Therefore, the first display request can be responded to, so that the start page is displayed according to a preset display direction, and then a second display request is generated according to the pose information or the device type of the terminal device, and the start page of the target application is displayed according to the specified display direction indicated by the second display request.
[0102] In some embodiments, in the case of generating the second display request according to the pose information of the terminal device, the specified display direction can be matched with the pose information. For example, in the case of the pose information representing that the terminal device is placed in a horizontal screen, it can be determined that the specified display direction is a horizontal screen direction; in the case of the pose information representing that the terminal device is placed in a vertical screen, it can be determined that the specified display direction is a vertical screen direction. In the case of generating the second display request according to the device type of the terminal device, the specified display direction can be determined according to a pre-established relationship between the device type and the display direction, for example, when the device type is a mobile phone device, the specified display direction can be a vertical screen direction, and when the device type is a PAD device, the specified display direction can be a horizontal screen direction.
[0103] According to some embodiments of the present disclosure, one implementation of step S106 can be:
[0104] In the case of the first component information not existing in the preset database and the target application satisfying a preset storage condition, the second component information is acquired. The preset storage condition includes that the display directions requested by the first display request and the second display request are different.
[0105] For example, in the case of the first component information not existing in the preset database, it can be further judged whether the target application satisfies the preset storage condition, and in the case of the target application satisfying the preset storage condition, the second component information is acquired.
[0106] In some embodiments, the preset storage condition can include that the display directions requested by the first display request and the second display request are different, that is, the target application itself has the need and setting of adjusting the page direction according to the pose information, the device type and the like of the terminal device in the starting process, so that the second component information can be stored in the preset database, so that the next time the target application is started, the first display request can be safely intercepted, and the starting page of the target application can be displayed according to the target display direction corresponding to the pose information, thereby avoiding the rotation of the starting page in the process of starting the target application, and ensuring the stable operation of the target application.
[0107] In some other embodiments, the preset storage condition can include that the display directions requested by the first display request and the second display request are different, and the target application requests to set the page direction of the terminal device through a preset interface, and the target component corresponding to the starting page is in the starting process. The preset interface can be setRequestOrientatio(), and the target component in the starting process can be in an onCreate state or an onStart state.
[0108] The following provides a specific embodiment.
[0109] Figure 7 The logical diagram for the system side of the terminal device is as follows:Figure 7 As shown in the figure, when starting the Activity of the start page of the target application on the terminal device, first, the preset display direction of the topmost Activity and the pose information of the terminal device are obtained, and then it is judged whether the pose information matches the preset display direction. If the pose information matches the preset display direction, the Activity can be normally started, and if the pose information does not match the preset display direction, it is checked in the preset database whether the first component information corresponding to the Activity is stored. In the case where the first component information is stored in the preset database, the optimization step is executed. The optimization step includes: intercepting the first display request to stop responding to the first display request, and displaying the start page of the target application according to the target display direction corresponding to the pose information. In the case where the first component information is not stored in the preset database, the identification step is executed. In the case where the first component information is stored in the preset database, the identification process is entered.
[0110] The specific process of the identification process can be as shown in the figure Figure 8 First, it is judged whether the target application requests the terminal device to display the start page of the target application according to the preset display direction by calling the setRequestOrientation() interface. If yes, it is further judged whether the preset display direction statically declared by the Activity corresponding to the start page is the same as the specified display direction requested by the target application according to the pose information. If not, it is further judged whether the Activity corresponding to the start page is in the starting process (for example, in the onCreate state or the onStart state). If yes, it is determined that the target application meets the preset storage condition, and then the identification step can be executed. The identification step includes: obtaining the second component information of the target component, and storing the second component information to the preset database, so that the first display request can be safely intercepted and the start page of the target application can be displayed according to the target display direction corresponding to the pose information when the target application is started next time. If the target application does not meet the preset storage condition, the identification step is not executed.
[0111] In summary, the present disclosure, when receiving the startup instruction of the target application in the terminal device, obtains the current posture information of the terminal device and the preset display direction of the startup page of the target application, and generates a first display request according to the preset display direction. In the case that the posture information does not match the preset display direction, the response to the first display request is stopped, and the target display direction of the startup page is determined according to the posture information, and then the startup page of the target application is displayed according to the target display direction. In the case that the current posture information of the terminal device does not match the preset display direction of the startup page of the target application, the present disclosure stops responding to the first display request requesting the terminal device to display the startup page according to the preset display direction, and displays the startup page according to the target display direction corresponding to the posture information. This can avoid the problem of the startup page rotating when the terminal device starts the target application, thereby improving the user experience.
[0112] Figure 9 is a block diagram of a device for displaying a page according to an exemplary embodiment. Figure 9 As shown, when applied to a terminal device, the apparatus 200 may include:
[0113] The first acquisition module 201 is configured to acquire the current posture information of the terminal device and the preset display direction of the startup page of the target application in response to receiving a startup instruction of the target application in the terminal device.
[0114] The generating module 202 is configured to generate a first display request according to a preset display direction, where the first display request is used to request the terminal device to display a startup page of a target application according to the preset display direction.
[0115] The determination module 203 is configured to stop responding to the first display request if the posture information does not match the preset display direction, and determine the target display direction of the startup page according to the posture information.
[0116] The first display module 204 is configured to display the startup page of the target application according to the target display direction.
[0117] Figure 10 is a block diagram of another apparatus for displaying pages according to an exemplary embodiment. Figure 10 As shown, the device 200 further includes:
[0118] The second display module 205 is configured to respond to the first display request and display the startup page in the preset display direction when the posture information matches the preset display direction.
[0119] In some embodiments, the determination module 203 is configured to:
[0120] In a case where the pose information does not match the preset display direction, the first component information of the target component of the target application is acquired from the preset database.
[0121] In a case where the first component information exists in the preset database, the response to the first display request is stopped.
[0122] Figure 11 is a block diagram of another apparatus for page display according to an example embodiment, as shown in Figure 11 The apparatus 200 further includes:
[0123] The second acquisition module 206 is configured to acquire second component information of the target component in a case where the first component information does not exist in the preset database.
[0124] The storage module 207 is configured to store the second component information to the preset database.
[0125] Figure 12 is a block diagram of another apparatus for page display according to an example embodiment, as shown in Figure 12 The apparatus 200 further includes:
[0126] The third display module 208 is configured to, in a case where the first component information does not exist in the preset database, respond to the first display request to display the start page in the preset display direction.
[0127] The second generation module 209 is configured to generate a second display request according to the pose information or the device type of the terminal device, the second display request being used to request the terminal device to display the start page of the target application in a specified display direction.
[0128] The fourth display module 210 displays the start page of the target application in the specified display direction.
[0129] In some other embodiments, the second acquisition module 206 is configured to:
[0130] In a case where the first component information does not exist in the preset database and the target application satisfies a preset storage condition, the second component information is acquired. The preset storage condition includes that the display direction requested by the first display request is different from the display direction requested by the second display request.
[0131] In some other embodiments, the component information includes at least one of a name of the target application, a name of the target component, and the preset display direction.
[0132] As to the apparatus in the above embodiments, the specific manners in which the various modules perform operations have been described in detail in the embodiments of the method, and thus will not be described here in detail.
[0133] In summary, the present disclosure, in the case of receiving a starting instruction of a target application in a terminal device, acquires current pose information of the terminal device and a preset display direction of a starting page of the target application, and generates a first display request according to the preset display direction. In the case of mismatch between the pose information and the preset display direction, the first display request is stopped from being responded, and a target display direction of the starting page is determined according to the pose information, and then the starting page of the target application is displayed according to the target display direction. In the case of mismatch between the current pose information of the terminal device and the preset display direction of the starting page of the target application, the present disclosure stops responding to the first display request for requesting the terminal device to display the starting page according to the preset display direction, and displays the starting page according to the target display direction corresponding to the pose information, which can avoid the problem of rotation of the starting page in the process of starting the target application in the terminal device, and improves the user experience.
[0134] The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the method for page display provided by the present disclosure.
[0135] Figure 13 is a block diagram of still another apparatus for page display according to an exemplary embodiment. For example, apparatus 300 can be a mobile phone, computer, digital broadcast terminal, messaging device, gaming console, tablet device, medical device, fitness device, personal digital assistant, and the like.
[0136] Referring to Figure 13 , apparatus 300 can include one or more of the following components: a processing component 302, a memory 304, a power supply component 306, a multimedia component 308, an audio component 310, an input / output (I / O) interface 312, a sensor component 314, and a communication component 316.
[0137] The processing component 302 usually controls overall operations of the apparatus 300, such as operations associated with displaying, making phone calls, data communications, camera operations and recording operations. The processing component 302 can include one or more processors 320 to execute instructions to complete all or part of steps of the above-mentioned method for page display. Further, the processing component 302 can include one or more modules to facilitate interaction between the processing component 302 and other components. For example, the processing component 302 can include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0138] The memory 304 is configured to store various types of data to support the operation of the device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phonebook data, messages, pictures, videos, and the like. The memory 304 can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0139] The power supply component 306 supplies electrical power for the various components of the device 300. The power supply component 306 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing electrical power for the device 300.
[0140] The multimedia component 308 includes a screen providing an output interface between the device 300 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swiping, and gestures on the touch panel. The touch sensors can not only sense a boundary of a touch or swiping action, but also detect duration and pressure related to the touch or swiping action. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. The front and / or rear camera can receive external multimedia data when the device 300 is in an operation mode such as a photographing mode or a video mode. Each of the front and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0141] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC) that is configured to receive external audio signals when the device 300 is in an operation mode such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 304 or transmitted via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.
[0142] The input / output interface 312 provides an interface between the processing component 302 and peripheral interface modules such as a keyboard, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0143] The sensor component 314 includes one or more sensors to provide status assessments for various aspects of the device 300. For example, the sensor component 314 can detect an open / closed status of the device 300, relative positioning of components, such as a display and keypad of the device 300, a change in position of the device 300 or a component of the device 300, presence or absence of user contact with the device 300, orientation or acceleration / deceleration of the device 300, and temperature changes of the device 300. The sensor component 314 can include proximity sensor(s) configured to detect presence of nearby objects without any physical contact. The sensor component 314 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 314 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0144] The communication component 316 is configured to facilitate wired or wireless communication between the device 300 and another device. The device 300 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-WideBand (UWB) technology, Bluetooth (BT) technology and other technologies.
[0145] In an exemplary embodiment, the device 300 can be implemented using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, or other electronic units to perform the method of the page display.
[0146] In an exemplary embodiment, a non-transitory computer readable storage medium including instructions, such as the memory 304 including instructions, is also provided, which can be executed by the processor 320 of the device 300 to perform the method of the page display. For example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.
[0147] In another exemplary embodiment, there is also provided a computer program product comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the method of page presentation described above when the computer program is executed by the programmable apparatus.
[0148] Those of skill would further appreciate that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or combinations of both. Such functionality can be achieved with various methods, and the methods used to implement the functionality can depend on the particular application and the overall design constraints imposed on the overall system. Skilled artisans can employ a variety of methods and techniques for implementing the functionality associated with the various illustrative logical blocks and steps described above. Embodiments of the present application, however, are not limited to these methods and techniques.
[0149] In the detailed description above, reference is made to the accompanying drawings, which form a part hereof, and in which are shown by way of illustration various aspects of the disclosure. In this regard, directional terminology, such as “central,” “longitudinal,” “lateral,” “length,” “width,” “thickness,” “upper,” “lower,” “front,” “back,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” “outer,” “clockwise,” “counterclockwise,” “axial,” “radial,” “circumferential,” and the like, are used herein for the purpose of illustration only. Because such terms can oftentimes be used loosely, they should be understood as being used consistent with the orientation of the figures as presented unless otherwise noted. It will be understood that the foregoing description is not inclusive of all aspects of the disclosure, and that various other aspects can be utilized, and that the above description is not to be taken as limiting the scope of the disclosure. Hence, specific embodiments disclosed herein are shown by way of example in the drawings and detailed description, and it should be understood that various other aspects can be utilized and that logical and mechanical changes can be made without departing from the spirit of the present disclosure. As such, the following detailed description is not to be taken in a limiting sense, and the scope of the embodiments are defined by the appended claims and equivalents thereof.
[0150] It will be understood that the features of various aspects of the disclosure described herein can be combined with each other, unless specifically noted otherwise. As used herein, the term “and / or” includes any one of the associated listed items, as well as any combination of any two or more of the associated listed items; similarly, “at least one of’ includes any one of the associated listed items, as well as any combination of any two or more of the associated listed items.
[0151] It should be understood that, unless otherwise expressly specified or limited, the terms "join," "attach," "install," "connect," "connect," "fix," etc. used in the embodiments of the present disclosure should be understood in a broad sense. For example, they can be fixedly connected, detachably connected, or integrated; they can be mechanically connected, electrically connected, or communicable with each other; they can be directly connected, or indirectly connected through an intermediate medium, and they can be internally connected between two elements or an interactive relationship between two elements, unless otherwise expressly limited. For those skilled in the art, the specific meanings of the above terms in this article can be understood according to specific circumstances.
[0152] In addition, the term "over" as used in reference to a component, element, or material layer being formed "over" or located "over" a surface may be used herein to mean that the component, element, or material layer is "indirectly" positioned (e.g., placed, formed, deposited, etc.) on the surface such that one or more additional components, elements, or layers are disposed between the surface and the component, element, or material layer. However, the term "over" as used in reference to a component, element, or material layer being formed "over" or located "over" a surface may alternatively have a specific meaning: the component, element, or material layer is "directly" positioned (e.g., placed, formed, deposited, etc.) on the surface, e.g., in direct contact with the surface.
[0153] Although terms such as "first", "second" and "third" may be used herein to describe various components, parts, regions, layers or sections, these components, parts, regions, layers or sections are not limited to these terms. On the contrary, these terms are only used to distinguish one component, part, region, layer or section from another component, part, region, layer or section. Therefore, without departing from the teachings of each example, the first component, part, region, layer or section mentioned in the examples described herein may also be referred to as the second component, part, region, layer or section. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one such feature. In the description herein, the meaning of "multiple" is at least two, for example, two, three, etc., unless otherwise clearly and specifically defined.
[0154] It will be understood that spatially relative terms, such as "above", "upper", "below", and "lower", are intended to be interpreted in accordance with the positions of the components as depicted in the figures. Such spatially relative terms are intended to encompass different orientations of the device in use or operation, in addition to the orientations depicted in the figures. For example, if the device in the figures is turned over, the component described as above other component would then be oriented below the other component. Accordingly, the term above can encompass both an orientation above and below. The device can be otherwise oriented (e.g., rotated 90 degrees or at other orientations) and the spatially relative terms used herein interpreted accordingly.
[0155] In addition, the word "exemplary" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "exemplary" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word exemplary is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise, or clear from context, "X employs A or B" is intended to mean any of the natural inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied under any of the foregoing instances. In addition, the articles "a" and "an" as used in this application and the appended claims should generally be construed to mean "one or more" unless specified otherwise or clear from context to be directed to a singular form. Thus, use of the articles in this application and the appended claims is not limiting.
[0156] Also, although the disclosure has been described with respect to only one or more implementations thereof, those skilled in the art will readily appreciate that other and / or more particular modifications can be made thereto without departing from the scope of the disclosure. The disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions described above with regard to the components (e.g., elements, resources, etc.) described above, unless otherwise specified, the terminology used with respect to such components is intended to correspond to any component that performs the particular function of the described component (functionally equivalent), even if structurally not equivalent to the disclosed structure. In addition, although a particular feature of the disclosure can have been disclosed with respect to only one of several implementations, such feature can be combined with one or more other features of the other implementations as can be desired and advantageous for any given or particular application. Furthermore, to the extent that "comprising", "including", "carrying", "having", "containing", or "encompassing" or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term "comprising" as an open transition term without precluding any additional or other elements.
[0157] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
[0158] It should be understood that the present disclosure is not limited to the precise structures as herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.
Claims
1. A method of page presentation, characterized by, Applied to a terminal device, comprising: In response to receiving a starting instruction of a target application in the terminal device, obtaining current pose information of the terminal device and a preset display direction of a starting page of the target application; Generating a first display request according to the preset display direction, the first display request being used to request the terminal device to display the starting page of the target application according to the preset display direction; In a case where the pose information and the preset display direction do not match, stopping responding to the first display request, and determining a target display direction of the starting page according to the pose information; Displaying the starting page of the target application according to the target display direction.
2. The method of claim 1, wherein, The method further comprises: In a case where the pose information and the preset display direction match, responding to the first display request to display the starting page according to the preset display direction.
3. The method of claim 1, wherein, The stopping of responding to the first display request in the case where the pose information and the preset display direction do not match comprises: In a case where the pose information and the preset display direction do not match, obtaining first component information of a target component of the target application from a preset database; In a case where the first component information exists in the preset database, stopping responding to the first display request.
4. The method of claim 3, wherein, The method further comprises: In a case where the first component information does not exist in the preset database, obtaining second component information of the target component; Storing the second component information to the preset database.
5. The method of claim 4, wherein, The method further comprises: In a case where the first component information does not exist in the preset database, responding to the first display request to display the starting page according to the preset display page; Generating a second display request according to the pose information or a device type of the terminal device, the second display request being used to request the terminal device to display the starting page of the target application according to a specified display direction; Displaying the starting page of the target application according to the specified display direction.
6. The method of claim 5, wherein, The obtaining of the second component information of the target component in the case where the first component information does not exist in the preset database comprises: In a case where the first component information does not exist in the preset database and the target application satisfies a preset storage condition, obtaining the second component information; the preset storage condition comprises that display directions requested by the first display request and the second display request are different.
7. The method according to any one of claims 3-6, characterized in that, The component information comprises at least one of a name of the target application, a name of the target component and the preset display direction.
8. An apparatus for page presentation, characterized by Applied to a terminal device, comprising: A first obtaining module configured to, in response to receiving a starting instruction of a target application in the terminal device, obtain current pose information of the terminal device and a preset display direction of a starting page of the target application; A generating module configured to generate a first display request according to the preset display direction, the first display request being used to request the terminal device to display the starting page of the target application according to the preset display direction; A determination module is configured to, in a case where the pose information does not match the preset display direction, stop responding to the first display request, and determine a target display direction of the start page according to the pose information; A first display module is configured to display the start page of the target application according to the target display direction.
9. An apparatus for page presentation, characterized by The method comprises the steps of: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: in response to receiving a start instruction of a target application in the terminal device, acquire current pose information of the terminal device and a preset display direction of a start page of the target application; generate a first display request according to the preset display direction, the first display request being used to request the terminal device to display the start page of the target application according to the preset display direction; in a case where the pose information does not match the preset display direction, stop responding to the first display request, and determine a target display direction of the start page according to the pose information; display the start page of the target application according to the target display direction.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1-7.
11. A computer program product, characterised in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1-7.