Summary of the invention
In order to simplify the operation of mobile application interface, the embodiment of the present invention provides a kind of method, device and terminal device that application interface moves of controlling.Described technical scheme is as follows:
First aspect provides a kind of method that application interface moves of controlling, and described method comprises:
Detect to trigger respectively two displacements with upper contact in the touch screen operation that application interface moves;
With described two displacement additions with upper contact, calculate the total distance of movement of described touch screen operation;
Distance total according to described movement controlled the movement of application interface.
In conjunction with first aspect, the first of the embodiment of the present invention may implementation in, detect respectively and trigger two displacements with upper contact in the touch screen operation that application interface moves, comprising:
Detect to trigger respectively the motion track of each contact in the touch screen operation that application interface moves;
According to the motion track of each contact, obtain the displacement of each contact.
In conjunction with the first possibility implementation of the embodiment of the present invention, in the second possibility implementation of the embodiment of the present invention, according to the motion track of each contact, obtain the displacement of each contact, comprising:
Obtain the starting point coordinate of motion track of each contact and the air line distance between the end point coordinate, as the displacement of each contact;
And/or,
Obtain the starting point coordinate of motion track of described each contact and the camber line distance between the end point coordinate, as the displacement of each contact.
The second possibility implementation in conjunction with the embodiment of the present invention, in the third possibility implementation of the embodiment of the present invention, obtain the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, the displacement as each contact comprises:
According to the coordinate points of default number on the motion track of each contact, obtain the air line distance between every two adjacent coordinates points;
With the air line distance addition that gets, obtain the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, as the displacement of described each contact.
In conjunction with above-mentioned arbitrary possible implementation, in the 4th kind of possibility implementation of the embodiment of the present invention, distance total according to described movement controlled the movement of application interface, comprising:
The ratio of distance total according to described movement and predetermined threshold value, the application interface of controlling current demonstration switches to and the corresponding application interface of described ratio;
Or,
The application interface of controlling current demonstration moves the total distance of described movement to the direction of described touch screen operation, with the extension of the application interface that shows current demonstration.
Second aspect provides a kind of device that application interface moves of controlling, and described device comprises:
Detection module is used for detecting respectively two displacements with upper contact that trigger the touch screen operation that application interface moves;
Computing module is used for described two displacement additions with upper contact, calculates the total distance of movement of described touch screen operation;
Processing module is used for distance total according to described movement, controls the movement of application interface.
In conjunction with second aspect, in the first of the embodiment of the present invention possibility implementation, described detection module comprises:
The motion track detecting unit is used for detecting respectively the motion track of touch screen operation each contact of triggering that application interface moves;
The displacement acquiring unit is used for the motion track according to each contact, obtains the displacement of each contact.
The first possibility implementation in conjunction with the embodiment of the present invention, in the second possibility implementation of the embodiment of the present invention, described displacement acquiring unit is for the starting point coordinate of the motion track that obtains each contact and the air line distance between the end point coordinate, as the displacement of each contact;
And/or,
Described displacement acquiring unit is for the starting point coordinate of the motion track that obtains each contact and the camber line distance between the end point coordinate, as the displacement of each contact.
The second possibility implementation in conjunction with the embodiment of the present invention, in the third possibility implementation of the embodiment of the present invention, described displacement acquiring unit is used for the coordinate points according to default number on the motion track of each contact, obtains the air line distance between every two adjacent coordinates points; With the air line distance addition that gets, obtain the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, as the displacement of described each contact.
In conjunction with above-mentioned arbitrary possible implementation, in the 4th kind of possibility implementation of the embodiment of the present invention, described processing module comprises:
The first processing unit, for the ratio of distance total according to described movement with predetermined threshold value, the application interface of controlling current demonstration switches to and the corresponding application interface of described ratio;
The second processing unit, the application interface that is used for controlling current demonstration moves the total distance of described movement to the direction of described touch screen operation, with the extension of the application interface that shows current demonstration.
The third aspect provides a kind of terminal device, and described terminal device comprises:
Touch display screen;
One or more processors;
Storer; With
One or more modules, described one or more module stores are in described storer and be configured to be carried out by described one or more processors, and wherein, described one or more modules have following function:
Detect to trigger respectively two displacements with upper contact in the touch screen operation that application interface moves;
With described two displacement additions with upper contact, calculate the total distance of movement of described touch screen operation;
Distance total according to described movement controlled the movement of application interface.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
Method, device and terminal device that the control application interface that the embodiment of the present invention provides moves, can be when the user need to check the current display position of application interface middle distance position far away, calculate the total distance of movement of touch screen operation according to the displacement of the contact of touch screen operation, moving total distance according to this shows the extension at current application interface or switches the current application interface, when the user carries out a gesture operation, the translational speed of application interface is doubled, thereby simplify user's operation.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the present invention is clearer, below in conjunction with accompanying drawing, the embodiment of the present invention is described in further detail.
In the embodiment of the present invention, terminal device is oriented to the equipment that the user provides voice and/or data connectivity, comprises wireless terminal or catv terminal.Wireless terminal can be other treatment facilities that have the portable equipment of wireless connecting function or be connected to radio modem, the mobile terminal that communicates through wireless access network and one or more core net.For example, wireless terminal can be mobile phone (or being called " honeycomb " phone) and the computing machine with mobile terminal.And for example, wireless terminal can be also portable, pocket, hand-held, mobile device built-in computer or vehicle-mounted.
Fig. 1 is the process flow diagram that the first of providing of the embodiment of the present invention is controlled the method that application interface moves.The executive agent of the embodiment of the present invention is terminal device, and referring to Fig. 1, described method comprises:
101: detect to trigger respectively two displacements with upper contact in the touch screen operation that application interface moves;
wherein, touch screen operation refers on the touch display screen of terminal device the operation that the contact by the user triggers, this touch screen operation is used for triggering application interface and moves, this touch screen operation is specifically as follows the slide with certain displacement, different according to the type of application interface, the corresponding interface movement mode of this slide is also different, for the application interface with Pagination Display function, the interface movement mode that slide is corresponding is page turning, for the application interface with continuous Presentation Function, the interface movement mode that slide is corresponding is the application interface of mobile current demonstration, to show the extension of this application interface.
Have two touch screen operations with upper contact in the embodiment of the present invention and can be regarded as independently touch screen operation more than two.
Particularly, detect respectively the reference position of each contact and the distance between end position, obtain two with the displacement of upper contact.Wherein, the reference position of described contact and end position can be determined by the coordinate of contact.
Need to prove, this step 101 can be specially when capturing arbitrary touch screen operation, whether detect this touch screen operation is to trigger the touch screen operation that application interface moves, when detecting when triggering the touch screen operation that application interface moves, detect respectively two displacements with upper contact of this touch screen operation, otherwise, carry out other interface operations that the touch screen operation is mated.
102: with described two displacement additions with upper contact, calculate the total distance of movement of described touch screen operation;
In embodiments of the present invention, with the displacement addition of each contact of the described touch screen operation that detects, can calculate the total distance of movement of described touch screen operation.
103: distance total according to described movement, control the movement of application interface.
In embodiments of the present invention, step 101 and 102 is based on that the application interface of current demonstration carries out, particularly, terminal device detects respectively and triggers two displacements with upper contact in the touch screen operation that application interface moves on the application interface of current demonstration, according to described two displacements with upper contact, calculate the total distance of movement of described touch screen operation.
Different according to the type of using, this application interface includes but not limited to Application Program Interface and operation system interface.
Wherein, Application Program Interface can be the Application Program Interface with Pagination Display function or the Application Program Interface with continuous Presentation Function, can be the interface of the e-book browsed with the page turning form, the interface of electron album as, the Application Program Interface with Pagination Display function; Application Program Interface with continuous Presentation Function can be the interface that shows with forms such as list, menus, as, having the Application Program Interface of continuous Presentation Function can be for address list interface, management software interface etc.
Operation system interface can be the operation system interface with Pagination Display function or the operation system interface with continuous Presentation Function, as, the operation system interface with Pagination Display function can be the desktop display interface; Operation system interface with continuous Presentation Function can be for the short message management interface, set interface or application manager interface etc.
The total distance of movement according to the described touch screen operation that calculates, can control the movement of the application interface of current demonstration, application interface for different display modes, different move modes is correspondingly arranged, and described move mode can comprise that mobile application interface is with the extension that shows this application interface or the interface of switching current demonstration etc.
The method that the embodiment of the present invention provides, can be when the user need to check the current display position of application interface middle distance position far away, calculate the total distance of movement of touch screen operation according to the displacement of the contact of touch screen operation, always move apart from the extension at display application interface or switch the current application interface according to this, when the user carries out a gesture operation, the translational speed of application interface is doubled, thereby simplify user's operation.
Alternatively, on basis embodiment illustrated in fig. 1, step 101 " detect to trigger respectively two displacements with upper contact in the touch screen operation that application interface moves " can comprise step 101a and 101b:
101a: the motion track that detect to trigger respectively each contact in the touch screen operation that application interface moves;
Wherein, described motion track refers to the user's finger contacts touch display screen until user's finger leaves the track of the mobile alignment of contact on described touch display screen between touch display screen; Described motion track includes but not limited to the shapes such as straight line and camber line.
101b: according to the motion track of each contact, obtain the displacement of each contact.
Particularly, after the motion track of each contact in described touch screen operation being detected, straight line or camber line according to the motion track of each contact, can obtain in different ways the displacement of each contact, for example, when the motion track of described each contact was straight line, reference position and the air line distance between end position of this motion track just can be thought the displacement of described each contact.
Alternatively, on basis embodiment illustrated in fig. 1, step 101b " according to the motion track of each contact, obtains the displacement of each contact " adopts any form in following steps 101b-1,101b-2:
101b-1: obtain the starting point coordinate of motion track of each contact and the air line distance between the end point coordinate, as the displacement of each contact;
In embodiments of the present invention, obtain starting point coordinate and the end point coordinate of the motion track of each contact, calculate the starting point coordinate of motion track of each contact and the air line distance between the end point coordinate, with the displacement of this distance as described each contact.
101b-2: obtain the starting point coordinate of motion track of described each contact and the camber line distance between the end point coordinate, as the displacement of each contact.
In embodiments of the present invention, obtain starting point coordinate and the end point coordinate of the motion track of each contact, calculate the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, with the displacement of this distance as described each contact.
need to prove, when motion track is straight line or camber line, all can use above-mentioned any method to obtain displacement, and in order to determine more accurately displacement, can also be first the type of motion track be judged, that is to say that the motion track that judges the contact is straight line or camber line, when the motion track that described each contact detected is straight line, preferably, obtain starting point coordinate and the end point coordinate of the motion track of each contact, calculate the starting point coordinate of motion track of each contact and the air line distance between the end point coordinate, with the displacement of this distance as described each contact, and when the motion track that described each contact detected is camber line, obtain starting point coordinate and the end point coordinate of the motion track of each contact, calculate the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, this distance is retrieved as the displacement of described each contact.
Alternatively, on basis embodiment illustrated in fig. 1, this step 101b-2 " according to the starting point coordinate of the motion track of each contact and the camber line distance between the end point coordinate, obtains the displacement of each contact " and comprises step () and step (two):
Step (one): according to the coordinate points of default number on the motion track of each contact, obtain the air line distance between every two adjacent coordinates points;
In embodiments of the present invention, according to default number, choose the coordinate points with default number equal number on described motion track, obtain the air line distance between every two adjacent coordinates points, preferably, can evenly choose a default coordinate points on motion track.
Wherein, described default number can be arranged by the developer, also can be by the user individual setting, in order to guarantee to obtain the accuracy of camber line distance, can preset number and be set to bigger numerical, the numerical value of default number is larger, and the camber line distance that gets is more accurate.
Step (two): with the air line distance addition that gets, obtain the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, as the displacement of described each contact.
Particularly, with the air line distance addition between every two the adjacent coordinates points on the arc trajectory that gets, with calculate apart from summation as the starting point coordinate of this arc trajectory and the camber line distance between the end point coordinate, camber line between the starting point coordinate of the motion track of each contact and end point coordinate distance is the displacement of described each contact.
for instance, the starting point that a certain contact S detected is A, end point is B, when default number is 4, namely choose 4 coordinate points between A and B motion track, suppose that the coordinate points of choosing is C, D, E, F, calculate respectively described six coordinate points A, B, C, D, E, air line distance in F between every two adjacent coordinates points, with described six coordinate points A, B, C, D, E, air line distance addition in F between every adjacent two coordinate points, be exactly total the distance coordinate points A that obtains and the camber line distance between B, this distance can be retrieved as the displacement of contact S.
Alternatively, on basis embodiment illustrated in fig. 1, according to the difference of application interface, this step 103 " distance total according to described movement controlled the movement of application interface " comprises step 103a or 103b:
103a: the ratio of distance total according to described movement and predetermined threshold value, the application interface of controlling described current demonstration switches to and the corresponding application interface of described ratio;
It is to have under the scene of application interface of Pagination Display function that this mode generally is applied to the current application interface, such as desktop display interface, electron album interface etc.
Turn over displacement corresponding to one page when wherein, described predetermined threshold value is used for defining the operation of the single fingering row of user touch screen; Described predetermined threshold value can be arranged when developing by the technician, can also in use be arranged by the user.
Particularly, when the ratio of the total distance of described movement and predetermined threshold value during more than or equal to N and less than N+1, can determine that the total distance of described movement and the ratio of predetermined threshold value are N, according to described ratio N, the application interface that can control described current demonstration switches to corresponding application interface, that is to say that application interface page turning to the current number of pages of controlling current demonstration adds the interface of N page, wherein, N is positive integer;
For example, when current display screen showed the M page, the total distance of the movement of touch screen operation was N with the ratio of described predetermined threshold value, and the interface operation of touch screen operation coupling is page turning to the M+N page therewith.
Take operating system desktop as example, suppose current display operation system desktop the 1st page, the user can carry out the touch screen operation of sliding to the right with two fingers on touch display screen, and when terminal device detects the motion track of two contacts of touch screen operation, operate the 3rd page that shows this operating system desktop according to this touch screen, the operation of having avoided the user repeatedly to slide for page turning to the right.
103b: the application interface of controlling described current demonstration moves the total distance of described movement to the direction that described touch screen operates, to show the extension of described application interface.
It is to have under the scene of application interface of continuous Presentation Function that this mode generally is applied to the current application interface, such as address list interface, short message management interface etc.;
Particularly, by detecting the direction of described touch screen operation, the application interface of controlling current demonstration moves on corresponding direction, and mobile distance equates with the total distance of described movement, to show the extension of described application interface.
For the application interface with continuous Presentation Function, the part of current demonstration can be thought the part of application interface, for can display application the extension at interface, the user can be by operating to make the translational speed quickening at current application interface with the touch screen that has at least two contacts, show rapidly its extension, the multi-pass operations of having avoided the user to carry out in order to check the extension.
As, for address list, by the current address list application interface of distance moving total according to described movement, may be displayed on the content of the address list of failing to show on the current application interface, so that the user searches the contact person.
The method that the embodiment of the present invention provides, can be when the user need to check the current display position of application interface middle distance position far away, calculate the total distance of movement of touch screen operation according to the displacement of the contact of touch screen operation, always move apart from the extension at display application interface or switch the current application interface according to this, when the user carries out a gesture operation, the translational speed of application interface is doubled, thereby simplify user's operation.
Above-mentioned all optional technical schemes can adopt any combination to form optional embodiment, give unnecessary details no longer one by one at this.
Fig. 2 is the process flow diagram of the method that moves of control application interface that the embodiment of the present invention provides.The executive agent of this inventive embodiments is terminal device, and referring to Fig. 2, described method comprises:
201: obtain the touch screen operation that the triggering application interface of user input moves;
202: detect described touch screen operation and whether comprise plural contact; If so, execution in step 204; If not, execution in step 203;
203: the interface processing mode of operation of mating according to described touch screen operation moves the application interface of current demonstration, finishes.
204: the motion track that detects respectively each contact in described touch screen operation;
205: according to the starting point coordinate of the motion track of each contact and the air line distance between the end point coordinate, obtain the displacement of each contact;
In embodiments of the present invention, the concrete shape of motion track do not limited, but only according to the starting point coordinate of motion track and the air line distance between end point coordinate, obtain displacement.
206: according to described two displacements with upper contact, calculate the total distance of movement of described touch screen operation;
207: if the application interface of current demonstration is the application interface with Pagination Display function, the ratio of distance total according to described movement and predetermined threshold value, the application interface of controlling described current demonstration switches to and the corresponding application interface of described ratio;
208: if the application interface of current demonstration is the application interface with continuous Presentation Function, the application interface of controlling described current demonstration moves the total distance of described movement to the direction that described touch screen operates, to show the extension of described application interface.
The method that the embodiment of the present invention provides, can be when the user need to check the current display position of application interface middle distance position far away, calculate the total distance of movement of touch screen operation according to the displacement of the contact of touch screen operation, always move apart from the extension at display application interface or switch the current application interface according to this, when the user carries out a gesture operation, the translational speed of application interface is doubled, thereby simplify user's operation.
Fig. 3 is the structural representation of the device that moves of control application interface that the embodiment of the present invention provides, and referring to Fig. 3, described device comprises:
Detection module 31 is used for detecting respectively two displacements with upper contact of touch screen operation that the triggering application interface moves;
Computing module 32 is used for described two displacement additions with upper contact, calculates the total distance of movement of described touch screen operation;
Processing module 33 is used for distance total according to described movement, controls the movement of application interface.
Alternatively, described detection module 31 comprises:
The motion track detecting unit is used for detecting respectively the motion track of touch screen operation each contact of triggering that application interface moves;
The displacement acquiring unit is used for the motion track according to each contact, obtains the displacement of each contact.
Further alternatively, described displacement acquiring unit is for the starting point coordinate of the motion track that obtains each contact and the air line distance between the end point coordinate, as the displacement of each contact;
And/or,
For the starting point coordinate of the motion track that obtains described each contact and the camber line distance between the end point coordinate, as the displacement of each contact.
Further alternatively, described displacement acquiring unit also is used for the coordinate points according to default number on the motion track of each contact, obtains the air line distance between every two adjacent coordinates points; With the air line distance addition that gets, obtain the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, as the displacement of described each contact.
Alternatively, described processing module 33 comprises:
The first processing unit, for the ratio of distance total according to described movement with predetermined threshold value, the application interface of controlling current demonstration switches to and the corresponding application interface of described ratio;
The second processing unit, the application interface that is used for controlling current demonstration moves the total distance of described movement to the direction of described touch screen operation, with the extension of the application interface that shows current demonstration.
The first processing unit and the second processing unit are respectively for different application interface executable operations, and wherein the first processing unit is for the application interface with Pagination Display function, and the second processing unit is for the application interface with continuous Presentation Function.
The device that the embodiment of the present invention provides, can be when the user need to check the current display position of application interface middle distance position far away, calculate the total distance of movement of touch screen operation according to the displacement of the contact of touch screen operation, always move apart from the extension at display application interface or switch the current application interface according to this, when the user carries out a gesture operation, the translational speed of application interface is doubled, thereby simplify user's operation.
Need to prove: the device that the control application interface that above-described embodiment provides moves, only the division with above-mentioned each functional module is illustrated, in practical application, can as required above-mentioned functions be distributed and be completed by different functional modules, the inner structure that is about to terminal device is divided into different functional modules, to complete all or part of function described above.In addition, the device that the control application interface that above-described embodiment provides moves belongs to same design with the embodiment of the method for the movement of controlling application interface, and its specific implementation process sees embodiment of the method for details, repeats no more here.
The embodiment of the present invention also provides a kind of terminal device, and described terminal device comprises:
Touch display screen;
One or more processors;
Storer; With
One or more modules, described one or more module stores are in described storer and be configured to be carried out by described one or more processors, and wherein, described one or more modules have following function:
Detect to trigger respectively two displacements with upper contact in the touch screen operation that application interface moves, described touch screen operation triggers application interface and moves;
With described two displacement additions with upper contact, calculate the total distance of movement of described touch screen operation;
Distance total according to described movement controlled the movement of application interface.
Alternatively, described one or more module is used for detecting respectively the motion track of each contact of described touch screen operation; According to the motion track of each contact, obtain the displacement of each contact.
Alternatively, described one or more modules are also for the starting point coordinate of the motion track that obtains each contact and the air line distance between the end point coordinate, as the displacement of each contact; And/or, obtain the starting point coordinate of motion track of described each contact and the camber line distance between the end point coordinate, as the displacement of each contact.
Alternatively, described one or more modules also are used for the coordinate points according to default number on the motion track of described each contact, obtain the air line distance between every two adjacent coordinates points; With the air line distance addition that gets, obtain the starting point coordinate of motion track of each contact and the camber line distance between the end point coordinate, as the displacement of described each contact.
Alternatively, also for the ratio of distance total according to described movement with predetermined threshold value, the application interface of controlling current demonstration switches to and the corresponding application interface of described ratio described one or more modules; Or the application interface of controlling current demonstration moves the total distance of described movement to the direction of described touch screen operation, with the extension of the application interface that shows current demonstration.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the relevant hardware of instruction to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The above is only for preferred embodiment, and is all within the spirit and principle of the embodiment of the present invention not in order to limit the embodiment of the present invention, any modification of doing, is equal to replacement, improvement etc., within all should being included in the protection domain of the embodiment of the present invention.