Disclosure of Invention
In view of the above problems, the present invention has been made to provide a display method of a terminal desktop, an electronic device, and a computer storage medium that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method for displaying a terminal desktop, including:
after a desktop system of the terminal is started, configuration information of a current scene is called from a preset scene configuration file corresponding to a free window mode, wherein the configuration information of the current scene comprises at least one application identifier and corresponding window information, and the window information comprises a window size and corresponding desktop coordinates;
and displaying the application corresponding to the at least one application identifier on the terminal desktop in a window with the size of each window and the desktop coordinate according to the information of each window.
Optionally, after displaying the application corresponding to the at least one application identifier on a terminal desktop in a window of each window size and a desktop coordinate according to the information of each window, the method further includes:
receiving a scene switching instruction, and determining a target scene corresponding to the scene switching instruction according to the current scene of the terminal desktop;
target scene configuration information of the target scene is called from the scene configuration file, the target scene configuration information comprises at least one target application identifier and corresponding target window information, and the target window information comprises the size of a target window and corresponding target desktop coordinates;
and displaying the application corresponding to the at least one target application identifier on a terminal desktop in a target window with the size of each target window and the coordinates of the target desktop according to the target window information.
Optionally, after displaying the application corresponding to the at least one application identifier in a window of the size and the desktop coordinate of each window in a free window mode according to the information of each window, the method further includes:
monitoring application exchange events for any two windows;
and when the application exchange events aiming at any two windows are monitored, controlling the application exchange windows of the two windows to display.
Optionally, the monitoring application exchange events for any two windows includes:
monitoring a dragging event aiming at an application in any window and acquiring dragging information of the dragging event, wherein the dragging information comprises a dragging terminal point;
and judging whether the dragging end point is positioned in a target area range of another window with the window center as the middle point, and if so, determining that an application exchange event occurs.
Optionally, after displaying the application corresponding to the at least one application identifier on the terminal desktop in a window of each window size and desktop coordinate according to the information of each window, the method further includes:
receiving a full screen display instruction aiming at any application;
and closing other application windows of the terminal desktop according to the full-screen display instruction and hiding a fixed taskbar to display the application in a full screen.
According to another aspect of the present invention, there is also provided an electronic apparatus, including:
a processor;
a memory storing a computer program;
the computer program, when executed by the processor, causes the electronic device to perform the method of any of the above.
According to yet another aspect of the invention, there is also provided a computer storage medium having stored therein at least one instruction, at least one program, set of code or set of instructions, which is loaded by a processor and which performs a method as claimed in any preceding claim.
In the invention, after a desktop system of a terminal is started, configuration information of a current scene is firstly called from a preset scene configuration file corresponding to a free window mode, the configuration information of the current scene comprises at least one application identifier and corresponding window information, the window information comprises a window size and corresponding desktop coordinates, and then the application corresponding to the at least one application identifier is displayed on a terminal desktop in a window with the window size and the desktop coordinates according to the window information. Based on the scheme provided by the invention, each window is reconstructed based on Activity, so that each window can multiplex application full-life-cycle management without the problem of window hierarchy, in addition, the existing application can be directly multiplexed, and the application adaptation cost is low.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that the technical features of the embodiments and alternative embodiments of the present invention may be combined with each other without conflict.
Fig. 1 is a schematic flowchart of a display method of a terminal desktop according to an embodiment of the present invention. Referring to fig. 1, the method may include at least the following steps.
Step S102: after a desktop system of the terminal is started, configuration information of a current scene is called from a preset scene configuration file corresponding to a free window mode, wherein the configuration information of the current scene comprises at least one application identifier and corresponding window information, and the window information comprises a window size and corresponding desktop coordinates;
step S104: and displaying the application corresponding to at least one application identifier on the terminal desktop by the window with the size of each window and the desktop coordinates according to the information of each window.
The terminal is, for example, a mobile device, a computer, or a vehicle.
The application identification is used to distinguish different applications, such as application names.
In the embodiment of the invention, after a desktop system of a terminal is started, configuration information of a current scene is firstly called from a preset scene configuration file corresponding to a free window mode, the configuration information of the current scene comprises at least one application identifier and corresponding window information, the window information comprises a window size and corresponding desktop coordinates, and then at least one application corresponding to the application identifier is displayed on a terminal desktop in a window with the window size and the desktop coordinates according to the window information. Based on the scheme provided by the invention, each window is reconstructed based on Activity, so that each window can multiplex application full-life-cycle management without the problem of window hierarchy, in addition, the existing application can be directly multiplexed, and the application adaptation cost is low.
Fig. 2 is a schematic diagram of a terminal desktop according to an embodiment of the present invention. Referring to fig. 2, after the terminal system is started, the terminal desktop is subjected to application and window layout according to the configuration information of the current scene, so that the current scene can be displayed on the terminal desktop. In the current scene corresponding to the terminal desktop shown in fig. 2, a fixed taskbar (including a leftmost window and a left second column of windows), a first application and a second application are arranged from left to right in sequence.
Specifically, after the desktop system of the terminal is started, window information may be obtained, for example, a window is generally rectangular, the window information (100, 50, 600, 300) represents a distance between each side of the window and upper, lower, left, and right boundaries of the terminal desktop, a window corresponding to a window size and desktop coordinates may be planned on the terminal desktop based on the window information, and an application corresponding to an application identifier is displayed in the window.
In a preferred embodiment of the present invention, after the step S104, the method further includes: receiving a scene switching instruction, and determining a target scene corresponding to the scene switching instruction according to a current scene of a terminal desktop; and calling target scene configuration information of a target scene from the scene configuration file, wherein the target scene configuration information comprises at least one target application identifier and corresponding target window information, and the target window information comprises the size of a target window and corresponding target desktop coordinates. And displaying the application corresponding to at least one target application identifier on the terminal desktop according to the target window information by using the target window with the size of each target window and the desktop coordinates. Therefore, the user can adjust the scene of the terminal desktop as required, and the use experience of the user is improved.
FIG. 3 is a first diagram of a terminal desktop in accordance with a preferred embodiment of the present invention; fig. 4 is a second diagram of a terminal desktop according to a preferred embodiment of the present invention. Referring to fig. 2-4, the scene switching instruction may be issued by a user clicking a preset scene switching button on the terminal desktop, for example, a button located at a middle position in a navigation bar at the leftmost side of the terminal desktop. If the current scene of the terminal desktop when the scene switching instruction is received is the scene shown in fig. 2, for example, scene 1, it may be determined that the target scene corresponding to the scene switching instruction is scene 2, and the configuration information of scene 2 may be retrieved from the configuration file, and the terminal desktop is applied and window-planned according to the configuration information of scene 2, so that the terminal desktop is displayed as shown in fig. 3. Specifically, in FIG. 3, the first application is displayed in a larger window and the second application is dismissed; if the current scene of the terminal desktop is the scene shown in fig. 3, i.e., the scene 2, when the scene switching instruction is received, it may be determined that the target scene is the scene 3, and then the terminal desktop may be displayed as shown in fig. 4 according to the configuration information of the scene 3, i.e., the first application window is reduced and the third application window is newly added.
In a preferred embodiment of the present invention, after the step S104, the method further includes: monitoring application exchange events for any two windows; and when the application exchange events aiming at any two windows are monitored, controlling the application exchange windows of the two windows to display. Therefore, the user can adjust the application displayed by the window according to the requirement, and the user experience is further improved.
Specifically, monitoring application exchange events for any two windows includes: the method includes monitoring a drag event for an application within any window and acquiring drag information of the drag event, the drag information including a drag endpoint. And then judging whether the dragging end point is positioned in a target area range of another window with the window center as the middle point, and if so, determining that an application exchange event occurs.
The target region may be a circular region or a rectangular region having a center of the window as a midpoint, and the shape of the target region is not particularly limited in the present invention.
Fig. 5 is a schematic diagram of a terminal desktop according to another preferred embodiment of the present invention. Referring to fig. 4 and 5, the two windows where the application exchange event occurs are the first application window and the third application window.
In a preferred embodiment of the present invention, after the step S104, the method further comprises: and receiving a full-screen display instruction aiming at any application, closing other application windows of the terminal desktop according to the full-screen display instruction and hiding the fixed taskbar to display the application in a full screen mode. Therefore, the user can enlarge the application window according to the requirement, and the user experience is further improved.
Specifically, as shown in fig. 2 to 5, a full-screen display instruction for an application, which is issued by a user by clicking an enlarged icon on the upper right corner of a window of any application, may be received, and after receiving the full-screen display instruction, the terminal desktop exits from the free window mode, that is, other application windows of the terminal desktop are closed and the fixed taskbar is hidden, and the stack where the application is located is set to the full-screen mode, so that the application is displayed in the full-screen mode.
Based on the same inventive concept, the invention further provides an electronic device 600, and fig. 6 is a schematic structural block diagram of the electronic device according to an embodiment of the invention. Referring to fig. 6, the electronic device 600 comprises a processor 610 and a memory 620 in which computer programs 621 are stored; the computer program 621, when executed by the processor 610, causes the electronic device 600 to perform the method according to any of the embodiments described above.
Further, the electronic device 600 is a vehicle-mounted electronic device, or an edge server, or a cloud server.
Further, the Vehicle-mounted electronic device may specifically be a driving brain, or a Vehicle machine, a DHU (integrated machine of entertainment host and meter), an IHU (information entertainment Unit), an IVI (In-Vehicle information entertainment system), or any Vehicle-mounted information interaction terminal.
Based on the same inventive concept, the present invention also proposes a computer storage medium having at least one instruction, at least one program, set of code, or set of instructions stored therein, the at least one instruction, the at least one program, set of code, or set of instructions being loaded by a processor and executing the method according to any of the above embodiments.
The invention provides a terminal desktop display method, electronic equipment and a computer storage medium. Based on the scheme provided by the invention, each window is reconstructed based on Activity, so that each window can multiplex application full-life-cycle management without the problem of window hierarchy, in addition, the existing application can be directly multiplexed, and the application adaptation cost is low.
It is clear to those skilled in the art that the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and for the sake of brevity, further description is omitted here.
In addition, the functional units in the embodiments of the present invention may be physically independent of each other, two or more functional units may be integrated together, or all the functional units may be integrated in one processing unit. The integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.
Those of ordinary skill in the art will understand that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computing device (e.g., a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: u disk, removable hard disk, Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disk, and other various media capable of storing program code.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a computing device, e.g., a personal computer, a server, or a network device) associated with program instructions, which may be stored in a computer-readable storage medium, and when the program instructions are executed by a processor of the computing device, the computing device executes all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments can be modified or some or all of the technical features can be equivalently replaced within the spirit and principle of the present invention; such modifications or substitutions do not depart from the scope of the present invention.