CN107908344A - Method, apparatus, equipment and the computer-readable recording medium for preventing interface from shaking - Google Patents
Method, apparatus, equipment and the computer-readable recording medium for preventing interface from shaking Download PDFInfo
- Publication number
- CN107908344A CN107908344A CN201711092114.3A CN201711092114A CN107908344A CN 107908344 A CN107908344 A CN 107908344A CN 201711092114 A CN201711092114 A CN 201711092114A CN 107908344 A CN107908344 A CN 107908344A
- Authority
- CN
- China
- Prior art keywords
- slide
- sliding
- mutual exclusion
- glide direction
- sliding trace
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the present invention provides a kind of method, apparatus, equipment and computer-readable recording medium for preventing interface from shaking.The described method includes:If detecting on control the slip event triggered because of slide on multiple and different directions, the sliding time and sliding trace of the slide are obtained;If the sliding time reaches preset time and the slide does not terminate, glide direction is calculated according to the sliding trace currently produced;Pair slip event identical with the glide direction adds mutual exclusion lock;The control response is controlled to add the slip event of mutual exclusion lock;If detecting, the slide terminates, and releases the mutual exclusion lock.The embodiment of the present invention is by calculating the glide direction in preset time, and add mutual exclusion lock for the identical slip event of the glide direction, make the slip for the slip event that the control only responded plus mutual exclusion lock, so avoid the shake of terminal interface caused by slip event on the multiple and different directions triggered by slide.
Description
Technical field
The present invention relates to technical field of information processing, more particularly to a kind of method, apparatus for preventing interface from shaking, equipment and
Computer-readable recording medium.
Background technology
User is frequently encountered the problem of terminal interface shake in the control in operating terminal, such as display web page contents
Webview controls, some regions of the control can trigger the effect for sliding up and down and horizontally slipping at the same time.As webview is controlled
Part is in itself when showing the page with the effect slided up and down, and when webview controls are as being a container, its inside also has it
His some labels, such as show the label of picture, and the label of the display picture has the effect to horizontally slip.Such as use
The plurality of pictures carousel of javascript code buildings, the picture of the carousel have the effect to horizontally slip.The action of user is
It is random, if in the short period of time, the problem of finger of user slides up and down, and shake just occurs in terminal interface.
Finger such as user is placed on the picture of carousel, is sideling slided, and picture tag triggers its corresponding slip event, the slip thing
Part can realize the effect to horizontally slip, and webview controls itself also trigger its corresponding slip event, the slip thing
Part can realize the effect slided up and down, then will detect it is existing horizontally slip and slide up and down, terminal just occurs
Shake, have impact on the experience of user.
The content of the invention
An embodiment of the present invention provides a kind of method, apparatus, equipment and the computer-readable storage medium that prevent interface from shaking
Matter, can prevent the shake of terminal interface caused by multiple slip events in control at the same time there are during multiple slip events.
In a first aspect, an embodiment of the present invention provides a kind of method for preventing interface from shaking, this method includes:
If detecting on control the slip event triggered because of slide on multiple and different directions, obtain and described slide behaviour
The sliding time and sliding trace of work;
If the sliding time reaches preset time and the slide does not terminate, according to the slip rail currently produced
Mark calculates glide direction;
Pair slip event identical with the glide direction adds mutual exclusion lock;
As the direction of the slide and the control is reported to using plus the glide direction of the slip event of mutual exclusion lock
Part, so that the control responds current slide;
If the slide terminates, the mutual exclusion lock is released.
Second aspect, an embodiment of the present invention provides a kind of device for preventing interface from shaking, which includes being used to perform
The unit of the method for preventing interface shake described in above-mentioned first aspect.
The third aspect, the embodiment of the present invention additionally provide a kind of computer equipment, and the computer equipment includes memory,
And the processor being connected with the memory;
The memory is used to store the computer program realized and prevent that interface from shaking, and the processor is used to run described
The computer program stored in memory, to perform the method for preventing interface from shaking described in above-mentioned first aspect.
Fourth aspect, an embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable storage
Media storage has computer program, and the computer program includes programmed instruction, real when described program instruction is executed by processor
The method for preventing interface shake described in existing above-mentioned first aspect.
If the embodiment of the present invention by detect on control because slide and trigger multiple slip events when, obtain institute
State the sliding time and sliding trace of slide;If the sliding time reaches preset time and the slide is not tied
Beam, glide direction is calculated according to the sliding trace currently produced;Pair slip event identical with the glide direction is plus mutual
Reprimand lock;The control response is controlled to add the slip event of mutual exclusion lock;If the slide terminates, the mutual exclusion is released
Lock.The embodiment of the present invention is the identical slip event of the glide direction by calculating the glide direction in preset time
Plus mutual exclusion lock, make the slip for the slip event that the control only responded plus mutual exclusion lock, so avoid because of slide and
The shake of terminal interface caused by slip event on multiple and different directions of triggering.
Brief description of the drawings
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area
For logical technical staff, without creative efforts, other attached drawings can also be obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram of method for preventing interface from shaking provided in an embodiment of the present invention;
Fig. 2 is a kind of sub-process schematic diagram of method for preventing interface from shaking provided in an embodiment of the present invention;
Fig. 3 is the sub-process schematic diagram of method shown in Fig. 2;
Fig. 4 is a kind of sub-process schematic diagram of method for preventing interface from shaking provided in an embodiment of the present invention;
Fig. 5 is a kind of sub-process schematic diagram for method for preventing interface from shaking that another embodiment of the present invention provides;
Fig. 6 is a kind of schematic block diagram of device for preventing interface from shaking provided in an embodiment of the present invention;
Fig. 7 is the schematic block diagram of computing unit provided in an embodiment of the present invention;
Fig. 8 is the schematic block diagram of mean direction computing unit provided in an embodiment of the present invention;
Fig. 9 is the schematic block diagram of locking unit provided in an embodiment of the present invention;
Figure 10 is the schematic block diagram for the computing unit that another embodiment of the present invention provides;
Figure 11 is a kind of schematic block diagram of computer equipment provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without making creative work
Example, belongs to the scope of protection of the invention.
It should be appreciated that ought use in this specification and in the appended claims, term " comprising " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but it is not precluded from one or more of the other feature, whole
Body, step, operation, element, component and/or its presence or addition for gathering.
It will also be understood that refer in description of the invention to the term "and/or" used in the appended claims related
Join any combinations and all possible combinations of one or more of the item listed, and including these combinations.
It will also be understood that although term first, second etc. can be used for describing various elements herein, but these elements should not
This is limited to these terms.These terms are only used for these elements being distinguished from each other out.For example, the scope of the invention is not being departed from
Under the premise of, the first angle can be referred to as the second angle, and similarly, the second angle can be referred to as the first angle.First
Angle and the second angle are angle, but they are not same angle.
In the specific implementation, the terminal described in the embodiment of the present invention is including but not limited to such as with touch sensitive surface
The mobile phone, laptop computer or tablet PC of (for example, touch-screen display and/or touch pad) etc it is portable
Communication equipment.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but with tactile
Touch the desktop computer of sensing surface (for example, touch-screen display and/or touch pad).
In discussion below, the terminal including display and touch sensitive surface is described.It is, however, to be understood that
It is that terminal can include one or more of the other physical User of such as network interface, physical keyboard, mouse and/or control-rod
Interface equipment.
Fig. 1 is a kind of flow diagram of method for preventing interface from shaking provided in an embodiment of the present invention.This method is run
In being provided with the terminal of control, which has sliding effect up and down.As shown in Figure 1, this method includes S101-
S105。
S101, if detecting the multiple slip events triggered on control by slide, obtains the cunning of the slide
Dynamic time and sliding trace.
Such as in the webview controls of display web page contents, webview controls have upper downslide when showing the page in itself
Dynamic effect, when webview controls are as being a container, its some internal also other label, such as shows carousel picture
Label, the picture of the carousel has the effect to horizontally slip.If the finger of user is placed on the picture of carousel, sideling slide
Dynamic, picture tag triggers its corresponding slip event, which can realize the effect to horizontally slip, and webview
Control also triggers its corresponding slip event in itself, which can realize the effect slided up and down, then Jiu Huitong
When detect two slip events:The corresponding slip event of picture tag and the corresponding slip event of webview controls itself.Need
It should be noted that here while be not CPU in terminal think truly while.In fact, detect control
There is priority in the time of two slip events on part, but the time interval of this priority is extremely short, and CPU can be neglected
Slightly.
If detecting the multiple slip events triggered on control by slide, the sliding time of the slide is obtained
And sliding trace.As user's finger is sideling slided, then obtain the sliding time and cunning that sideling slide corresponding slide
Dynamic rail mark.Wherein, sliding time is to detect while there are during multiple slip events, untill current time, correspond to
Slide duration;Corresponding sliding trace is the track slided in sliding time, wherein, sliding trace includes sliding
Movable contact.Sliding contact referred to during slide, the point contacted with terminal that can be identified, a usual slip rail
Mark includes multiple sliding contacts.In the embodiment of the present invention, slide can also include it is multiple, as two hands of user are sliding at the same time
Corresponding slide caused by dynamic, the region of two hand operations of user, which belongs to, can trigger multiple slip events in control
Region.If slide has multiple, such as corresponding slide of two fingers, then corresponding sliding time is obtained, and respectively
Obtain the sliding trace of the corresponding slide of each finger in corresponding sliding time.
S102, if sliding time reaches preset time and slide does not terminate, according to the sliding trace currently produced
Calculate glide direction.
Wherein, preset time can be 200ms.If sliding time reaches preset time and slide does not terminate, such as examine
The finger for measuring user does not leave region where control, and glide direction is calculated according to the sliding trace currently produced;Otherwise,
It is not responding to the slide.Slide has terminated when i.e. sliding time reaches preset time, as sliding time reaches it is default when
Between detect that the finger of user just leaves the region where control, and sliding time be not up to preset time and slide
Terminate, be not up to the region where leaving control if preset time detects the finger of user such as the time slided, be not responding to this
Slide.
Specifically, as shown in Fig. 2, calculating glide direction according to the sliding trace currently produced, i.e. step S102 includes
S201-S202。
S201, the mean direction of the slide carried out is calculated according to the sliding trace currently produced.Wherein, produced
When raw sliding trace can be regarded as reaching preset time, the sliding trace of slide generation.Assuming that have with terminal screen to
Right slip is positive direction of the x-axis, and screen upward sliding is positive direction of the y-axis, and the screen lower left corner is the reference axis of coordinate origin, wherein,
Default axis is x-axis, and the direction for presetting axis is positive direction of the x-axis.
As shown in figure 3, calculating the mean direction of the slide carried out according to the sliding trace currently produced, that is, walk
Rapid S201 includes S301-S304.
S301, multiple sliding contacts are gathered according to the sliding trace currently produced.It is alternatively possible to according to currently having produced
Raw sliding trace gathers multiple sliding contacts in the way of constant duration, can also be according to the slip rail currently produced
Mark gathers multiple sliding contacts in the way of equidistant intervals.Equidistant intervals can be the phase on default axis x-axis direction
Equidistant intervals or equidistance interval in the y-axis direction.Wherein, multiple sliding contacts can be 50 slips
Contact.
S302, determines the line of two neighboring sliding contact and the angle of default axis.Wherein, in the present embodiment, preset
Axis is x-axis, and the direction for presetting axis is positive direction of the x-axis.Two neighboring sliding contact refers to the cunning that same slide produces
Adjacent sliding contact on dynamic rail mark.In other embodiments, default axis can be x-axis, and direction is negative direction of the x-axis;Default axis
Can also be y-axis, direction is positive direction of the y-axis or negative direction of the y-axis.For the sliding contact of all collections, by two neighboring cunning
Movable contact line, and calculate the angle of the line and default axis, specifically, obtains x, the y-coordinate of two sliding contacts, according to x,
Y-coordinate calculates the angle with presetting axis, and the angle such as calculated is 48 degree, and the specific number of degrees can directly be rounded up to whole
Number.If collection has 50 sliding contacts, then can calculate 49 angles.
S303, calculates the average value of fixed all angles.The value of angle that will be all is added, divided by of angle
Number, the value of such as 3 angles is respectively 50 degree, 60 degree, 42 degree, then the average value of 3 angles is (50+60+42)/3=50
Degree.
S304, the mean square for the slide for determining to have carried out according to the direction of the average value of all angles and default axis
To.Specifically, if the average value ranges of all angles are between 315 degree to 45 degree, the mean direction of the slide carried out
It is identical with the direction (positive direction of the x-axis) of default axis;If the average value ranges of all angles have carried out between 135 degree to 225 degree
Slide mean direction it is opposite with the direction (positive direction of the x-axis) of default axis;Otherwise, glide direction is in the vertical of default axis
On direction.Wherein, if the average value ranges of all angles are between 45 degree to 135 degree, the mean square of the slide carried out
To identical with positive direction of the y-axis;At 225 degree to 315 degree, if the slide carried out is averaged the average value ranges of all angles
Direction is opposite with positive direction of the y-axis.
S202, the glide direction for the slide for determining to have carried out according to the mean direction.If the slide carried out
Mean direction it is identical with the direction (positive direction of the x-axis) of default axis, the glide direction of slide for determining to have carried out is to the right
Slide;If the direction (positive direction of the x-axis) of the mean direction of the slide carried out and default axis is on the contrary, the slip carried out
The glide direction of operation is to slide to the left;If the mean direction of the slide carried out is identical with positive direction of the y-axis, that is, carry out
The glide direction of slide be upward sliding;If the mean direction of the slide carried out is with positive direction of the y-axis on the contrary, i.e.
The glide direction of the slide carried out is slide downward.
If the slide detected only has one, the sliding trace currently produced according to a slide calculates
The mean direction of the slide carried out, the cunning for the slide for determining to have carried out in preset time according to the mean direction
Dynamic direction.If the slide detected is corresponding with multiple, such as two slides, two slides have been gathered respectively currently
Multiple sliding contacts on the sliding trace of generation, then determine each sliding trace on two neighboring sliding contact line with
The angle of default axis, and the average value of fixed all angles on each sliding trace is calculated, two average values are obtained,
It is referred to as the first average value and the second average value.Such as the first average value is 42 degree, and the second average value is 60 degree.First is averaged
Value and the second average value are averaged, if the angle after average is (42 degree+60 degree)/2=51 degree, further according to the angle after averagely
And the direction of default axis determines the mean direction of slide that has carried out.So, the slide for determining to have carried out is put down
Equal direction is positive direction of the y-axis, and the glide direction for the slide for determining to have carried out according to the mean direction is upward sliding.
S103, pair slip event identical with the glide direction add mutual exclusion lock.
If the glide direction of two slip events be respectively slide to the right, upward sliding, if according to currently having produced
The glide direction that sliding trace calculates is upward sliding, then the slip event to upward sliding adds mutual exclusion lock.Mutual exclusion lock
Also exclusive lock, exclusive lock etc. are.If creating mutual exclusion lock, the control same time can only respond a slip event, such as plus mutual
The slip event of reprimand lock can be responded always, and other slip events are not responded.
Specifically, as shown in figure 4, pair slip event identical with the glide direction adds mutual exclusion lock, i.e. step S103
Including S401-S403.
S401, judges whether to create the mutual exclusion lock of control.
S402, if not creating the mutual exclusion lock of control, creates the mutual exclusion lock of control.The mutual exclusion lock of control can deposited
, it can be understood as, the mutual exclusion lock of control has just been created before this step is performed.If the mutual exclusion lock of control is not
In the presence of, then need to create the mutual exclusion lock of control, it can be understood as, create the mutual exclusion lock that control responds slip event.
S403, pair slip event identical with the glide direction is plus the mutual exclusion lock created.It is to be appreciated that with it is described
The identical slip event of glide direction can be responded always.And in the preset time before plus mutual exclusion lock, it is not responding to slide
Operation.
The sliding trace that above-mentioned basis has currently produced calculates glide direction, and pair cunning identical with the glide direction
Dynamic event adds mutual exclusion lock, sliding time reach preset time and slide it is unclosed under the conditions of complete.
S104, the response of control control have added the slip event of mutual exclusion lock.If slide does not terminate, control control is only rung
The slip event of mutual exclusion lock should be added.If plus mutual exclusion lock slip event glide direction before plus mutual exclusion lock upwards
Slide, plus still upward sliding after mutual exclusion lock, then it is corresponding that the glide direction of upward sliding is reported to control, so that control
Part responds the upward sliding of the slip event.If plus mutual exclusion lock slip event glide direction in the forward direction plus mutual exclusion lock
Upper slip, plus slide downward in a period of time after mutual exclusion lock, then the corresponding slip by the slide downward in the time
Direction is reported to control, so that control responds the slide downward of the slip event.In this way, control response slip event can be improved
Accuracy.
S105, if detecting, slide terminates, and releases the mutual exclusion lock.Wherein, release and can be regarded as discharging or sell
Ruin.If there is multiple slides, such as two slides, slide terminate, it will be appreciated that are that two slides have all been tied
Beam, or one of slide terminate.One of slide terminates, and is considered as slide and terminates, it can be understood as,
If an only slide, control need to only respond the slip event of the slide, and there is no multiple slip events
Situation, also just there is no shake situation.
If above-described embodiment detects the multiple slip events triggered on control by slide excessively all, institute is obtained
State the sliding time and sliding trace of slide;If the sliding time reaches preset time and the slide is not tied
Beam, glide direction is calculated according to the sliding trace currently produced;Pair slip event identical with the glide direction is plus mutual
Reprimand lock;Control response is controlled to add the slip event of mutual exclusion lock;If the slide terminates, the mutual exclusion lock is released.This
Inventive embodiments add mutually by calculating the glide direction in preset time, and for the identical slip event of the glide direction
Reprimand lock, makes the slip for the slip event that the control only responded plus mutual exclusion lock, so avoids what is triggered by slide
The shake of terminal interface caused by multiple slip events.
In other embodiments, will be according to current after pair slip event identical with the glide direction adds mutual exclusion lock
The glide direction that the sliding trace produced calculates, as the glide direction of the slip event plus mutual exclusion lock, and controls
Part responds the glide direction.It is it is to be understood that after pair slip event identical with the glide direction adds mutual exclusion lock and sliding
Glide direction that is dynamic to operate in the unclosed time, being calculated according to the sliding trace currently produced, as plus mutual
Denounce the glide direction of the slip event of lock.Hold in slip event in the time of mutual exclusion lock, no matter detect slide when
Between have how long, the glide direction just only calculated according to the current sliding trace produced, as the slip thing plus mutual exclusion lock
The glide direction of part, the glide direction is reported to the control, so that control responds the slip event that this adds mutual exclusion lock.In this way,
Just without after slip event adds mutual exclusion lock, obtaining the sliding contact of corresponding slide and calculating the cunning of slide
Dynamic direction, saves calculation amount, amount of storage, while also save the electricity of terminal.
Fig. 5 is a kind of sub-process schematic diagram of method for preventing interface from shaking provided in an embodiment of the present invention.Such as Fig. 5 institutes
Show, glide direction, including S501-S502 are calculated according to the sliding trace currently produced.
S501, when obtaining the first contact when sliding trace starts according to the sliding trace currently produced and reach default
Between when the second contact.Specifically, the coordinate of the first contact and the second contact is obtained.If slide only has one, obtaining should
The coordinate of second contact of the slide in the coordinate and arrival preset time for sliding the first contact when starting.If slide behaviour
Work has multiple, such as two slides, obtains two slides respectively in the coordinate for sliding the first contact when starting and arrives
The coordinate of the second contact during up to preset time.
S502, the glide direction of slide is determined according to the first contact and the second contact.Wherein, according to the first contact and
Second contact determines that the glide direction of slide includes:Determined according to the direction of the straight line where the first contact and the second contact
The glide direction of slide.If slide only has one, by corresponding first contact of the slide and the second contact into
Row line, and the angle of the line and default axis is calculated, it is true according to the line and the angle of default axis and the direction of default axis
Determine glide direction.Specifically, if the angular range is between 315 degree to 45 degree, glide direction is identical with the direction of default axis, i.e.,
The glide direction for determining slide is to slide to the right;If the angular range between 135 degree to 225 degree, glide direction with it is pre-
If the direction of axis is on the contrary, the glide direction for determining slide is to slide to the left;If the angular range is in 45 to 135 degree
Between, determine that the glide direction of slide is identical with positive direction of the y-axis, i.e. upward sliding;If the angular range is at 225 degree to 315
Between degree, the glide direction of slide is determined with positive direction of the y-axis on the contrary, i.e. slide downward.If having, slide is multiple, such as two
A slide, first carries out line by corresponding first contact of one of slide and the second contact, and calculates the line
With the angle of default axis, it is known as the first angle, if first angle is 42 degree.Again by another slide corresponding first
Contact carries out line with the second contact, and calculates the angle of the line and default axis, is known as the second angle, as second angle is
60 degree.After finally carrying out the first angle and the second angle averagely, determined according to the angle value and the direction of default axis after averagely
Glide direction.Such as (42 degree of+60 degree)/2=51 degree, then the glide direction for determining slide is positive direction of the y-axis, that is, is slid up
It is dynamic.
The embodiment is calculated by obtaining the second contact when sliding the first contact and the arrival preset time when starting
The direction of straight line where first contact and the second contact and the angle of default axis, the slip of slide is determined according to the angle
Direction.
In other embodiments, determine that the glide direction of slide includes according to the first contact and the second contact:According to
The vector of straight line where first contact and the second contact determines the glide direction of slide.If only one is slided behaviour
Make, according to component of the Vector operation of the straight line where the first contact and the second contact on the different directions in reference axis.Such as
If the component in x-axis is more than component on the y axis, and the direction of vector is to the right, then the definite slide carried out
Glide direction is to the right, if component on the y axis is more than the component in x-axis, and the direction of vector is upward, then determine into
The glide direction of capable slide is to first-class.
In above example, if the angle calculated is just 45 degree, 135 degree, 225 degree, 315 degree, these angles correspond to
The glide direction of slide is determined according to preset rules on time point.It is such as sliding according to previous moment (or top n moment)
The glide direction of dynamic operation determines or randomly selects a direction and determines.It is if sliding according to previous moment (or top n moment)
The glide direction of dynamic operation determines, then the glide direction of previous moment (or top n moment) slide is upward sliding,
So these angles correspond to time point upper slide glide direction it is upward.
Fig. 6 is a kind of schematic block diagram of device for preventing interface from shaking provided in an embodiment of the present invention.The device 60 wraps
Acquiring unit 601, computing unit 602 are included, unit 603, control unit 604 is locked, releases lock unit 605.
If acquiring unit 601 is used to detect the multiple slip events triggered by slide on control, the cunning is obtained
The sliding time and sliding trace of dynamic operation.
Such as in the webview controls of display web page contents, webview controls have upper downslide when showing the page in itself
Dynamic effect, when webview controls are as being a container, its some internal also other label, such as shows carousel picture
Label, the picture of the carousel has the effect to horizontally slip.If the finger of user is placed on the picture of carousel, sideling slide
Dynamic, picture tag triggers its corresponding slip event, which can realize the effect to horizontally slip, and webview
Control also triggers its corresponding slip event in itself, which can realize the effect slided up and down, then Jiu Huitong
When detect two slip events:The corresponding slip event of picture tag and the corresponding slip event of webview controls itself.Need
It should be noted that here while be not CPU in terminal think truly while.In fact, detect control
There is priority in the time of two slip events on part, but the time interval of this priority is extremely short, and CPU can be neglected
Slightly.
If detecting the multiple slip events triggered on control by slide, the sliding time of the slide is obtained
And sliding trace.As user's finger is sideling slided, then obtain the sliding time and cunning that sideling slide corresponding slide
Dynamic rail mark.Wherein, sliding time is to detect while there are during multiple slip events, untill current time, correspond to
Slide duration;Corresponding sliding trace is the track slided in sliding time, wherein, sliding trace includes sliding
Movable contact.Sliding contact referred to during slide, the point contacted with terminal that can be identified, a usual slip rail
Mark includes multiple sliding contacts.In the embodiment of the present invention, slide can also include it is multiple, as two hands of user are sliding at the same time
Corresponding slide caused by dynamic, the region of two hand operations of user, which belongs to, can trigger multiple slip events in control
Region.If slide has multiple, such as corresponding slide of two fingers, then corresponding sliding time is obtained, and respectively
Obtain the sliding trace of the corresponding slide of each finger in corresponding sliding time.
If computing unit 602 reaches preset time for sliding time and slide does not terminate, according to currently having produced
Sliding trace calculate glide direction.
Wherein, preset time can be 200ms.If sliding time reaches preset time and slide does not terminate, such as examine
The finger for measuring user does not leave region where control, and glide direction is calculated according to the sliding trace currently produced;Otherwise,
It is not responding to the slide.Slide has terminated when i.e. sliding time reaches preset time, as sliding time reaches it is default when
Between detect that the finger of user just leaves the region where control, and sliding time be not up to preset time and slide
Terminate, be not up to the region where leaving control if preset time detects the finger of user such as the time slided, be not responding to this
Slide.
Specifically, as shown in fig. 7, computing unit 602 includes mean direction computing unit 701, the first determination unit 702.
The computing unit 602 is used to calculate glide direction according to the current sliding trace produced.
Wherein, mean direction computing unit 701 is used to calculate the slip carried out according to the current sliding trace produced
The mean direction of operation.Wherein, when the sliding trace produced can be regarded as reaching preset time, the slip of slide generation
Track.Assuming that having, to be slided to the right with terminal screen as positive direction of the x-axis, screen upward sliding be positive direction of the y-axis, and the screen lower left corner is
The reference axis of coordinate origin, wherein, it is x-axis to preset axis, and it is positive direction of the x-axis to preset direction of principal axis.
As shown in figure 8, mean direction computing unit 701 includes collecting unit 801, angle determination unit 802, average angle
Computing unit 803, mean direction determination unit 804.Collecting unit 801 is used for more according to the current sliding trace collection produced
A sliding contact.It is alternatively possible to multiple cunnings are gathered in the way of constant duration according to the sliding trace currently produced
Movable contact, can also gather multiple sliding contacts according to the sliding trace currently produced in the way of equidistant intervals.Deng
Distance interval can be between the equidistance interval on default axis x-axis direction or equidistance in the y-axis direction
Every.Wherein, multiple sliding contacts can be 50 sliding contacts.Angle determination unit 802 is used to determine that two neighboring slide is touched
The line of point and the angle of default axis.Wherein, in the present embodiment, it is x-axis to preset axis, and direction is positive direction of the x-axis.It is two neighboring
Sliding contact refers to the adjacent sliding contact on the sliding trace that same slide produces.In other embodiments, in advance
If axis can be x-axis, direction is negative direction of the x-axis;Default axis can also be y-axis, and direction is positive direction of the y-axis or negative direction of the y-axis.
For the sliding contact of all collections, by two neighboring sliding contact line, and the angle of the line and default axis is calculated, specifically
Ground, obtains x, the y-coordinate of two sliding contacts, calculates the angle with presetting axis according to x, y-coordinate, the angle such as calculated is
48 degree, the specific number of degrees can directly be rounded up to integer.If collection has 50 sliding contacts, then can calculate 49
A angle.Average angle computing unit 803 is used for the average value for calculating fixed all angles.The value of angle that will be all
It is added, divided by the number of angle, the value of such as 3 angles is respectively 50 degree, 60 degree, 42 degree, then the average value of 3 angles is
(50+60+42)/3=50 degree.Mean direction determination unit 804 is determined according to the average value of all angles and the direction of default axis
The mean direction of the slide carried out.Specifically, if the average value ranges of all angles are between 315 degree to 45 degree,
The mean direction of the slide of progress is identical with the direction (positive direction of the x-axis) of default axis;If the average value ranges of all angles
Between 135 degree to 225 degree, the mean direction of the slide carried out is opposite with the direction (positive direction of the x-axis) of default axis;It is no
Then, glide direction is in the vertical direction of default axis.Wherein, if the average value ranges of all angles are between 45 degree to 135 degree,
The mean direction of the slide carried out is identical with positive direction of the y-axis;If the average value ranges of all angles are at 225 degree to 315
Degree, the mean direction of the slide carried out are opposite with positive direction of the y-axis.
First determination unit 702 is for the glide direction for the slide for determining to have carried out according to the mean direction.If
The mean direction of the slide of progress is identical with the direction (positive direction of the x-axis) of default axis, the definite slide carried out
Glide direction is to slide to the right;If the direction (positive direction of the x-axis) of the mean direction of the slide carried out and default axis on the contrary,
The glide direction of the slide carried out is to slide to the left;If the mean direction of the slide carried out is square with y-axis
To identical, that is, the glide direction of the slide carried out is upward sliding;If the mean direction and y of the slide carried out
Axis positive direction is on the contrary, the glide direction of the slide carried out is slide downward.
If the slide detected only has one, the sliding trace currently produced according to a slide calculates
The mean direction of the slide carried out, the cunning for the slide for determining to have carried out in preset time according to the mean direction
Dynamic direction.If the slide detected is corresponding with multiple, such as two slides, two slides have been gathered respectively currently
Multiple sliding contacts on the sliding trace of generation, then determine each sliding trace on two neighboring sliding contact line with
The angle of default axis, and the average value of fixed all angles on each sliding trace is calculated, two average values are obtained,
It is referred to as the first average value and the second average value.Such as the first average value is 42 degree, and the second average value is 60 degree.First is averaged
Value and the second average value are averaged, if the angle after average is (42 degree+60 degree)/2=51 degree, further according to the angle after averagely
And the direction of default axis determines the mean direction of slide that has carried out.So, the slide for determining to have carried out is put down
Equal direction is positive direction of the y-axis, and the glide direction for the slide for determining to have carried out according to the mean direction is upward sliding.
Lock unit 603 and add mutual exclusion lock for pair slip event identical with the glide direction.
If the glide direction of two slip events be respectively slide to the right, upward sliding, if according to currently having produced
The glide direction that sliding trace calculates is upward sliding, then the slip event to upward sliding adds mutual exclusion lock.Mutual exclusion lock
Also exclusive lock, exclusive lock etc. are.If creating mutual exclusion lock, the control same time can only respond a slip event, such as plus mutual
The slip event of reprimand lock can be responded always, and other slip events are not responded.
Specifically, as shown in figure 9, pair slip event identical with the glide direction adds mutual exclusion lock, that is, unit is locked
603 include mutual exclusion lock judging unit 901, mutual exclusion lock creating unit 902, mutual exclusion lock adding device 903.Mutual exclusion lock judging unit
901 are used to judge whether to create the mutual exclusion lock of control.If mutual exclusion lock creating unit 902 is used for the mutual exclusion for not creating control
Lock, creates the mutual exclusion lock of control.The mutual exclusion lock of control can be existing, it can be understood as, before this step is performed
The mutual exclusion lock of control is just created.If the mutual exclusion lock of control is not present, then creates the mutual exclusion lock of control, Ke Yili
Xie Wei, creates the mutual exclusion lock of control response slip event.Mutual exclusion lock adding device 903 is used for pair identical with the glide direction
Slip event is plus the mutual exclusion lock obtained.It is to be appreciated that the slip event identical with the glide direction can be responded always.
And in the preset time before plus mutual exclusion lock, it is not responding to slide.
Control unit 604 is used for the slip event for controlling control response to add mutual exclusion lock.If slide does not terminate, control
Control processed only responds the slip event plus mutual exclusion lock.If plus mutual exclusion lock slip event glide direction plus mutual exclusion
Upward sliding before lock, plus still upward sliding after mutual exclusion lock, then the glide direction of upward sliding is reported to by correspondence
Control, so that control responds the upward sliding of the slip event.If plus mutual exclusion lock slip event glide direction plus
Upward sliding before mutual exclusion lock, plus slide downward in a period of time after mutual exclusion lock, then it is corresponding by the time to
The glide direction of lower slider is reported to control, so that control responds the slide downward of the slip event.In this way, control can be improved
Respond the accuracy of slip event.
If releasing lock unit 605 to be used to detect that slide terminates, the mutual exclusion lock is released.Wherein, releasing is appreciated that
To discharge or destroying.If there is multiple slides, such as two slides, slide terminate, it will be appreciated that are two slips
Operation has all terminated, or one of slide terminates.One of slide terminates, and is considered as slide and terminates,
It is to be understood that if an only slide, control need to only respond the slip event of the slide, there is no more
The situation of a slip event, also just there is no the situation of shake.
Above-described embodiment is the identical slip thing of the glide direction by calculating the glide direction in preset time
Part adds mutual exclusion lock, makes the slip for the slip event that the control only responded plus mutual exclusion lock, so avoids because of slide
And the shake of terminal interface caused by the multiple slip events triggered.
In other embodiments, after locking the unit pair slip event identical with the glide direction and adding mutual exclusion lock,
The glide direction that control unit will be calculated according to the current sliding trace produced, as the slip event plus mutual exclusion lock
Glide direction, and control control to respond the glide direction.It is to be understood that in a pair slip event identical with the glide direction
Plus the slip that after mutual exclusion lock and in the slide unclosed time, can be calculated according to the sliding trace currently produced
Direction, the glide direction as the slip event plus mutual exclusion lock.Hold in slip event in the time of mutual exclusion lock, no matter detect
To slide time have how long, the glide direction just only calculated according to the current sliding trace produced, as plus
The glide direction of the slip event of mutual exclusion lock, the glide direction is reported to the control, so that control responds this plus mutual exclusion lock
Slip event.In this way, just without after slip event adds mutual exclusion lock, obtaining the sliding contact and meter of corresponding slide
The glide direction of slide is calculated, saves calculation amount, amount of storage, while also save the electricity of terminal.
Figure 10 is the schematic block diagram for the computing unit 602 that another embodiment of the present invention provides.The computing unit 602 is used for
Glide direction is calculated according to the sliding trace currently produced.It is true that the computing unit 602 includes contact acquiring unit 101, second
Order member 102.Contact acquiring unit 101 is used to obtain first when sliding trace starts according to the current sliding trace produced
The second contact when contact and arrival preset time.Specifically, the coordinate of the first contact and the second contact is obtained.If slide
Only one, obtain second contact of the slide in the coordinate and arrival preset time for sliding the first contact when starting
Coordinate.If slide there are multiple, such as two slides, two slides are obtained respectively and are sliding first when starting
The coordinate of the second contact when the coordinate and arrival preset time of contact.Second determination unit 102 be used for according to the first contact and
Second contact determines the glide direction of slide.Wherein, the slip of slide is determined according to the first contact and the second contact
Direction includes:The glide direction of slide is determined according to the direction of the straight line where the first contact and the second contact.If slide
Only one is operated, corresponding first contact of the slide and the second contact are subjected to line, and calculates the line with presetting
The angle of axis, glide direction is determined according to the direction of the angle and default axis of the line and default axis.Specifically, if the angle
For scope between 315 degree to 45 degree, glide direction is identical with the direction of default axis, that is, determine slide glide direction be to
Right slip;If the angular range, between 135 degree to 225 degree, the direction of glide direction and default axis is on the contrary, determine to slide behaviour
The glide direction of work is to slide to the left;If the angular range between 45 to 135 degree, determines the glide direction and y of slide
Axis positive direction is identical, i.e. upward sliding;If the angular range between 225 degree to 315 degree, determines the glide direction of slide
With positive direction of the y-axis on the contrary, i.e. slide downward.If having, slide is multiple, such as two slides, first grasps one of slide
Make corresponding first contact and carry out line with the second contact, and calculate the angle of the line and default axis, be known as the first angle, such as
First angle is 42 degree.Corresponding first contact of another slide and the second contact are subjected to line again, and calculated
The angle of the line and default axis, is known as the second angle, if second angle is 60 degree.Finally by the first angle and the second angle
After carrying out averagely, glide direction is determined according to the angle value and the direction of default axis after averagely.Such as (42 degree of+60 degree)/2=51
Degree, then the glide direction for determining slide is positive direction of the y-axis, i.e. upward sliding.
The embodiment is calculated by obtaining the second contact when sliding the first contact and the arrival preset time when starting
The direction of straight line where first contact and the second contact and the angle of default axis, the slip of slide is determined according to the angle
Direction.
In other embodiments, determine that the glide direction of slide includes according to the first contact and the second contact:According to
The vector of straight line where first contact and the second contact determines the glide direction of slide.If only one is slided behaviour
Make, according to component of the Vector operation of the straight line where the first contact and the second contact on the different directions in reference axis.Such as
If the component in x-axis is more than component on the y axis, and the direction of vector is to the right, then the definite slide carried out
Glide direction is to the right, if component on the y axis is more than the component in x-axis, and the direction of vector is upward, then determine into
The glide direction of capable slide is to first-class.
In above example, if the angle calculated is just 45 degree, 135 degree, 225 degree, 315 degree, these angles correspond to
The glide direction of slide is determined according to preset rules on time point.It is such as sliding according to previous moment (or top n moment)
The glide direction of dynamic operation determines or randomly selects a direction and determines.It is if sliding according to previous moment (or top n moment)
The glide direction of dynamic operation determines, then the glide direction of previous moment (or top n moment) slide is upward sliding,
So these angles correspond to time point upper slide glide direction it is upward.
The above-mentioned device for preventing that interface from shaking can be implemented as a kind of form of computer program, which can be with
Run in computer equipment as shown in figure 11.
Figure 11 is a kind of schematic block diagram of computer equipment provided in an embodiment of the present invention.The computer equipment 110 can
To be terminal.The computer equipment 110 includes processor 112, memory and the network interface connected by system bus 111
113, wherein, memory can include non-volatile memory medium 114 and built-in storage 115.
The non-volatile memory medium 114 can storage program area 1141 and computer program 1142.The computer program
1142 are performed, and may be such that processor 112 performs a kind of method for preventing interface from shaking.
The processor 112 is used to provide calculating and control ability, supports the operation of whole computer equipment 110.
The built-in storage 115 provides environment for the operation of the computer program in non-volatile memory medium, the computer
When program is performed by processor 112, it may be such that processor 112 performs a kind of method for preventing interface from shaking.
The network interface 113 is used to carry out network service.It will be understood by those skilled in the art that the knot shown in Figure 11
Structure, only with the block diagram of the relevant part-structure of application scheme, does not form what application scheme was applied thereon
The restriction of computer equipment 110, specific computer equipment 110 can include than more or fewer components shown in figure, or
Person combines some components, or is arranged with different components.
Wherein, the processor 112 is used to run computer program stored in memory, to realize following operation:
If detecting the multiple slip events triggered on control by slide, when obtaining the slip of the slide
Between and sliding trace;If the sliding time reaches preset time and the slide does not terminate, according to what is currently produced
Sliding trace calculates glide direction;Pair slip event identical with the glide direction adds mutual exclusion lock;The control is controlled to ring
The slip event of mutual exclusion lock should be added;If detecting, the slide terminates, and releases the mutual exclusion lock.
In one embodiment, when processor 112 is performed according to the sliding trace calculating glide direction currently produced, specifically
Perform following operation:
The mean direction of the slide carried out is calculated according to the sliding trace currently produced;According to the mean square
To the definite glide direction.
In one embodiment, processor 112 performs the slip for determining to have carried out according to the current sliding trace produced and grasps
It is specific to perform following operation during the mean direction of work:
Multiple sliding contacts are gathered according to the sliding trace currently produced;Determine the line of two neighboring sliding contact with
The angle of default axis;Calculate the average value of fixed all angles;According to the direction of the average value and the default axis
Determine the mean direction of slide carried out.
In one embodiment, when processor 112 is performed according to the sliding trace collection multiple sliding contacts currently produced,
It is specific to perform:
Multiple sliding contacts are gathered in the way of constant duration according to the sliding trace currently produced, or according to
The current sliding trace produced gathers multiple sliding contacts in the way of equidistant intervals.
In one embodiment, when processor 112 is performed according to the sliding trace calculating glide direction currently produced, specifically
Perform following operation:
When obtaining the first contact when sliding trace starts according to the sliding trace currently produced and reach preset time
The second contact;The glide direction is determined according to first contact and second contact.
In one embodiment, when the execution of the processor 112 pair slip event identical with the glide direction adds mutual exclusion lock,
It is specific to perform following operation:
Judge whether to create the mutual exclusion lock of control;If not creating the mutual exclusion lock of control, the mutual exclusion lock of control is created;It is right
The slip event identical with the glide direction is plus the mutual exclusion lock obtained.
It should be appreciated that in embodiments of the present invention, processor 112 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic devices
Part, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or
The processor can also be any conventional processor etc..
It will be understood by those skilled in the art that 110 structure of computer equipment shown in Figure 11 is not formed to equipment 110
Restriction, can include than illustrating more or fewer components, either combine some components or different components arrangement.Example
Such as, in certain embodiments, the equipment of service combining can only include memory and processor, in such embodiments, deposit
The structure and function of reservoir and processor are consistent with embodiment illustrated in fig. 11, and details are not described herein.
The embodiment of the present invention also provides a kind of computer-readable recording medium, and the computer-readable recording medium storage has
Computer program, the computer program include programmed instruction, and described program instruction is performed, and realizes following steps:
If detecting the multiple slip events triggered on control by slide, when obtaining the slip of the slide
Between and sliding trace;If the sliding time reaches preset time and the slide does not terminate, according to what is currently produced
Sliding trace calculates glide direction;Pair slip event identical with the glide direction adds mutual exclusion lock;The control is controlled to ring
The slip event of mutual exclusion lock should be added;If detecting, the slide terminates, and releases the mutual exclusion lock.
In one embodiment, which is executed by processor calculates slip side according to the current sliding trace produced
Xiang Shi, specific implementation:
The mean direction of the slide carried out is calculated according to the sliding trace currently produced;According to the mean square
To the definite glide direction.
In one embodiment, which is executed by processor determines to have carried out according to the current sliding trace produced
Slide mean direction when, specific implementation:
Multiple sliding contacts are gathered according to the sliding trace currently produced;Determine the line of two neighboring sliding contact with
The angle of default axis;Calculate the average value of fixed all angles;According to the direction of the average value and the default axis
Determine the mean direction of slide carried out.
In one embodiment, when processor 112 is performed according to the sliding trace collection multiple sliding contacts currently produced,
It is specific to perform:
Multiple sliding contacts are gathered in the way of constant duration according to the sliding trace currently produced, or according to
The current sliding trace produced gathers multiple sliding contacts in the way of equidistant intervals.
In one embodiment, which is executed by processor calculates slip side according to the current sliding trace produced
Xiang Shi, specific implementation:
When obtaining the first contact when sliding trace starts according to the sliding trace currently produced and reach preset time
The second contact;The glide direction is determined according to first contact and second contact.
In one embodiment, which is executed by processor a pair slip event identical with the glide direction and adds
During upper mutual exclusion lock, specific implementation:
Judge whether to create the mutual exclusion lock of control;If not creating the mutual exclusion lock of control, the mutual exclusion lock of control is created;It is right
The slip event identical with the glide direction is plus the mutual exclusion lock obtained.
It is apparent to those skilled in the art that for convenience of description and succinctly, foregoing description is set
The specific work process of standby, device and unit, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
Those of ordinary skill in the art may realize that each exemplary unit and algorithm described with reference to the embodiments described herein
Step, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and software
Interchangeability, generally describes each exemplary composition and step according to function in the above description.These functions are studied carefully
Unexpectedly application-specific and design constraint depending on technical solution are performed with hardware or software mode.Professional technician
Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
In several embodiments provided herein, it should be understood that disclosed unit and method, can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the unit
Division, is only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing
Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or beg for
The mutual coupling, direct-coupling or communication connection of opinion can be the INDIRECT COUPLING by some interfaces, device or unit
Or communication connection or electricity, the connection of mechanical or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs
Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
It is that unit is individually physically present or two or more units integrate in a unit.It is above-mentioned integrated
Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to contribute in other words to the prior art, or all or part of the technical solution can be in the form of software product
Embody, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment the method for the present invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, various equivalent modifications can be readily occurred in or replaced
Change, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection domain subject to.
Claims (10)
- A kind of 1. method for preventing interface from shaking, it is characterised in that the described method includes:If detecting the multiple slip events triggered on control by slide, obtain the slide sliding time and Sliding trace;If the sliding time reaches preset time and the slide does not terminate, according to the sliding trace meter currently produced Calculate glide direction;Pair slip event identical with the glide direction adds mutual exclusion lock;The control response is controlled to add the slip event of mutual exclusion lock;If detecting, the slide terminates, and releases the mutual exclusion lock.
- 2. the method as described in claim 1, it is characterised in that the sliding trace that the basis has currently produced calculates slip side To, including:The mean direction of the slide carried out is calculated according to the sliding trace currently produced;The glide direction is determined according to the mean direction.
- 3. method as claimed in claim 2, it is characterised in that the sliding trace that the basis has currently produced is calculated and carried out Slide mean direction, including:Multiple sliding contacts are gathered according to the sliding trace currently produced;Determine the line of two neighboring sliding contact and the angle of default axis;Calculate the average value of fixed all angles;The mean direction for the slide for determining to have carried out according to the direction of the average value and the default axis.
- 4. method as claimed in claim 3, it is characterised in that the sliding trace that the basis has currently produced gathers multiple cunnings Movable contact, including:Multiple sliding contacts are gathered in the way of constant duration according to the sliding trace currently produced, or according to current The sliding trace produced gathers multiple sliding contacts in the way of equidistant intervals.
- 5. the method as described in claim 1, it is characterised in that the sliding trace that the basis has currently produced calculates slip side To, including:The when obtaining the first contact when sliding trace starts according to the sliding trace that has currently produced and reaching preset time Two contacts;The glide direction is determined according to first contact and second contact.
- 6. a kind of device for preventing interface from shaking, it is characterised in that described device includes:Acquiring unit, if for detecting the multiple slip events triggered on control by slide, obtains described slide and grasps The sliding time and sliding trace of work;Computing unit, if reaching preset time for the sliding time and the slide does not terminate, according to currently having produced Raw sliding trace calculates glide direction;Unit is locked, mutual exclusion lock is added for pair slip event identical with the glide direction;Control unit, for controlling the control response to add the slip event of mutual exclusion lock;Lock unit is released, if for detecting that the slide terminates, releases the mutual exclusion lock.
- 7. device as claimed in claim 6, it is characterised in that the computing unit, including:Mean direction computing unit, for calculating the mean square of the slide carried out according to the current sliding trace produced To;First determination unit, for determining the glide direction according to the mean direction.
- 8. device as claimed in claim 6, it is characterised in that the mean direction computing unit, including:Collecting unit, for gathering multiple sliding contacts according to the current sliding trace produced;Angle determination unit, for determining the line of two neighboring sliding contact and the angle of default axis;Average angle computing unit, for calculating the average value of fixed all angles;Mean direction determination unit, the direction for the average value and the default axis determine the slide carried out Mean direction.
- 9. a kind of computer equipment, it is characterised in that the computer equipment includes memory, and is connected with the memory Processor;The memory is used to store the computer program realized and prevent that interface from shaking;The processor is used to run described deposit The computer program stored in reservoir, to perform such as claim 1-5 any one of them methods.
- 10. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium storage has computer journey Sequence, the computer program includes programmed instruction, when described program instruction is executed by processor, realizes that claim 1-5 such as appoints Method described in one.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711092114.3A CN107908344B (en) | 2017-11-08 | 2017-11-08 | Method, apparatus, equipment and the computer readable storage medium for preventing interface from shaking |
PCT/CN2018/075043 WO2019090996A1 (en) | 2017-11-08 | 2018-02-02 | Method, device and equipment for preventing interface from shaking, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711092114.3A CN107908344B (en) | 2017-11-08 | 2017-11-08 | Method, apparatus, equipment and the computer readable storage medium for preventing interface from shaking |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107908344A true CN107908344A (en) | 2018-04-13 |
CN107908344B CN107908344B (en) | 2019-09-10 |
Family
ID=61843754
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711092114.3A Active CN107908344B (en) | 2017-11-08 | 2017-11-08 | Method, apparatus, equipment and the computer readable storage medium for preventing interface from shaking |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107908344B (en) |
WO (1) | WO2019090996A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110263048A (en) * | 2019-05-05 | 2019-09-20 | 平安科技(深圳)有限公司 | High-volume data processing method, device, computer equipment and storage medium |
CN113254067A (en) * | 2021-05-25 | 2021-08-13 | 四川虹魔方网络科技有限公司 | Method for preventing function jitter based on Rx framework |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103324422A (en) * | 2012-03-21 | 2013-09-25 | 宇龙计算机通信科技(深圳)有限公司 | Terminal and track amending method |
DE102012214946A1 (en) * | 2012-08-22 | 2014-02-27 | Deutsche Post Ag | Method and arrangement for transporting cuboid objects |
CN103677416B (en) * | 2013-12-13 | 2016-09-07 | 广东欧珀移动通信有限公司 | A kind of sliding process prevents the method and apparatus that interface is shaken |
US10620972B2 (en) * | 2015-07-16 | 2020-04-14 | Adobe Inc. | Processing touch gestures in hybrid applications |
CN107220134A (en) * | 2017-06-26 | 2017-09-29 | 中广热点云科技有限公司 | The solution that HTML5 and Android conflict when switching |
-
2017
- 2017-11-08 CN CN201711092114.3A patent/CN107908344B/en active Active
-
2018
- 2018-02-02 WO PCT/CN2018/075043 patent/WO2019090996A1/en active Application Filing
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110263048A (en) * | 2019-05-05 | 2019-09-20 | 平安科技(深圳)有限公司 | High-volume data processing method, device, computer equipment and storage medium |
CN110263048B (en) * | 2019-05-05 | 2024-05-10 | 平安科技(深圳)有限公司 | Method and device for processing large-batch data, computer equipment and storage medium |
CN113254067A (en) * | 2021-05-25 | 2021-08-13 | 四川虹魔方网络科技有限公司 | Method for preventing function jitter based on Rx framework |
Also Published As
Publication number | Publication date |
---|---|
WO2019090996A1 (en) | 2019-05-16 |
CN107908344B (en) | 2019-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11157107B2 (en) | Method and apparatus for providing touch interface | |
KR101892315B1 (en) | Touch event anticipation in a computing device | |
US9182884B2 (en) | Pinch-throw and translation gestures | |
US10140011B2 (en) | Touch intelligent targeting | |
CN103955336B (en) | Sensing device and method | |
KR20120136949A (en) | Apparatus and method for providing dynamic user interface in consideration of physical characteristics of user | |
EP2909711A1 (en) | Input classification for multi-touch systems | |
CN103376945B (en) | Information processor and control method thereof | |
EP3550419B1 (en) | Mobile terminal device and method for controlling display of mobile terminal device | |
US20140283019A1 (en) | Information terminal | |
CN107908344A (en) | Method, apparatus, equipment and the computer-readable recording medium for preventing interface from shaking | |
US9619134B2 (en) | Information processing device, control method for information processing device, program, and information storage medium | |
JP6370118B2 (en) | Information processing apparatus, information processing method, and computer program | |
EP2725469B1 (en) | Information-processing device, program, information-processing method, and information-processing system | |
CN107092433B (en) | Touch control method and device of touch control all-in-one machine | |
CN104965634B (en) | A kind of method and device of unlocking screen | |
US9235338B1 (en) | Pan and zoom gesture detection in a multiple touch display | |
EP2230589A1 (en) | Touch screen display device | |
KR20140122687A (en) | Method for processing touch event and device for the same | |
JP5995171B2 (en) | Electronic device, information processing method, and information processing program | |
CN108459753B (en) | A kind of touch screen border processing method and device | |
JP6057466B2 (en) | Electronic device and content display method | |
WO2017127942A1 (en) | Cross device gesture detection | |
CN106484101A (en) | A kind of terminal control method and equipment | |
EP2866134A1 (en) | Portable electronic device and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |