Icon alignment schemes and device
Technical field
The present invention relates to technical field of image processing, and in particular to a kind of icon alignment schemes and device.
Background technology
In existing terminal device, in order that display interface more neat appearance, multiple icons in usual display interface are adopted
Arranged with predetermined arrangement mode, there is identical height per a line icon, each row icon has identical width.
Under some specific application environments, it is desirable to after user performs drag operation, page turn over operation, in new display interface, the first row
Icon can align with the coboundary of the effective display area domain of display interface or first row icon can be with effective display area domain
Left margin alignment.Inventor has found that user typically can be quick with finger when pulling screen during the present invention is realized
Slide screen and lift finger afterwards, now the icon list meeting fast scroll in display interface, after icon list stops rolling,
Just perform automatic aligning operation.Therefore, user can be appreciated that icon list is first static and get off, and then roll again automatic to perform
Alignment operation, this process can produce stronger pause and transition in rhythm or melody sense, influence Consumer's Experience.
The content of the invention
The embodiment of the present invention will be solved after user quickly pulls screen in the prior art, icon experience fast scroll, it is static,
Roll with pause and transition in rhythm or melody sense caused by the process of automatic aligning.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of icon alignment schemes, comprise the following steps:
In response to user operation instruction, the operation for rolling icon list is performed, figure is detected in icon list rolling process
Mark the rolling speed of list;
When the rolling speed is identical with predetermined threshold value trigger icon alignment operation, make the first row in current display interface/
Upper edge/left margin of row icon keeps overlapping with the upper edge of effective display area domain/left margin.
Alternatively, in above-mentioned icon alignment schemes, in response to user operation instruction, the behaviour for rolling icon list is performed
Make, specifically included in the step of monitoring the rolling speed of icon list:
Initial rolling speed and acceleration are obtained according to the user operation instruction;
According to the initial time of current time and response user operation instruction, obtain and roll the duration;
According to the initial rolling speed, the acceleration and the rolling for rolling duration real-time calculation icon list
Dynamic speed.
Alternatively, in above-mentioned icon alignment schemes, initial rolling speed and acceleration are obtained according to user operation instruction
The step of in specifically include:
If the user operation instruction is the operation of slip screen, it is determined that is slided corresponding to the operation for sliding screen
Time and slide displacement;
According to the sliding time and the slide displacement, it is determined that initial rolling speed and acceleration.
Alternatively, in above-mentioned icon alignment schemes, in response to user operation instruction, the behaviour for rolling icon list is performed
Make, specifically included in the step of monitoring the rolling speed of icon list:
Number of lines of pixels/columns that icon list enters in effective display area domain in the unit interval is obtained, as icon list
Rolling speed.
Alternatively, in above-mentioned icon alignment schemes, when the rolling speed is identical with predetermined threshold value icon is triggered to align
Operation, makes upper edge/left side of upper edge/left margin of the first row/column icon and effective display area domain in current display interface
Specifically included along in the step of keeping overlapping:
When the rolling speed is identical with predetermined threshold value, the position of most previous row/column icon in effective display area domain is obtained
Put;
If more than half content of the most previous row/column icon is in effective display area domain, by the most previous row/column figure
It is denoted as the first row/column icon, otherwise using next row/column icon of the most previous row/column icon as the first row/column icon;;
Icon alignment operation is triggered, upper edge/left margin of the first row/column icon in current display interface is shown with effective
Show that the upper edge/left margin in region keeps overlapping.
Alternatively, in above-mentioned icon alignment schemes, when the rolling speed is identical with predetermined threshold value icon is triggered to align
Operation, makes upper edge/left side of upper edge/left margin of the first row/column icon and effective display area domain in current display interface
Along in the step of keeping overlapping:The predetermined threshold value meets following condition:Icon height/2* detection cycles>Predetermined threshold value>0, or
Icon width/2* detection cycles>Predetermined threshold value>0;Wherein, detection cycle is the detection cycle of the rolling speed of icon list.
Based on same inventive concept, the embodiment of the present invention also provides a kind of icon alignment means, including:
Speed acquiring module, in response to user operation instruction, the operation for rolling icon list is performed, is rolled in icon list
During detect icon list rolling speed;
Alignd trigger module, and icon alignment operation is triggered when the rolling speed is identical with predetermined threshold value, makes currently to show
Upper edge/left margin of the first row/column icon keeps overlapping with upper edge/left margin of effective display area domain in interface.
Alternatively, above-mentioned icon alignment means, the speed acquiring module are specifically used for:
Initial rolling speed and acceleration are obtained according to the user operation instruction;
According to the initial time of current time and response user operation instruction, obtain and roll the duration;
According to the initial rolling speed, the acceleration and the rolling for rolling duration real-time calculation icon list
Dynamic speed.
Alternatively, above-mentioned icon alignment means, in the speed acquiring module:
If the user operation instruction is the operation of slip screen, it is determined that is slided corresponding to the operation for sliding screen
Time and slide displacement;
According to the sliding time and the slide displacement, it is determined that initial rolling speed and acceleration.
Alternatively, above-mentioned icon alignment means, the speed acquiring module are specifically used for:
Number of lines of pixels/columns that icon list enters in effective display area domain in the unit interval is obtained, as icon list
Rolling speed.
Alternatively, above-mentioned icon alignment means, the alignment trigger module are specifically used for:
When the rolling speed is identical with predetermined threshold value, the position of most previous row/column icon in effective display area domain is obtained
Put;
If more than half content of the most previous row/column icon is in effective display area domain, by the most previous row/column figure
It is denoted as the first row/column icon, otherwise using next row/column icon of the most previous row/column icon as the first row/column icon;;
Icon alignment operation is triggered, upper edge/left margin of the first row/column icon in current display interface is shown with effective
Show that the upper edge/left margin in region keeps overlapping.
Alternatively, above-mentioned icon alignment means, it is described alignment trigger module in:
The predetermined threshold value meets following condition:Icon height/2* detection cycles>Predetermined threshold value>0, or icon width/2*
Detection cycle>Predetermined threshold value>0;Wherein, detection cycle is the detection cycle of the rolling speed of icon list.
Compared with prior art, above-mentioned technical proposal provided in an embodiment of the present invention at least has the advantages that:
Icon alignment schemes and device described in the embodiment of the present invention, in response to user operation instruction, perform and roll icon
The operation of list, the rolling speed of icon list is detected in icon list rolling process;The rolling speed and predetermined threshold value
Icon alignment operation is triggered when identical, makes upper edge/left margin of the first row/column icon and effectively display in current display interface
The upper edge in region/left margin keeps overlapping.That is, before icon list stops rolling, triggering automatic aligning operation, user is not
It may feel that icon list stops the state rolling, the process of icon alignment can be completed smoothly naturally, lift Consumer's Experience.
Brief description of the drawings
Fig. 1 is the flow chart of icon alignment schemes described in one embodiment of the invention;
Fig. 2 is the flow chart of step S101 implementation method in Fig. 1 described in one embodiment of the invention;
Fig. 3 is the flow chart of step S102 implementation method in Fig. 1 described in one embodiment of the invention;
Fig. 4 is the theory diagram of icon alignment means described in one embodiment of the invention;
Fig. 5 is the hardware architecture diagram for the electronic equipment that icon alignment schemes are performed described in one embodiment of the invention.
Embodiment
Embodiment 1
The present embodiment provides a kind of icon alignment schemes, applied in terminal device, as shown in figure 1, comprising the following steps:
S101:In response to user operation instruction, the operation for rolling icon list is performed, is examined in icon list rolling process
Survey the rolling speed of icon list;Wherein user operation instruction can use a variety of implementations, such as show in display interface
That shows is used to indicate the indication key of rotating direction, and when user clicks on or touches the indication key, icon list is according to corresponding rolling square
To being rolled.Or user slide screen, when user's upward sliding screen, icon list scrolls down through, when user to
During left slip screen, icon list scrolls right, and in addition user operation instruction is also possible to be to rock terminal device, make terminal
Equipment keeps certain angle of inclination etc..After user operation instruction is monitored, icon list is rolled according to user operation instruction
It is dynamic.
S102:Icon alignment operation is triggered when the rolling speed is identical with predetermined threshold value, makes in current display interface the
Upper edge/left margin of one row/column icon keeps overlapping with the upper edge of effective display area domain/left margin.Wherein, predetermined threshold value
It can be obtained, be pre-stored within the memory unit of terminal device by the mode of demarcating.It will can be got in step S101
Icon list rolling speed compared with the predetermined threshold value, when finding that the rolling speed is identical with predetermined threshold value if
Trigger automatic aligning operation.Wherein, the predetermined threshold value must be greater than zero.The selected of the predetermined threshold value can not be too small, otherwise touches
The opportunity of hair automatic aligning is too early, and user loses the effect experience of quick sliding, and selection is too late again to of the prior art
Frustrate the improvement unobvious of sense.The given threshold can be obtained by the mode of demarcating.In addition, the situation of scroll-up/down, in display interface
The upper edge of the first row icon keeps overlapping with the upper edge of effective display area domain, first in the situation display interface that left and right rolls
The left margin of row icon keeps overlapping with the left margin of effective display area domain.
The such scheme of the present embodiment, before icon list stops rolling, triggering automatic aligning operation, user will not feel
Feel that icon list stops the state rolling, the process of icon alignment can be completed smoothly naturally.
Embodiment 2
In the present embodiment, as shown in Fig. 2 being specifically included in step S101:
S201:Initial rolling speed and acceleration are obtained according to the user operation instruction;Specifically, can be in advance by basis
The various operational orders of user set corresponding rolling speed and acceleration, and the corresponding relation is stored.It is if for example, described
User operation instruction is to slide the operation of screen, it is determined that sliding time corresponding to the operation for sliding screen and slip position
Move;According to the sliding time and the slide displacement, it is determined that initial rolling speed and acceleration.Or by setting terminal
The standby mode for keeping certain angle of inclination is as user operation instruction, then according to the size at angle of inclination, incline direction
Initial rolling speed and acceleration.
S202:According to the initial time of current time and response user operation instruction, obtain and roll the duration;For end
For end equipment, system clock is fixed, therefore is readily available current time and responds the initial of user operation instruction
Time, the duration is rolled so as to obtain.
S203:According to the initial rolling speed, the acceleration and the rolling duration real-time calculation icon row
The rolling speed of table.
The present embodiment also provides a kind of implementation, in above-mentioned steps S101, obtains icon list in the unit interval and enters
Enter number of lines of pixels/columns in effective display area domain, the rolling speed as icon list.The icon number included in icon list
And interval between the height of each icon, width and icon is all to determine, and the picture that effective display area domain includes
What plain line number and columns were also to determine.Therefore, icon list can obtain column of icons in adjacent detection cycle in rolling process
Line number/columns of the same icon shared by effective display area domain in table, you can obtain icon list in the unit interval and enter
Number of lines of pixels/columns in effective display area domain, has correspondingly just obtained the rolling speed of icon list.
Embodiment 3
The icon alignment schemes that the present embodiment provides, on the basis of above-described embodiment, the step S102 can be by such as
Lower step is realized:
S301:When the rolling speed is identical with predetermined threshold value, most previous row/column icon in effective display area domain is obtained
Position.As it was previously stated, the number of lines of pixels and columns of position correspondence in icon list where each icon are fixed, because
This should can access the position where the icon included in effective display area domain and each icon at any time.
S302:If more than half content of the most previous row/column icon is in effective display area domain, and this is most previous
Row/column icon as the first row/column icon, otherwise using next row/column icon of the most previous row/column icon as the first row/
Row icon;.For example, icon list scroll-up/down, the height of icon is the height of 10 row pixels, between adjacent rows icon between
It is divided into 2 row pixels talls.Have if trigger automatic aligning, in the icon of most previous row 1/5 part (, that is to say, that 2 row pictures
The part of plain height) not in effective display area domain, the part of remaining 8 row pixels talls is also in effective display area domain
It is interior, then if using the next line icon of most previous row icon as the first row icon, next line icon is in alignment operation
When, at least to move the distances of 10 row pixels talls, and if now will most previous row icon as the first row icon, then right
The height of mobile 2 row pixels is only needed during neat operation, in this case can will most previous row icon as the first row icon.
S303:Trigger icon alignment operation, make in current display interface upper edge/left margin of the first row/column icon with
The upper edge of effective display area domain/left margin keeps overlapping.For the icon list that left and right rolls, the figure with scroll-up/down
It is identical to mark the principle of list, repeats no more.
It is further preferred that in above-mentioned steps:The predetermined threshold value meets following condition:Icon height/2* detection cycles>
Predetermined threshold value>0, or icon width/2* detection cycles>Predetermined threshold value>0;Wherein, detection cycle is the rolling speed of icon list
Detection cycle.Wherein, detection cycle is the detection cycle of the rolling speed of icon list, and correspondingly the detection cycle is also to be whole
The work period of individual method flow.For the automatic aligning operation of icon list, the speed in alignment procedure is moved for icon
Dynamic displacement and the ratio of detection cycle, and the displacement of icon movement is farthest not over the height or width of icon, this implementation
Think in example, when carrying out alignment operation to a certain row/column icon, if the side alignd or alignd downwards upwards can be used
Formula, then should be defined by a most short direction of displacement, perform alignment operation.Therefore, the present embodiment provides above-mentioned pre-
If the range of choice of threshold value.Value range of the scope equivalent to the rolling speed of icon list in automatic aligning operating process.I.e.
Ensure rolling speed icon list triggers automatic aligning operation in rolling when as far as possible, with performing rolling during automatic aligning
Speed is close, so as to eliminate pause and transition in rhythm or melody sense.
Embodiment 4
The present embodiment provides a kind of icon alignment means, applied in terminal device, as shown in figure 4, including:
Speed acquiring module 401, in response to user operation instruction, the operation for rolling icon list is performed, in icon list
The rolling speed of icon list is detected in rolling process.Wherein user operation instruction can use a variety of implementations, such as
What is shown in display interface is used to indicate the indication key of rotating direction, and when user clicks on or touches the indication key, icon list is pressed
Photograph answers rotating direction to be rolled.Or user slides screen, when user's upward sliding screen, icon list is rolled downwards
Dynamic, when user slides screen to the left, icon list scrolls right, and in addition user operation instruction is also possible to be to rock terminal
Equipment, terminal device is set to keep certain angle of inclination etc..After user operation instruction is monitored, icon list operates according to user
Instruction is rolled.
Alignd trigger module 402, and icon alignment operation is triggered when the rolling speed is identical with predetermined threshold value, is made current aobvious
Show that upper edge/left margin of the first row/column icon keeps overlapping with upper edge/left margin of effective display area domain in interface.Its
In, predetermined threshold value can be obtained by the mode of demarcating, and be pre-stored within the memory unit of terminal device.The figure that will be got
Mark list rolling speed compared with the predetermined threshold value, when finding that the rolling speed is identical with predetermined threshold value if trigger
Automatic aligning operates.Wherein, the predetermined threshold value must be greater than zero.The selected of the predetermined threshold value can not be too small, otherwise triggers certainly
The opportunity of dynamic alignment is too early, and user loses the effect experience of quick sliding, and selection is too late again to pause and transition in rhythm or melody sense of the prior art
Improvement unobvious.The given threshold can be obtained by the mode of demarcating.In addition, the situation of scroll-up/down, first in display interface
The upper edge of row icon keeps overlapping with the upper edge of effective display area domain, first row figure in the situation display interface that left and right rolls
Target left margin keeps overlapping with the left margin of effective display area domain.
The such scheme of the present embodiment, before icon list stops rolling, triggering automatic aligning operation, user will not feel
Feel that icon list stops the state rolling, the process of icon alignment can be completed smoothly naturally.
As a kind of optional implementation, the speed acquiring module 401 is specifically used for:
Initial rolling speed and acceleration are obtained according to the user operation instruction;
According to the initial time of current time and response user operation instruction, obtain and roll the duration;
According to the initial rolling speed, the acceleration and the rolling for rolling duration real-time calculation icon list
Dynamic speed.
If for example, operation of the user operation instruction for slip screen, it is determined that the operation for sliding screen is corresponding
Sliding time and slide displacement;According to the sliding time and the slide displacement, it is determined that initial rolling speed and acceleration.
Or it is used as user operation instruction by way of terminal device is kept certain angle of inclination, then according to angle of inclination
Size, incline direction can initially rolling speed and acceleration.For terminal device, system clock be it is fixed, therefore
It is readily available current time and responds the initial time of user operation instruction, the duration is rolled so as to obtain.
The present embodiment also provides a kind of implementation, and the speed acquiring module 401 is specifically used for:
Number of lines of pixels/columns that icon list enters in effective display area domain in the unit interval is obtained, as icon list
Rolling speed.
Interval between the icon number and the height of each icon, width and the icon that are included in icon list is all
Determine, and the number of lines of pixels that includes of effective display area domain and columns are also to determine.Therefore, icon list is in rolling process
In, the line number/columns shared in effective display area domain of the same icon in adjacent detection cycle in icon list can be obtained,
Number of lines of pixels/columns that icon list enters in effective display area domain in the unit interval can be obtained, is correspondingly just schemed
Mark the rolling speed of list.
The present embodiment also provides a kind of preferred scheme, and on the basis of such scheme, the alignment trigger module 402 is specific
For:
When the rolling speed is identical with predetermined threshold value, the position of most previous row/column icon in effective display area domain is obtained
Put;As it was previously stated, the number of lines of pixels and columns of position correspondence in icon list where each icon are fixed, therefore
Any time should can access the position where the icon included in effective display area domain and each icon.
If more than half content of the most previous row/column icon is in effective display area domain, by the most previous row/column figure
It is denoted as the first row/column icon, otherwise using next row/column icon of the most previous row/column icon as the first row/column icon;;
Icon alignment operation is triggered, upper edge/left margin of the first row/column icon in current display interface is shown with effective
Show that the upper edge/left margin in region keeps overlapping.
For example, icon list scroll-up/down, the height of icon is the height of 10 row pixels, between adjacent rows icon between
It is divided into 2 row pixels talls.If trigger automatic aligning, there is 1/5 part (that is 2 row picture in the icon of most previous row
The part of plain height) not in effective display area domain, the part of remaining 8 row pixels talls is also in effective display area domain
It is interior, then if using the next line icon of most previous row icon as the first row icon, next line icon is in alignment operation
When, at least to move the distances of 10 row pixels talls, and if now will most previous row icon as the first row icon, then right
The height of mobile 2 row pixels is only needed during neat operation, in this case can will most previous row icon as the first row icon.For
It is identical with the principle of the icon list of scroll-up/down for the icon list that left and right rolls, repeat no more.
In such scheme, the predetermined threshold value can be obtained by way of demarcation, in the present embodiment, the alignment trigger mode
In block 402:
The predetermined threshold value meets following condition:Icon height/2* detection cycles>Predetermined threshold value>0, or icon width/2*
Detection cycle>Predetermined threshold value>0;Wherein, detection cycle is the detection cycle of the rolling speed of icon list.
Wherein, detection cycle is the detection cycle of the rolling speed of icon list, and correspondingly the detection cycle is also whole
The work period of method flow.For the automatic aligning operation of icon list, the speed in alignment procedure moves for icon
Displacement and detection cycle ratio, and icon movement displacement farthest not over the height or width of icon, the present embodiment
In think, when carrying out alignment operation to a certain row/column icon, alignd upwards or by the way of aliging downwards if can use,
It should be so defined by a most short direction of displacement, perform alignment operation.Therefore, the present embodiment provides above-mentioned default threshold
The range of choice of value.Value range of the scope equivalent to the rolling speed of icon list in automatic aligning operating process.To the greatest extent may be used
The guarantee icon list of energy triggers rolling speed during automatic aligning operation in rolling, with performing rolling speed during automatic aligning
It is close, so as to eliminate pause and transition in rhythm or melody sense.
Embodiment 5
The embodiment of the present application provides a kind of nonvolatile computer storage media, and the computer-readable storage medium is stored with
Computer executable instructions, the computer executable instructions can perform the icon alignment schemes in above-mentioned any means embodiment.
Embodiment 6
Fig. 5 be the present embodiment provide execution icon alignment schemes electronic equipment hardware architecture diagram, the equipment
Including:
One or more processors 501 and memory 502, in Fig. 5 by taking a processor 501 as an example.
Performing the equipment of icon alignment schemes can also include:Input unit 503 and output device 504.
Processor 501, memory 502, input unit 503 and output device 504 can pass through bus or other modes
Connect, in Fig. 5 exemplified by being connected by bus.
Memory 502 is used as a kind of non-volatile computer readable storage medium storing program for executing, available for storage non-volatile software journey
Sequence, non-volatile computer executable program and module, the program as corresponding to the icon alignment schemes in the embodiment of the present application
Instruction/module (for example, speed acquiring module 401, alignment trigger module 402 shown in accompanying drawing 4).Processor 501 passes through operation
Non-volatile software program, instruction and the module being stored in memory 502, so as to the various function application of execute server
And data processing, that is, realize the icon alignment schemes of above method embodiment.
Memory 502 can include storing program area and storage data field, wherein, storing program area can store operation system
Application program required for system, at least one function;Storage data field can store to be created according to using for icon alignment means
Data etc..In addition, memory 502 can include high-speed random access memory, nonvolatile memory, example can also be included
Such as at least one disk memory, flush memory device or other non-volatile solid state memory parts.In certain embodiments, deposit
Reservoir 502 is optional including that can pass through network connection relative to the remotely located memory of processor 501, these remote memories
To icon alignment means.The example of above-mentioned network includes but is not limited to internet, intranet, LAN, mobile radio communication
And combinations thereof.
Input unit 503 can receive the numeral or character information of input, and produce and set with the user of icon alignment means
Put and the input of key signals that function control is relevant.Output device 504 may include the display devices such as display screen.
One or more of modules are stored in the memory 502, when by one or more of processors
During 501 execution, the icon alignment schemes in above-mentioned any means embodiment are performed.
The said goods can perform the method that the embodiment of the present application is provided, and possesses the corresponding functional module of execution method and has
Beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the method that the embodiment of the present application is provided.
The electronic equipment of the embodiment of the present invention exists in a variety of forms, includes but is not limited to:
(1) mobile communication equipment:The characteristics of this kind equipment is that possess mobile communication function, and to provide speech, data
Communicate as main target.This Terminal Type includes:Smart mobile phone (such as iPhone), multimedia handset, feature mobile phone, and it is low
Hold mobile phone etc..
(2) super mobile personal computer equipment:This kind equipment belongs to the category of personal computer, there is calculating and processing work(
Can, typically also possess mobile Internet access characteristic.This Terminal Type includes:PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device:This kind equipment can show and play content of multimedia.The kind equipment includes:Audio,
Video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigation equipment.
(4) server:The equipment for providing the service of calculating, the composition of server are total including processor, hard disk, internal memory, system
Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, therefore in processing energy
Power, stability, reliability, security, scalability, manageability etc. require higher.
(5) other electronic installations with data interaction function.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can
To be or may not be physically separate, it can be as the part that unit is shown or may not be physics list
Member, you can with positioned at a place, or can also be distributed on multiple NEs.It can be selected according to the actual needs
In some or all of module realize the purpose of this embodiment scheme.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on
The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should
Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers
Make to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation
Method described in some parts of example or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and
Scope.