A kind of desktop application icon is across screen merging method
Technical field
The present invention relates to a kind of application program of mobile phone disposal route, particularly about a kind of desktop application icon that a plurality of application icons are merged across screen merging method.
Background technology
At present, when desktop application icon is merged in smart mobile phone, user carries out union operation after the application icon of wanting to merge need to being dragged to another icon, if in this document folder of wanting the application icon on other screens also to merge, need to be by the icon on other screens by the long page by dragging to file place after operating, just can be put in this document folder, if need to frequently carry out above operation while wanting a plurality of application icons to merge to a file, more loaded down with trivial details.
Summary of the invention
For the problems referred to above, the object of this invention is to provide a kind of desktop application icon across screen merging method, troublesome operation when the method can effectively avoid a plurality of application icons of mobile phone desktop to merge, improves operating efficiency.
For achieving the above object, the present invention takes following technical scheme: a kind of desktop application icon is across screen merging method, it comprises the following steps: 1) desktop is long by event sniffer to all icon registrations, while pressing desktop icons with the head of a household, operating system is obtained with the head of a household by event the length of calling registration by event sniffer; Desktop receives long by event, in traversal desktop, except the icon being long pressed, all icons are done and are dwindled animation, reduced icon enters editing mode, and by operating system, is adopted the mode of drawing delete button to be set respectively and to add grouping button the long lower left corner and the upper right corner of pressing icon; 2) desktop adds click event to all icons, after user's clickable icon, trigger click event, operating system judges that whether desktop is in editing mode, if in editing mode, this clickable icon is done to amplification animation, and the icon of click is joined in the group icons set of operating system; 3) user's toggle screen that horizontally slips, selects the application icon to be combined in each screen, its method of operating and step 2) in like manner; 4) user clicks and to choose icon, and operating system judgement click location x axle, y axial coordinate on the table, if click location in the grouping button area in the clicked icon upper right corner, enters the flow process of dividing into groups in step 5); If click location, in the delete button region in the clicked icon lower left corner, calls by operating system the interface of deleting application program; 5) first desktop creates new file and is hidden in clicked icon place in click location, then according to the APP icon of group icons set in operating system, create new icon, and add the superiors of desktop screen to, and by new icon moving to new folder position; Again the clicked icon in group icons set is joined in new folder successively, delete new icon simultaneously; Finally show new folder; 6) after having divided into groups, all icons exit editing mode, return to life size, merged icon can be had vacant position in former screen, operating system travels through all desktop screen, and icon is added in the original data acquisition of operating system according to sequencing, according to the order in data acquisition, put successively in screen, realize icon is below moved forward to the part that fills a vacancy; 7) after icon has merged, by operating system notification data processing module, all picture mark position information in desktop screen is synchronized in database, after starting next time, user's grouping information can not disappear.
Further, in described step 1), except described in the icon that is long pressed all icons dwindle method and be: first, by function enterScale (), all icons on desktop are done and are dwindled animation operation, if have icon in deflated state, do not process; Otherwise, all icons that dwindle are created respectively to an animate object; Secondly, animate object is arranged the animation duration, by function setInterpolator (), animation broadcasting form is set by function setDuration (); Finally, by function addUpdatelistener (), animation audiomonitor is set, by animation audiomonitor, the animation process of dwindling listening to is transferred to operating system, after listening to animation and completing, by operating system, changed the size of icon to be dwindled.
Further, in described step 1), described desktop registration length by event sniffer method is: by function setOnLongClickListener() will grow by event sniffer and all icons association of desktop, each icon is added to the long event sniffer of pressing.
Further, described step 2) in, the method that described clickable icon is amplified animation is: first, by function exitScale (), clicked icon on desktop is done to amplification animation operation, if clickable icon is in magnifying state, do not process; Otherwise, clickable icon is created to an animate object; Secondly, animate object is arranged the animation duration, by function setInterpolator (), animation broadcasting form is set by function setDuration (); Finally, by function addUpdatelistener (), animation audiomonitor is set, by animation audiomonitor, the animation amplification process listening to is transferred to operating system, after listening to animation and completing, by operating system, change and treat enlarged drawing target size, amplify clickable icon.
Further, in described step 5), the creation method of described new icon is: first, by function creatDragBitmap (), create a new icon, by function getLocationInDragLayer (), get the position of clicked icon in desktop screen; Secondly, the x shaft position according to the new icon of the position calculation of clicked icon in desktop screen and y shaft position; Finally, according to the x axle calculating and y shaft position, new icon is placed on to this position, completes the interpolation of the new icon of desktop screen, and in desktop screen, show animation.
The present invention is owing to taking above technical scheme, it has the following advantages: 1, the present invention is long by event sniffer owing to adopting all icon registrations, and delete button is set respectively and adds grouping button in the long lower left corner and the upper right corner of pressing icon, make the editor of application icon faster, more convenient, all application icons of user are classified, create a plurality of files, improved operating efficiency and user's impression.2, the present invention is long by any application icon in desktop, figure rotating savings enters into editing mode, click wants to merge to an application icon in file, also can select the application icon on other screens, the any application icon of click after selection completes, application meeting merges to all icons of just now selecting in a file automatically, comprises the application icon on other screens, thereby reduce the number of times of user to same operation, saved user time.3, the present invention does not need application icon drag (or dragging across screen) one by one to carry out union operation, efficiently solve across merging application icon complex operation between screen, need to repeatedly drag and icon could be merged to a problem in file, and across between screen, drag operation that application icon merges compare can be more loaded down with trivial details between same screen problem.4, the present invention can reduce the number of occurrence of user to same operation by not carrying out the disposable same file folder that merges at the application icon of same screen, has met sooner, more easily user's demand.The present invention can extensively apply in smart mobile phone.
Accompanying drawing explanation
Fig. 1 is one-piece construction schematic diagram of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in detail.
As shown in Figure 1, the invention provides a kind of mobile phone desktop application icon across screen merging method, it comprises the following steps:
1) desktop is pressed event sniffer to the registration of all icons is long, and while pressing desktop icons with the head of a household, operating system is obtained with the head of a household by event the length of calling registration by event sniffer; Desktop receives long by event, in traversal desktop, except the icon being long pressed, all icons are done and are dwindled animation, reduced icon enters editing mode, and by operating system, is adopted the mode of drawing delete button to be set respectively and to add grouping button the long lower left corner and the upper right corner of pressing icon;
Wherein, desktop registration length by event sniffer method is: by function setOnLongClickListener() will grow by event sniffer and all icons association of desktop, each icon is added to the long event sniffer of pressing;
Except the icon being long pressed, all icons dwindle method and are: first, by function enterScale (), all icons on desktop are done and dwindled animation operation, if having icon in deflated state, do not process; Otherwise, all icons that dwindle are created respectively to an animate object; Secondly, animate object is arranged the animation duration, by function setInterpolator (), animation broadcasting form is set by function setDuration (); Finally, by function addUpdatelistener (), animation audiomonitor is set, by animation audiomonitor, the animation process of dwindling listening to is transferred to operating system, after listening to animation and completing, by operating system, changed the size of icon to be dwindled, dwindle the size of all icons except being long pressed icon.
2) desktop adds click event (comprise length by icon and dwindle icon) to all icons, after user's clickable icon, trigger click event, operating system judges that whether desktop is in editing mode, if in editing mode, this clickable icon is done to amplification animation, and the icon of click is joined in the group icons set of operating system;
Wherein, the method for clickable icon amplification animation is: first, by function exitScale (), clicked icon on desktop is done to amplification animation operation, if clickable icon is in magnifying state, do not process; Otherwise, clickable icon is created to an animate object; Secondly, animate object is arranged the animation duration, by function setInterpolator (), animation broadcasting form is set by function setDuration (); Finally, by function addUpdatelistener (), animation audiomonitor is set, by animation audiomonitor, the animation amplification process listening to is transferred to operating system, after listening to animation and completing, by operating system, change and treat enlarged drawing target size, amplify clickable icon.
3) user's toggle screen that can horizontally slip, selects the application icon to be combined in each screen, its method of operating and step 2) identical, do not repeat them here.
4) user clicks and to choose icon, and operating system judgement click location x axle, y axial coordinate on the table, if click location in the grouping button area in the clicked icon upper right corner, enters the flow process of dividing into groups in step 5); If click location, in the delete button region in the clicked icon lower left corner, calls by operating system the interface of deleting application program.
5) first desktop creates new file and is hidden in clicked icon place in click location, then according to the APP icon of group icons set in operating system, create new icon DragView, and add the superiors of desktop screen to, and new icon DragView is moved to new folder position; Again the clicked icon in group icons set is joined in new folder successively, delete new icon DragView simultaneously; Finally show new folder;
Wherein, create new icon DragView for animation, and add new icon DragView to desktop screen, the creation method of new icon DragView is: first, by function creatDragBitmap (), create a new icon, by function getLocationInDragLayer (), get the position of clicked icon in desktop screen; Secondly, the x shaft position according to the new icon of the position calculation of clicked icon in desktop screen and y shaft position; Finally, according to the x axle calculating and y shaft position, new icon is placed on to this position, completes the interpolation of the new icon DragView of desktop screen, and in desktop screen, show animation.
6) after having divided into groups, all icons exit editing mode, return to life size, merged icon can be had vacant position in former screen, operating system travels through all desktop screen, and icon is added in the original data acquisition of operating system according to sequencing, according to the order in data acquisition, put successively in screen, realize icon is below moved forward to the part that fills a vacancy.
7) after icon has merged, by operating system notification data processing module, all picture mark position information in desktop screen is synchronized in database, after starting next time, can guarantees that user's grouping information can not disappear.
The various embodiments described above are only for illustrating the present invention; each step and implementation all can change to some extent; on the basis of technical solution of the present invention, all improvement of indivedual steps being carried out according to the principle of the invention and equivalents, all should not get rid of outside protection scope of the present invention.