Embodiment
The solution of the embodiment of the present invention is mainly: the application program of self-defined assembly is added in application window management control, rewrites the event handling function in the application program of this self-defined assembly simultaneously; When user installation and need to show this self-defined assembly time, no matter currently carrying out other what application programs, this assembly all can be presented in the mode of floating frame the last layer of all programs always; User can also move the position of this assembly, also can click assembly and carry out corresponding interactive operation, to realize prompting and the fast processing of information, improves user's operating efficiency.
As shown in Figure 1, first embodiment of the invention proposes a kind of assembly display packing of floating, and comprising:
Step S101, obtains application window management control in system;
In the present embodiment, system includes but not limited to run on the Android system of the mobile terminals such as mobile phone, and the present embodiment illustrates with Android system.
In Android system, application window management control refers to the control of managing the window of application program in this system, i.e. WindowManager.
Step S102, is added into the application program of self-defined assembly in described application window management control, and the TYPE property parameters of described self-defined assembly is arranged to system prompt type;
Wherein, self-defined assembly refers to can be according to user's needs, by the predefined unsteady assembly with personalized design of developer, this self-defined assembly is different from unsteady controllable components intrinsic in system, and it can be user's self-defining picture, button and various combinations etc. as required.
When user installation realizes after the application program of this assembly, whether can configure this assembly shows, when this assembly is configured to after show state, the present embodiment can be realized the top layer that this assembly is presented to system display interface with the form of floating frame, i.e. the last layer of all programs.
First, the application program of this self-defined assembly is added in described application window management control, in the time the application program of self-defined assembly being added in described application window management control, the TYPE property parameters of described self-defined assembly is arranged to system prompt type (TYPE_SYSTEM_ALERT), and other property parameters can continue configuration as required; And in AndroidManifest.xml CONFIG.SYS the authority (" android.permission.SYSTEM_ALERT_WINDOW ") of add-on system notification type.
Step S103, in the time that described self-defined assembly is subject to trigger demonstration, is shown to the floating frame of described self-defined assembly the top layer of system interface.
After user installation realizes the application program of this assembly, can configure this assembly and whether show.When assembly is configured to the state showing, no matter current what program is being carried out, this assembly all can be presented in the mode of floating frame the last layer of all programs always.
The present embodiment passes through such scheme, the application program of self-defined assembly is added in application window management control, and the TYPE property parameters of self-defined assembly is arranged to system prompt type, in the time that user installation also need to show this self-defined assembly, no matter current carrying out other what application programs, this assembly all can be presented in the mode of floating frame the last layer of all programs always; Can, by this assembly information that reminding user should be noted that immediately, realize the timely prompting of information thus, be conducive to improve user's operating efficiency.
As shown in Figure 2, second embodiment of the invention proposes a kind of assembly display packing of floating, and the method, on the basis of above-mentioned the first embodiment, after above-mentioned steps S102, also comprises:
Step S104, rewrites the event handling function in the application program of described self-defined assembly;
Meanwhile, after above-mentioned steps S103, also comprise:
Step S105, receives user's move operation instruction; According to described move operation instruction, the position of mobile described self-defined assembly.
The difference of the present embodiment and above-mentioned the first embodiment is, the present embodiment, self-defined assembly is presented to the last layer of all programs in the mode of floating frame after, can be realized the move operation of user to this self-defined assembly.
Particularly, first, the application program of this self-defined assembly is added in described application window management control, in the time the application program of self-defined assembly being added in described application window management control, the TYPE property parameters of described self-defined assembly is arranged to system prompt type (TYPE_SYSTEM_ALERT), and other property parameters can continue configuration as required; And in AndroidManifest.xml CONFIG.SYS the authority (" android.permission.SYSTEM_ALERT_WINDOW ") of add-on system notification type.
Simultaneously, rewrite the event handling functions such as the onTouchEvent/dispatchKeyEvent in the application program of self-defined assembly, by rewriteeing the event handling functions such as the onTouchEvent/dispatchKeyEvent in the application program of self-defined assembly, thereby realize the event response to each child control of self-defined assembly the inside and carry out logical process, user can move the active window of this self-defined assembly to preposition.
The present embodiment passes through such scheme, not only self-defined assembly can be presented to the last layer of all programs in the mode of floating frame, and can realize the move operation of user to this self-defined assembly, user can move the active window of this self-defined assembly to preposition, provide convenience for user's operation, further improved user's operating efficiency.
As shown in Figure 3, third embodiment of the invention proposes a kind of assembly display packing of floating, and the method, on the basis of above-mentioned the first embodiment, after above-mentioned steps S102, also comprises:
Step S104, rewrites the event handling function in the application program of described self-defined assembly;
Meanwhile, after above-mentioned steps S103, also comprise:
Step S106, reception user's click commands; According to described click commands, call application program corresponding in described self-defined assembly.
The difference of the present embodiment and above-mentioned the first embodiment is, the present embodiment is after being presented at self-defined assembly the last layer of all programs in the mode of floating frame, can realize user clicks this self-defined assembly and carries out interactive operation, fast processing relevant information, such as starting other programs in the floating frame of self-defined assembly, close music and controlling network switching etc.
Particularly, first, the application program of this self-defined assembly is added in described application window management control, in the time the application program of self-defined assembly being added in described application window management control, the TYPE property parameters of described self-defined assembly is arranged to system prompt type (TYPE_SYSTEM_ALERT), and other property parameters can continue configuration as required; And in AndroidManifest.xml CONFIG.SYS the authority (" android.permission.SYSTEM_ALERT_WINDOW ") of add-on system notification type.
Simultaneously, rewrite the event handling functions such as the onTouchEvent/dispatchKeyEvent in the application program of self-defined assembly, by rewriteeing the event handling functions such as onTouchEvent/dispatchKeyEvent in the application program of self-defined assembly, thereby realize the event response to each child control of self-defined assembly the inside and carry out logical process.
Button or picture that user can click some regions in self-defined assembly carry out interactive operation, such as starting other programs in the floating frame of self-defined assembly, close music and controlling network switching etc.
Be exemplified below, in the prior art, if user wants to start other programs or uses certain function while using some application programs, need to first exit current application program and get back to desktop, and then find other application programs or certain function that need startup, finally could use this application program or function; And adopt the present embodiment scheme, can, directly in the current application program of carrying out, directly use other application programs or function by self-defined assembly, thus, that has realized information presents processing fast, has improved greatly user's operating efficiency, has met user's request.
As shown in Figure 4, first embodiment of the invention proposes a kind of assembly display device of floating, and comprising:acquisition module 201,interpolation module 202 anddisplay module 203, wherein:
Acquisition module 201, for obtaining system application window management control;
Addmodule 202, for the application program of self-defined assembly being added into described application window management control, and the TYPE property parameters of described self-defined assembly is arranged to system prompt type;
Display module 203, while demonstration, is shown to the floating frame of described self-defined assembly the top layer of system interface for being subject to when described self-defined assembly to trigger.
In the present embodiment, system includes but not limited to run on the Android system of the mobile terminals such as mobile phone, and the present embodiment illustrates with Android system.
In Android system, application window management control refers to the control of managing the window of application program in this system, i.e. WindowManager.
Wherein, self-defined assembly refers to can be according to user's needs, by the predefined unsteady assembly with personalized design of developer, this self-defined assembly is different from unsteady controllable components intrinsic in system, and it can be user's self-defining picture, button and various combinations etc. as required.
When user installation realizes after the application program of this assembly, whether can configure this assembly shows, when this assembly is configured to after show state, the present embodiment can be realized the top layer that this assembly is presented to system display interface with the form of floating frame, i.e. the last layer of all programs.
First, obtain application window management control in system byacquisition module 201; Then by addingmodule 202, the application program of this self-defined assembly is added in described application window management control, in the time the application program of self-defined assembly being added in described application window management control, the TYPE property parameters of described self-defined assembly is arranged to system prompt type (TYPE_SYSTEM_ALERT), and other property parameters can continue configuration as required; And in AndroidManifest.xml CONFIG.SYS the authority (" android.permission.SYSTEM_ALERT_WINDOW ") of add-on system notification type.
After user installation realizes the application program of this self-defined assembly, can configure this assembly and whether show.When assembly is configured to the state showing, no matter current what program is being carried out, this self-defined assembly all can be presented in the mode of floating frame the last layer of all programs always.
The present embodiment passes through such scheme, the application program of self-defined assembly is added in application window management control, and the TYPE property parameters of self-defined assembly is arranged to system prompt type, in the time that user installation also need to show this self-defined assembly, no matter current carrying out other what application programs, this assembly all can be presented in the mode of floating frame the last layer of all programs always; Can, by this assembly information that reminding user should be noted that immediately, realize the timely prompting of information thus, be conducive to improve user's operating efficiency.
As shown in Figure 5, second embodiment of the invention proposes a kind of assembly display device of floating, and on the basis of above-mentioned the first embodiment, also comprises: rewritemodule 204 andinteractive operation module 205, wherein:
Rewrite module 204, for the application program of self-defined assembly being added into described application window management control ininterpolation module 202, and the TYPE property parameters of described self-defined assembly is arranged to after system prompt type, rewrite the event handling function in the application program of described self-defined assembly; Specifically for rewriteeing event response and the logical process function that in described self-defined assembly, each child control is corresponding.
Interactive operation module 205, for receiving user's move operation instruction; According to described move operation instruction, the position of mobile described self-defined assembly; In another embodiment, thisinteractive operation module 205 is also for receiving user's click commands; According to described click commands, carry out in interface in current application program, call other corresponding application programs in the floating frame of described self-defined assembly.
The difference of the present embodiment and above-mentioned the first embodiment is, the present embodiment, self-defined assembly is presented to the last layer of all programs in the mode of floating frame after, can be realized the move operation of user to this self-defined assembly and the interactive operation with this self-defined assembly.
Particularly, by addingmodule 202, the application program of this self-defined assembly is added in described application window management control, in the time the application program of self-defined assembly being added in described application window management control, the TYPE property parameters of described self-defined assembly is arranged to system prompt type (TYPE_SYSTEM_ALERT), and other property parameters can continue configuration as required; And in AndroidManifest.xml CONFIG.SYS the authority (" android.permission.SYSTEM_ALERT_WINDOW ") of add-on system notification type.
Simultaneously,rewrite module 204 and rewrite the event handling functions such as onTouchEvent/dispatchKeyEvent in the application program of self-defined assembly, by rewriteeing the event handling functions such as onTouchEvent/dispatchKeyEvent in the application program of self-defined assembly, thereby realize the event response to each child control of self-defined assembly the inside and carry out logical process.User can move the active window of this self-defined assembly to preposition; Button or the picture that can also click some regions in self-defined assembly carry out interactive operation.Such as starting other programs in the floating frame of self-defined assembly, close music and controlling network switching etc.
Be exemplified below, in the prior art, if user wants to start other programs or uses certain function while using some application programs, need to first exit current application program and get back to desktop, and then find other application programs or certain function that need startup, finally could use this application program or function; And adopt the present embodiment scheme, can, directly in the current application program of carrying out, directly use other application programs or function by self-defined assembly, thus, that has realized information presents processing fast, has improved greatly user's operating efficiency, has met user's request.
No matter current the present embodiment is by such scheme, when user installation and need to show this self-defined assembly time, carrying out other what application programs, and this assembly all can be presented in the mode of floating frame the last layer of all programs always; And user can also move the position of this assembly, also can click assembly and carry out corresponding interactive operation, as start other programs, close music, control network switching etc., realize thus prompting and the fast processing of information, improve user's operating efficiency.
The foregoing is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or flow process conversion that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical field, be all in like manner included in scope of patent protection of the present invention.