Summary of the invention
The embodiment of the present invention is designed to provide a kind of Interface Moving method and device, improves the accurate of content positioning
Property, avoid the content as caused by content position inaccurate discontinuous.Specific technical solution is as follows:
The present invention provides a kind of Interface Moving methods, are applied to terminal device, which comprises
Detection is directed to the slide of current interface, wherein enumerates in the current interface according to predetermined display order
Show object;
When detecting slide, Interface Moving direction corresponding to the slide is determined;
Determine the display size of target object corresponding with the Interface Moving direction;
The current interface is moved to the display size of the target object to the Interface Moving direction.
Optionally, Interface Moving direction corresponding to the determination slide, comprising:
Determine the source location set and end position point of the formed sliding trace of the slide;
Determine the source location set and end position point in the relative positional relationship of the current interface;
Based on the relative positional relationship, Interface Moving direction corresponding to the slide is obtained.
Optionally, the predetermined display order includes: display order from top to bottom;
The Interface Moving direction includes: upward or downward.
Optionally, when the Interface Moving direction is upward, the determination is corresponding with the Interface Moving direction
The display size of target object, comprising:
The object that the current interface top is shown is determined to belong to the upward corresponding target in Interface Moving direction
Object;
Determine the display height of the target object;
The display size that the current interface is moved to the target object to the Interface Moving direction, comprising:
The current interface is moved up to the display height of the target object;
Alternatively,
When the Interface Moving direction is downward, determination target object corresponding with the Interface Moving direction
Display size, comprising:
The upper an object for the object that the current interface top is shown is determined to belong to downward Interface Moving direction phase
Corresponding target object;
Determine the display height of the target object;
The display size that the current interface is moved to the target object to the Interface Moving direction, comprising:
The current interface is moved down to the display height of the target object.
Optionally, the predetermined display order includes display order from left to right;
The Interface Moving direction includes: leftward or rightward.
Optionally, when the Interface Moving direction is to the left, the determination is corresponding with the Interface Moving direction
The display size of target object, comprising:
The object that the current interface left end is shown is determined to belong to the corresponding target in Interface Moving direction to the left
Object;
Determine the display width of the target object;
The display size that the current interface is moved to the target object to the Interface Moving direction, comprising:
The current interface is moved to the left to the display width of the target object;
Alternatively,
When the Interface Moving direction is to the right, determination target object corresponding with the Interface Moving direction
Display size, comprising:
The upper an object for the object that the current interface left end is shown is determined to belong to Interface Moving direction phase to the right
Corresponding target object;
Determine the display width of the target object;
The display size that the current interface is moved to the target object to the Interface Moving direction, comprising:
The current interface is moved right the display width of the target object.
The present invention provides a kind of Interface Moving devices, are applied to terminal device, and described device includes:
Detection module, for detecting the slide for being directed to current interface, wherein according to predetermined in the current interface
Display order enumerates display object;
First determining module, for when detecting slide, determining Interface Moving corresponding to the slide
Direction;
Second determining module, for determining the display size of target object corresponding with the Interface Moving direction;
Mobile module, for the display ruler by the current interface to the mobile target object in the Interface Moving direction
It is very little.
Optionally, first determining module, comprising:
Location point determination unit, for when detecting slide, determining the formed sliding trace of the slide
Source location set and end position point;
Relative positional relationship determination unit, for determining the source location set and end position point described current
The relative positional relationship at interface;
Interface Moving direction-determining unit obtains corresponding to the slide for being based on the relative positional relationship
Interface Moving direction.
Optionally, the predetermined display order includes: display order from top to bottom;
The Interface Moving direction includes: upward or downward.
Optionally, second determining module, comprising:
First object object determination unit is used for when the Interface Moving direction is upward, by the current interface top
The object of end display is determined to belong to the upward corresponding target object in Interface Moving direction;
First display height determination unit, for determining the display height of the target object;
The mobile module, is specifically used for:
The current interface is moved up to the display height of the target object;
Alternatively,
Second determining module, comprising:
Second target object determination unit is used for when the Interface Moving direction is downward, by the current interface top
The upper an object of the object of display is held to be determined to belong to the downward corresponding target object in Interface Moving direction;
Second display height determination unit, for determining the display height of the target object;
The mobile module, is specifically used for:
The current interface is moved down to the display height of the target object.
Optionally, the predetermined display order includes display order from left to right;
The Interface Moving direction includes: leftward or rightward.
Optionally, second determining module, comprising:
Third target object determination unit is used for when the Interface Moving direction is to the left, and the current interface is left
The object of end display is determined to belong to the corresponding target object in Interface Moving direction to the left;
First display width determination unit, for determining the display width of the target object;
The mobile module, is specifically used for:
The current interface is moved to the left to the display width of the target object;
Alternatively,
Second determining module, comprising:
4th target object determination unit is used for when the Interface Moving direction is to the right, and the current interface is left
The upper an object of the object of display is held to be determined to belong to the corresponding target object in Interface Moving direction to the right;
Second display width determination unit, for determining the display width of the target object;
The mobile module, is specifically used for:
The current interface is moved right the display width of the target object.
Compared with prior art, in the embodiment of the present invention, Interface Moving direction corresponding to the slide is determined, really
The display size of fixed target object corresponding with the Interface Moving direction, by the current interface to the Interface Moving side
To the display size of the movement target object, due to the current interface display to the mobile target object of moving direction every time
Size, so that the complete next display object of interface display after mobile, improves the accuracy of content positioning, avoid by interior
It is discontinuous to hold content caused by position inaccurate.Certainly, it implements any of the products of the present invention or method must be not necessarily required to simultaneously
Reach all the above advantage.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In order to solve prior art problem, the embodiment of the invention provides a kind of Interface Moving method and devices.
A kind of Interface Moving method is provided for the embodiments of the invention first below to be introduced.
It should be noted that a kind of Interface Moving method provided by the embodiment of the present invention is applied to terminal device.In reality
In the application of border, which can be smart phone, tablet computer, laptop etc., this is all reasonable.
As shown in Figure 1, a kind of Interface Moving method provided in an embodiment of the present invention, is applied to terminal device, this method can
To include:
S101: detection is directed to the slide of current interface.
Wherein, display object is enumerated according to predetermined display order in the current interface.
Specifically, in practical applications, which can be display order set by user, or eventually
The display order defaulted in end equipment, this is all reasonable.
Wherein, terminal device can be directed to the slide of current interface in terminal device with real-time detection, and according to inspection
It surveys result and executes subsequent operation.
S102: when detecting slide, Interface Moving direction corresponding to the slide is determined.
Wherein, slide can there are many, every kind of slide is corresponding with a kind of Interface Moving direction.
Due to needing to determine the moving direction at interface according to slide, when having detected slide, then
Determine Interface Moving direction corresponding to the slide.
S103: the display size of target object corresponding with the Interface Moving direction is determined.
Wherein, respectively show that the display order of object is different in interface, then the display ruler of target object difference and target object
Very little difference, accordingly, it is determined that the display size of target object corresponding with the Interface Moving direction.
S104: the current interface is moved to the display size of the target object to the Interface Moving direction.
After the display size for determining corresponding with Interface Moving direction target object, by the current interface to the boundary
The display size of the mobile target object of face moving direction is to achieve the purpose that Interface Moving.
Compared with prior art, in the embodiment of the present invention, Interface Moving direction corresponding to the slide is determined, really
The display size of fixed target object corresponding with the Interface Moving direction, by the current interface to the Interface Moving side
To the display size of the movement target object, due to the current interface display to the mobile target object of moving direction every time
Size, so that the complete next display object of interface display after mobile, improves the accuracy of content positioning, avoid by interior
It is discontinuous to hold content caused by position inaccurate.
Specifically, in one implementation, which may include: display order from top to bottom;
Correspondingly, the Interface Moving direction may include: upward or downward.
When the Interface Moving direction is upward, the display ruler of target object corresponding with the Interface Moving direction is determined
It is very little, may include:
The object that the current interface top is shown is determined to belong to the upward corresponding target pair in Interface Moving direction
As;
Determine the display height of the target object;
By the current interface to the display size of the mobile target object in the Interface Moving direction, may include:
The current interface is moved up to the display height of the target object;
Alternatively,
When the Interface Moving direction is downward, the display ruler of target object corresponding with the Interface Moving direction is determined
It is very little, may include:
It is opposite that the upper an object for the object that the current interface top is shown is determined to belong to downward Interface Moving direction
The target object answered;
Determine the display height of the target object;
By the current interface to the display size of the mobile target object in the Interface Moving direction, may include:
The current interface is moved down to the display height of the target object.
Below by a specific embodiment when predetermined display order is display order from top to bottom, to shown in Fig. 1
Method is specifically described.
Such as: as shown in Fig. 2, terminal device is mobile phone, according to display order sieve from top to bottom in mobile phone current interface
Tri- display objects of A, B and C are arranged, the object that mobile phone current interface top is shown is A, when detecting user's upward sliding interface
When, A is determined to belong to the upward corresponding target object in Interface Moving direction, the display height H of A is determined, mobile phone is worked as
Front interface moves up H, at this point, the object that shows of mobile phone current interface top is B, when detecting user's slide downward interface
When, A is determined to belong to the downward corresponding target object in Interface Moving direction, the display height H of A is determined, mobile phone is worked as
Front interface moves down H.
Specifically, in another implementation, which may include display order from left to right;
Correspondingly, the Interface Moving direction may include: leftward or rightward.
When the Interface Moving direction is to the left, the display ruler of target object corresponding with the Interface Moving direction is determined
It is very little, may include:
The object that the current interface left end is shown is determined to belong to the corresponding target pair in Interface Moving direction to the left
As;
Determine the display width of the target object;
By the current interface to the display size of the mobile target object in the Interface Moving direction, may include:
The current interface is moved to the left to the display width of the target object;
Alternatively,
When the Interface Moving direction is to the right, the display ruler of target object corresponding with the Interface Moving direction is determined
It is very little, may include:
It is opposite that the upper an object for the object that the current interface left end is shown is determined to belong to Interface Moving direction to the right
The target object answered;
Determine the display width of the target object;
By the current interface to the display size of the mobile target object in the Interface Moving direction, may include:
The current interface is moved right the display width of the target object.
Below by a specific embodiment when predetermined display order is display order from left to right, to shown in Fig. 1
Method is specifically described.
Such as: terminal device is mobile phone, enumerates E, F and G tri- according to display order from left to right in mobile phone current interface
A display object, the object that mobile phone current interface left end is shown are that E is determined as by E when detecting user's sliding interface to the left
Belong to the corresponding target object in Interface Moving direction to the left, determine the display width W of E, by mobile phone current interface to moving to left
Dynamic W, at this point, the object that mobile phone current interface left end is shown is that E is determined as belonging to by F when detecting user's sliding interface to the right
In the corresponding target object in Interface Moving direction to the right, determines the display width W of E, mobile phone current interface is moved right
W。
Further, determine the implementation in Interface Moving direction corresponding to the slide there are a variety of, below
In conjunction with a kind of specific implementation, it is provided for the embodiments of the invention a kind of Interface Moving method and describes in detail.Such as Fig. 3
Shown, a kind of Interface Moving method provided by the invention may include:
S301: detection is directed to the slide of current interface.
Wherein, display object is enumerated according to predetermined display order in the current interface.
Wherein, step S301 is identical as the step S101 of method shown in Fig. 1, repeats no more.
S302: when detecting slide, the source location set and knot of the formed sliding trace of the slide are determined
Beam position point.
Wherein, what slide was formed is a sliding trace, determines the source location set and stop bits of the sliding trace
It sets a little, to carry out subsequent step.
S303: the relative positional relationship at the source location set and the end position point interface in this prior is determined.
After source location set and the end position point for determining sliding trace, determine two location points in current interface
Relative positional relationship, specifically, the relative positional relationship is corresponding with Interface Moving direction.
S304: it is based on the relative positional relationship, obtains Interface Moving direction corresponding to the slide.
Specifically, enumerating the predetermined display order for showing object and source location set and stop bits based on current interface
The relative positional relationship set a little obtains Interface Moving direction corresponding to the slide, wherein the relative positional relationship can be with
It is end position point relative to source location set, in the top of source location set, lower section, left or right.
Such as: terminal device is mobile phone, enumerates display object according to display order from top to bottom in mobile phone current screen,
Detection user's slide is formed by the source location set M and end position point N of sliding trace, when top of the N in M, says
The slide of bright user be upward sliding, determine the Interface Moving direction of mobile phone current screen be it is upward, when N is in the lower section of M
When, illustrate that the slide of user is slide downward, determines that the Interface Moving direction of mobile phone current screen is downward;
Display object is enumerated according to display order from left to right in mobile phone current screen, detects user's slide institute shape
At sliding trace source location set J and end position point K, when left of the K in J, illustrate user slide be to
Left sliding determines that the Interface Moving direction of mobile phone current screen is to the left, when right of the K in J, to illustrate the slide of user
To slide to the right, determine that the Interface Moving direction of mobile phone current screen is to the right.
S305: the display size of target object corresponding with the Interface Moving direction is determined.
S306: the current interface is moved to the display size of the target object to the Interface Moving direction.
Wherein, the step of step S305 is identical as the step S103 of method shown in Fig. 1, method shown in step S306 and Fig. 1
S104 is identical, repeats no more.
Source location set and end position point as a result, based on the formed sliding trace of slide interface in this prior
Relative positional relationship obtains Interface Moving direction corresponding to the slide, by the current interface to the Interface Moving direction
The display size of the mobile target object is to achieve the purpose that Interface Moving.
Relative to above method embodiment, the embodiment of the invention also provides a kind of Interface Moving devices, are applied to terminal
Equipment, as shown in figure 4, the apparatus may include:
Detection module 401, for detecting the slide for being directed to current interface, wherein in the current interface according to
Predetermined display order enumerates display object;
First determining module 402, for when detecting slide, determining that interface corresponding to the slide is moved
Dynamic direction;
Second determining module 403, for determining the display size of target object corresponding with the Interface Moving direction;
Mobile module 404, for the showing to the mobile target object in the Interface Moving direction by the current interface
Show size.
Compared with prior art, in the embodiment of the present invention, Interface Moving direction corresponding to the slide is determined, really
The display size of fixed target object corresponding with the Interface Moving direction, by the current interface to the Interface Moving side
To the display size of the movement target object, due to the current interface display to the mobile target object of moving direction every time
Size, so that the complete next display object of interface display after mobile, improves the accuracy of content positioning, avoid by interior
It is discontinuous to hold content caused by position inaccurate.
The predetermined display order may include: display order from top to bottom;
The Interface Moving direction may include: upward or downward.
Second determining module 403 may include:
First object object determination unit is used for when the Interface Moving direction is upward, by the current interface top
The object of end display is determined to belong to the upward corresponding target object in Interface Moving direction;
First display height determination unit, for determining the display height of the target object;
The mobile module 404, can be specifically used for:
The current interface is moved up to the display height of the target object;
Alternatively,
Second determining module 403 may include:
Second target object determination unit is used for when the Interface Moving direction is downward, by the current interface top
The upper an object of the object of display is held to be determined to belong to the downward corresponding target object in Interface Moving direction;
Second display height determination unit, for determining the display height of the target object;
The mobile module 404, can be specifically used for:
The current interface is moved down to the display height of the target object.
The predetermined display order may include display order from left to right;
The Interface Moving can include: leftward or rightward with direction.
Second determining module 403 may include:
Third target object determination unit is used for when the Interface Moving direction is to the left, and the current interface is left
The object of end display is determined to belong to the corresponding target object in Interface Moving direction to the left;
First display width determination unit, for determining the display width of the target object;
The mobile module 404, can be specifically used for:
The current interface is moved to the left to the display width of the target object;
Alternatively,
Second determining module 403 may include:
4th target object determination unit is used for when the Interface Moving direction is to the right, and the current interface is left
The upper an object of the object of display is held to be determined to belong to the corresponding target object in Interface Moving direction to the right;
Second display width determination unit, for determining the display width of the target object;
The mobile module 404, can be specifically used for:
The current interface is moved right the display width of the target object.
Further, as shown in figure 5, a kind of Interface Moving device provided by the invention, it is applied to terminal device, it can be with
Include:
Detection module 501, for detecting the slide for being directed to current interface, wherein in the current interface according to
Predetermined display order enumerates display object;
Location point determination unit 502, for when detecting slide, determining the formed sliding rail of the slide
Source location set and the end position point of mark;
Relative positional relationship determination unit 503, for determining the source location set and end position point described
The relative positional relationship of current interface;
It is right to obtain the slide institute for being based on the relative positional relationship for Interface Moving direction-determining unit 504
The Interface Moving direction answered.
Second determining module 505, for determining the display size of target object corresponding with the Interface Moving direction;
Mobile module 506, for the showing to the mobile target object in the Interface Moving direction by the current interface
Show size.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.