Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The display control method of the application program is used for a terminal, the terminal is provided with a foldable display unit, and the display unit comprises a first display unit and a second display unit. The foldable display unit is a foldable display screen, which may be in a folded state or an unfolded state. In the folded state, one of the first display unit and the second display unit is a main display unit, namely the display unit faces to a user (in the sight range of the user) and is in a display state, and the other display unit faces away from the user and is in a screen turning state. In the unfolded state, the first display unit and the second display unit are simultaneously in the sight range of the user and in a display state, and the first display unit and the second display unit may or may not be located in one plane. Preferably, the first display unit and the second display unit are located in one plane in the unfolded state for obtaining an optimal display effect.
When the foldable display unit is in a folded state, the space occupied by the terminal can be reduced, the terminal is convenient to carry, and when the terminal is in an unfolded state, a larger using area of the display unit can be provided for a user.
Referring to fig. 1, the display control method of an application program of the present invention includes the steps of:
step 101, when the display unit is in a folded state, determining whether an unfolding action of a user on the display unit is detected, wherein in the folded state, the first display unit or the second display unit is in a display state, and a first interface of a first version of a first application program is displayed; if yes, executing step 102;
step 102, operating the second version of the first application program, and controlling the first display unit and the second display unit to display a second interface of the second version of the first application program as a whole, wherein the second interface of the second version of the first application program corresponds to the first interface of the first version of the first application program.
Preferably, the first version and the second version are adapted to different screen sizes, and the second version is adapted to a larger screen size than the first version.
Preferably, the first version is a small-screen version, such as a mobile phone version; the second version is a large screen version, such as a flat panel version. In one embodiment, the first application is Youke, the first interface is a subscription interface of Youke mobile phone version, and the second interface is a subscription interface of Youke tablet version.
Preferably, the method further comprises: 103, when the display unit is in an expanded state and the first display unit and the second display unit display a fourth interface of the second version of the first application program as a whole, judging whether a folding action of a user on the display unit is detected, if so, executing step 104;
step 104, running the first version of the first application program, controlling the first display unit or the second display unit to be in a display state, and displaying a third interface of the first version of the first application program, wherein the third interface of the first version of the first application program corresponds to the fourth interface of the second version of the first application program.
Preferably, the steps 103 and 104 may be performed after or before the steps 101 and 102, and in another embodiment, the steps 103 and 104 may be performed independently of the steps 101 and 102, i.e., the steps 101 and 102 may not be performed, and the steps 103 and 104 may be performed separately.
Preferably, the method further comprises, at step 100, determining whether the display unit is in a folded state or an unfolded state, and if the display unit is in the folded state, executing step 101, and if the display unit is in the unfolded state, executing step 103.
Preferably, step 102 specifically includes: saving running data of a first version of the first application program; and operating the second version of the first application program, correspondingly loading the operating data into the second version of the first application program, and controlling the first display unit and the second display unit to display a second interface of the second version of the first application program as a whole.
Preferably, step 104 is specifically: saving the running data of the second version of the first application program; and running the first version of the first application program, correspondingly loading the running data into the first version of the first application program, controlling the first display unit or the second display unit to be in a display state, and displaying a third interface of the first version of the first application program.
Preferably, after step 102, a step 105 of closing the first version of the first application is further included.
Preferably, the step 105 is performed before the steps 103-104.
Preferably, after step 104, there is further step 106 of closing said second version of said first application.
Preferably, the step 106 is performed before the steps 101-102.
Preferably, the terminal records the state of the display unit. In step 100, it is determined whether the display unit is in the folded state or the unfolded state based on the recorded state in which the display unit is located.
In step 101, a change value of an included angle between the first display unit and the second display unit or a change value of an included angle between normals of the first display unit and the second display unit is detected, whether a user unfolding action of the display unit is detected or not is determined based on the change value, and if the change value exceeds a first threshold value, the user unfolding action of the display unit of the terminal is detected. Once the unfolding action is detected in step 101, step 102 may be performed without waiting until the unfolding action is finished, i.e. without waiting until the display unit is completely unfolded into one plane or until the first display unit and the second display unit are both located within the line of sight of the user.
Preferably, step 102 further comprises updating the recorded state of the display unit to the expanded state.
In step 103, a change value of an included angle between the first display unit and the second display unit or a change value of a relative angle between normals of the first display unit and the second display unit is detected, whether a folding action of the user on the display unit is detected is determined based on the change value, and if the change value exceeds a second threshold, the folding action of the user on the display unit is detected. Once a folding action is detected in step 103, step 104 may be performed without having to wait until the folding action is finished, i.e. until the display unit is completely folded and registered.
Preferably, step 104 further comprises updating the recorded state in which the display unit is located to the folded state.
Preferably, the first threshold and the second threshold are the same or different.
In one embodiment, in the folded state, an included angle between the first display unit and the second display unit is 0 degree, and in the unfolded state, and when the first display unit and the second display unit are located in one plane, the included angle between the first display unit and the second display unit is 180 degrees, then the precondition of detecting the unfolding action is that when the terminal is in the folded state, that is, the recorded state of the display unit is the folded state, the included angle between the first display unit and the second display unit is detected to exceed a first threshold value; the premise of detecting the folding action is that when the terminal is in the unfolding state, namely the recorded state of the display unit is the unfolding state, the included angle between the first display unit and the second display unit is not more than (180 degrees-a second threshold value) when the terminal is detected.
Preferably, in step 102, before saving the operation data of the first version of the first application or operating the second version of the first application, a plurality of operable buttons are displayed on the first display unit or the second display unit, the plurality of operable buttons respectively correspond to different expansion display modes, the selection of the plurality of operable buttons by the user is detected, and the first display unit and the second display unit are controlled to display according to the expansion display mode corresponding to the button. When the user selects a preset button, controlling the first display unit and the second display unit to display according to an expansion display mode corresponding to the preset button, that is, a switching version expansion display mode, and specifically, continuing to perform the other steps of the step 102, that is, storing the running data of the first version of the first application program; the second version of the first application program is operated, the operation data is correspondingly loaded into the second version of the first application program, and the first display unit and the second display unit are controlled to display a second interface of the second version of the first application program as a whole; or, the second version of the first application program is operated, and the first display unit and the second display unit are controlled to display a second interface of the second version of the first application program as a whole.
Preferably, in step 102, when the user selects the preset button, it is determined whether the second version of the first application program is installed in the terminal, if so, the other steps of step 102 described above are continuously executed, otherwise, the user is prompted to download and install the second version of the first application program, after obtaining the confirmation of the user, the second version of the first application program is downloaded and installed, and the other steps of step 102 described above are continuously executed.
Preferably, the plurality of operable buttons include an enlargement display button, a switch version button, a split screen display button, and the like. The preset button is a version switching button.
Preferably, when the user selects another button except the preset button, the first display unit and the second display unit are controlled to display according to the expansion display mode corresponding to the button. And under the mode, the first display unit and the second display unit are controlled to display the first interface of the first version of the first application program in a larger scale as a whole. The expansion display mode corresponding to the split-screen display button is a split-screen expansion display mode, in the mode, one of the first display unit and the second display unit displays a first interface of a first version of the first application program, and the other display unit displays interfaces or desktops of other application programs.
Preferably, in step 102, before saving the running data of the first version of the first application program or running the second version of the first application program, the display posture of the display unit in the display state is acquired, and the first display unit and the second display unit are controlled to display according to the expansion display mode corresponding to the display posture. When the display gesture is the first preset display gesture, the first display unit and the second display unit are controlled to display according to the switching version expansion display mode, specifically, the other steps of the step 102 are continuously executed, that is, the running data of the first version of the first application program is stored; the second version of the first application program is operated, the operation data is correspondingly loaded into the second version of the first application program, and the first display unit and the second display unit are controlled to display a first interface of the second version of the first application program as a whole; or, the second version of the first application program is operated, and the first display unit and the second display unit are controlled to display the first interface of the second version of the first application program as a whole. The first preset display posture corresponds to the switching version unfolding display mode.
Preferably, the first preset display posture is a landscape screen display posture and/or a portrait screen display posture.
The landscape display posture is a horizontal direction of a plane where the display unit in the display state is located, and the short side is a vertical direction of the plane where the display unit in the display state is located, and the portrait display posture is a vertical direction of a plane where the display unit in the display state is located, and the long side of the display unit in the display state is a vertical direction of the plane where the display unit in the display state is located, and the short side is a horizontal direction of the plane where the display unit in the display state is located, that is, the landscape display posture is obtained by rotating 90 degrees clockwise or counterclockwise on the basis of the portrait display posture.
Preferably, the display posture of the display unit (the first display unit or the second display unit) in the display state is a posture of the terminal before or during the process of opening the folding screen by the user.
Preferably, the first preset display gesture is a vertical screen normal display gesture and/or a vertical screen flip display gesture and/or a clockwise landscape screen display gesture (or called a right landscape screen display gesture) and/or a counterclockwise landscape screen gesture (or called a left landscape screen display gesture).
Referring to fig. 2(a), the portrait normal display attitude is an attitude in which the terminal is normally located, i.e., a portrait orientation defined by a terminal manufacturer, e.g., a portrait orientation shown by the terminal manufacturer in a terminal specification, a promotional advertisement or a trailer, etc. For the terminal with the home key, the terminal is in the normal display posture of the vertical screen when the home key is positioned below, and for the terminal using the water drop screen or the Liuhai screen, the terminal is in the normal display posture of the vertical screen when the non-display area corresponding to the water drop screen or the Liuhai screen is positioned above. Referring to fig. 2(b), the vertical screen flip display gesture shows a display gesture obtained by rotating the vertical screen by 180 degrees clockwise or counterclockwise on the basis of the normal display gesture of the vertical screen.
Referring to fig. 2(c), the clockwise-horizontal screen display posture is a display posture obtained by clockwise rotating by 90 degrees on the basis of the vertical screen normal display posture, that is, the upper short side of the display unit in the display state in the vertical screen normal display posture is the right short side in the clockwise-horizontal screen display posture; referring to fig. 2(d), the counterclockwise landscape orientation is rotated 90 degrees counterclockwise based on the normal display orientation of the vertical screen, that is, the upper short side of the display unit in the display state in the normal display orientation of the vertical screen is the left short side in the counterclockwise landscape display orientation. It is to be noted that the "clockwise" in the clockwise landscape screen posture or the "right" in the right landscape screen display posture, the "counterclockwise" in the counterclockwise landscape screen posture or the "left" in the left landscape screen display posture is only the normal display posture of the portrait screen as the reference posture for the convenience of defining the display posture of the display unit in the display state, and it does not mean that the clockwise landscape screen display posture (i.e., the right landscape screen display posture) can be obtained only by clockwise rotation or rightward rotation, nor that the counterclockwise landscape screen posture (i.e., the left landscape screen display posture) can be obtained only by counterclockwise rotation or leftward rotation. For example, the clockwise landscape screen posture may be obtained by counterclockwise rotation by 270 degrees based on the normal display posture of the portrait screen, counterclockwise rotation by 90 degrees based on the flip display posture of the portrait screen, or clockwise rotation by 270 degrees based on the flip display posture of the portrait screen, and the counterclockwise landscape screen posture may be obtained by clockwise rotation by 270 degrees based on the normal display posture of the portrait screen, clockwise rotation by 90 degrees based on the flip display posture of the portrait screen, or counterclockwise rotation by 270 degrees based on the flip display posture of the portrait screen.
Preferably, the first preset display gesture may be a default setting, or may be set by a user and stored in the terminal.
Preferably, the other display gestures except the first preset display gesture correspond to other expansion display modes, such as an enlarged expansion display mode and a split-screen expansion display mode, and the correspondence between the other display gestures and the other expansion modes may be set by default or may be set by a user and stored in the terminal.
Preferably, in step 102, when the display gesture is a first preset display gesture, it is determined whether the second version of the first application program is installed in the terminal, if so, the other steps of step 102 described above are continuously executed, otherwise, the user is prompted to download and install the second version of the first application program, after the user's confirmation is obtained, the second version of the first application program is downloaded and installed, and the other steps of step 102 described above are continuously executed.
In step 104, before saving the running data of the second version of the first application program or running the first version of the first application program, obtaining the display gesture of the display unit, and when the display gesture is a second preset display gesture, continuing to execute the other steps of step 104, that is, saving the running data of the second version of the first application program; the first version of the first application program is operated, the operation data is correspondingly loaded into the first version of the first application program, the first display unit or the second display unit is controlled to be in a display state, and a third interface of the first version of the first application program is displayed, or the first version of the first application program is operated, the first display unit or the second display unit is controlled to be in a display state, and a third interface of the first version of the first application program is displayed.
Preferably, the display posture of the display unit (the first display unit and/or the second display unit) is the posture of the terminal before or during the process of folding the display unit by the user.
Preferably, the second preset display posture is a landscape screen display posture and/or a portrait screen display posture.
Preferably, the second preset display gesture is a vertical screen normal display gesture and/or a vertical screen flip display gesture and/or a clockwise landscape screen display gesture (or called a right landscape screen display gesture) and/or a counterclockwise landscape screen gesture (or called a left landscape screen display gesture).
Preferably, the second preset display gesture may be a default setting, or may be set by a user and stored in the terminal.
Preferably, the first preset display posture and the second preset display posture are completely the same, partially the same or different.
By the method, when the display unit of the terminal is in a folded state, the small-size screen version of the application program, such as a mobile phone version, is used, and when the display unit of the terminal is in an unfolded state, the large-size screen version of the application program, such as a flat-panel version, is used, so that rich folding screen experience is provided for a user by effectively utilizing the existing application program version, and the redevelopment of the application program of a new version aiming at the folding screen is avoided. In addition, in the method, when the display unit is unfolded, the second interface of the second version corresponding to the first interface of the first version is displayed, and when the display unit is folded, the third interface of the first version corresponding to the fourth interface of the second version is displayed, so that a user can obtain smooth and continuous display experience after folding or unfolding the display unit, and can enter the interface required by the user without repeated operation.
An embodiment of the present invention provides a display control apparatus for an application program, which is applied to a terminal, with reference to fig. 3, and includes: a foldable display unit, an unfolding action detection unit and a display control unit;
the display unit can be in a folded state or an unfolded state and comprises a first display unit and a second display unit;
the display unit is used for displaying a first version of a first application program, and the display unit is used for displaying a second version of the first application program; if the unfolding action is detected, triggering the unfolding display control unit;
the expansion display control unit is used for operating the second version of the first application program and controlling the first display unit and the second display unit to display a second interface of the second version of the first application program as a whole, wherein the second interface of the second version of the first application program corresponds to the first interface of the first version of the first application program.
Preferably, the apparatus further comprises: a folding action detection unit and a folding display control unit.
The folding action detection unit is used for judging whether the folding action of the user on the display unit is detected or not when the display unit is in the unfolding state and the first display unit and the second display unit display the fourth interface of the second version of the first application program as a whole, and triggering the folding display control unit if the folding action is detected.
The folding display control unit is used for operating the first version of the first application program, controlling the first display unit or the second display unit to be in a display state, and displaying a third interface of the first version of the first application program, wherein the third interface of the first version of the first application program corresponds to a fourth interface of the second version of the first application program.
Preferably, the apparatus further comprises: and the judging unit is used for judging whether the display unit is in a folded state or an unfolded state, if the display unit is in the folded state, the unfolding action detecting unit is triggered, and if the display unit is in the unfolded state, the folding action detecting unit is triggered.
Preferably, the expansion display control unit is further configured to store operation data of the first version of the first application program, operate the second version of the first application program, correspondingly load the operation data into the second version of the first application program, and control the first display unit and the second display unit to display a second interface of the second version of the first application program as a whole.
Preferably, the folding display control unit is further configured to store operation data of the second version of the first application program, operate the first version of the first application program, correspondingly load the operation data into the first version of the first application program, control the first display unit or the second display unit to be in a display state, and display a third interface of the first version of the first application program.
Preferably, the expansion display control unit is further configured to close the first version of the first application.
Preferably, the folding display control unit is further configured to close the second version of the first application.
Preferably, the device further comprises a storage unit for recording the state of the display unit. The judging unit judges whether the display unit is in a folded state or an unfolded state based on the state of the display unit recorded in the storage unit.
Preferably, the unfolding action detection unit is configured to detect a change value of an included angle between the first display unit and the second display unit, or detect a change value of an included angle between normals of the first display unit and the second display unit, determine whether to detect an unfolding action of the user on the display unit based on the change value, and detect the unfolding action of the user on the display unit of the terminal if the change value exceeds a first threshold. Once the unfolding action is detected, the unfolding display control unit can be triggered without waiting until the unfolding action is finished, i.e. without waiting until the display unit is completely unfolded into one plane or the first display unit and the second display unit are both positioned in the sight line of the user.
Preferably, the expansion display control unit is further configured to update the state of the display unit recorded by the storage unit to the expansion state.
Preferably, the folding motion detection unit is configured to detect a change value of an included angle between the first display unit and the second display unit, or a change value of a relative angle between normals of the first display unit and the second display unit, determine whether a folding motion of the display unit by the user is detected based on the change value, and detect the folding motion of the display unit by the user if the change value exceeds a second threshold. Once a folding action is detected, the folding display control unit can be triggered without having to wait until the folding action is finished, i.e. until the display unit is completely folded and superposed.
Preferably, the folding display control unit is further configured to update the state of the display unit recorded by the storage unit to the folding state.
Preferably, the expansion display control unit is further configured to control the first display unit or the second display unit to display a plurality of operable buttons before saving the operation data of the first version of the first application or operating the second version of the first application, where the plurality of operable buttons respectively correspond to different expansion display modes, detect a selection of the plurality of operable buttons by a user, and control the first display unit and the second display unit to display according to the expansion display mode corresponding to the button. When a user selects a preset button, the expansion display control unit controls the first display unit and the second display unit to display according to an expansion display mode corresponding to the preset button, namely, a switching version expansion display mode, specifically, the expansion display control unit continues to execute other functions, namely, storing running data of a first version of the first application program; the second version of the first application program is operated, the operation data is correspondingly loaded into the second version of the first application program, and the first display unit and the second display unit are controlled to display a second interface of the second version of the first application program as a whole; or, the second version of the first application program is operated, and the first display unit and the second display unit are controlled to display a second interface of the second version of the first application program as a whole.
Preferably, the expansion display control unit is further configured to determine whether the second version of the first application program is installed in the terminal when the user selects a preset button, if so, the expansion display control unit continues to execute other functions of the terminal, otherwise, the expansion display control unit prompts the user that the second version of the first application program is to be downloaded and installed, and after confirmation of the user is obtained, the second version of the first application program is downloaded and installed, and the expansion display control unit continues to execute other functions of the terminal.
Preferably, the expansion display control unit is further configured to control the first display unit and the second display unit to display according to an expansion display mode corresponding to the button when the user selects another button except the preset button.
Preferably, the expansion display control unit is further configured to, before saving the running data of the first version of the first application program or running the second version of the first application program, acquire a display gesture of the display unit in the display state, and control the first display unit and the second display unit to display according to an expansion display mode corresponding to the display gesture. When the display gesture is a first preset display gesture, the expansion display control unit controls the first display unit and the second display unit to display according to a version switching expansion display mode, specifically, the expansion display control unit continues to execute other functions, namely, storing running data of the first version of the first application program; the second version of the first application program is operated, the operation data is correspondingly loaded into the second version of the first application program, and the first display unit and the second display unit are controlled to display a second interface of the second version of the first application program as a whole; or, the second version of the first application program is operated, and the first display unit and the second display unit are controlled to display a second interface of the second version of the first application program as a whole.
Preferably, the storage unit is further configured to store a corresponding relationship between the first preset display gesture and the switching version expansion display mode.
Preferably, the device further comprises a setting unit for providing a setting interface through which a user can set the first preset display gesture.
Preferably, the other display gestures except the first preset display gesture correspond to other unfolding display modes, such as an enlarged unfolding display mode and a split screen unfolding display mode. The storage unit is also used for storing the corresponding relation between the other display postures and the other unfolding modes; the setting unit is also used for providing a setting interface, and the user can set the corresponding relation through the setting interface.
Preferably, the display control unit is further configured to determine whether the second version of the first application program is installed in the terminal when the display gesture is a first preset display gesture, if so, the display control unit continues to execute other functions, otherwise, prompt the user that the second version of the first application program is to be downloaded and installed, and after confirmation of the user is obtained, download and install the second version of the first application program, and the display control unit continues to execute other functions.
Preferably, the folding display control unit is further configured to store the running data of the second version of the first application program or obtain a display gesture of the display unit before running the first version of the first application program, and when the display gesture is a second preset display gesture, the folding display control unit continues to execute other functions, that is, store the running data of the second version of the first application program; the first version of the first application program is operated, the operation data is correspondingly loaded into the first version of the first application program, the first display unit or the second display unit is controlled to be in a display state, and a second interface of the first version of the first application program is displayed, or the first version of the first application program is operated, the first display unit or the second display unit is controlled to be in a display state, and a second interface of the first version of the first application program is displayed.
Preferably, the storage unit is further configured to store the second preset display gesture.
Preferably, the device further comprises a setting unit for providing a setting interface through which a user can set the second preset display gesture.
An embodiment of the present invention provides a computer device, which is characterized in that the computer device includes a processor and a memory, where the memory stores computer instructions executable by the processor, and when the processor executes the computer instructions, the method as described above is implemented.
An embodiment of the present invention provides a computer-readable storage medium, which is characterized by storing computer instructions for implementing the method described above.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. The computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), a flash memory, an erasable programmable read-only memory (EPROM), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages or combinations thereof
The above description is only an example for the convenience of understanding the present invention, and is not intended to limit the scope of the present invention. In the specific implementation, a person skilled in the art may change, add, or reduce the components of the apparatus according to the actual situation, and may change, add, reduce, or change the order of the steps of the method according to the actual situation without affecting the functions implemented by the method.
While embodiments of the invention have been shown and described, it will be understood by those skilled in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents, and all changes that come within the meaning and range of equivalency of the claims are to be embraced within their scope.