Disclosure of Invention
The present invention provides a method for detecting a touch screen operation, a mobile terminal and a storage medium, aiming at solving the problem of poor usability of touch operation on a touch screen in the prior art.
The technical scheme adopted by the invention for solving the technical problem is as follows:
an operation detection method of a touch screen comprises the following steps:
detecting a touch track of a user, and acquiring a last touch point when the user is detected to release the touch screen;
and executing corresponding operation on the icon where the last touch point is located according to the touch track.
The operation detection method of the touch screen comprises the following steps of detecting a touch track of a user, and obtaining a last touch point when the user releases the touch screen, wherein the steps are as follows:
a plurality of concentric patterns are generated in advance by taking the icon as the center, and each concentric pattern is marked with different marks.
The operation detection method of the touch screen, wherein the detecting a touch trajectory of a user and the acquiring a last touch point when the user is detected to release the touch screen specifically include:
detecting a touch track of a user, and recording labels of passing concentric patterns to obtain a label sequence;
and when the fact that the user releases the touch screen is detected, the last touch point is obtained, and when the touch point is on the icon, whether the preset operation corresponding to the current label sequence exists or not is judged.
The operation detection method of the touch screen, wherein the executing of the corresponding operation according to the icon where the touch point is located specifically includes:
and when the corresponding preset operation exists in the current label sequence, executing the corresponding preset operation on the icon where the last touch point is located.
The operation detection method of the touch screen, wherein the recording of the passing concentric pattern label specifically includes:
when there are multiple icons on the touch screen, the number of concentric patterns passing through each icon is recorded.
A mobile terminal, comprising a processor, and a memory connected to the processor, wherein the memory stores an operation detection program of a touch screen, and the operation detection program of the touch screen implements the following steps when executed by the processor:
detecting a touch track of a user, and acquiring a last touch point when the user is detected to release the touch screen;
and executing corresponding operation on the icon where the last touch point is located according to the touch track.
The mobile terminal, wherein when the operation detection program of the touch screen is executed by the processor, the following steps are further implemented:
a plurality of concentric patterns are generated in advance by taking the icon as the center, and each concentric pattern is marked with different marks.
The mobile terminal, wherein when the operation detection program of the touch screen is executed by the processor, the following steps are further implemented:
detecting a touch track of a user, and recording labels of passing concentric patterns to obtain a label sequence;
and when the fact that the user releases the touch screen is detected, the last touch point is obtained, and when the touch point is on the icon, whether the preset operation corresponding to the current label sequence exists or not is judged.
The mobile terminal, wherein when the operation detection program of the touch screen is executed by the processor, the following steps are further implemented:
and when the corresponding preset operation exists in the current label sequence, executing the corresponding preset operation on the icon where the last touch point is located.
A storage medium, wherein the storage medium stores an operation detection program of a touch screen, and the operation detection program of the touch screen realizes the steps of any one of the operation detection methods of the touch screen when being executed by a processor.
Has the advantages that: because the icon where the last touch point of the touch track is located is taken as the execution object of the corresponding operation, the touch track of the user has diversity, the corresponding operation also has diversity, the operation on the icon can be greatly enriched, and the usability of the touch operation is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a preferred embodiment of an operation detection method of a touch screen.
As shown in fig. 1, the present invention provides an operation detection method for a touch screen, including:
s100, detecting a touch track of a user, and acquiring a last touch point when the user is detected to release the touch screen;
and S200, executing corresponding operation on the icon where the last touch point is located according to the touch track.
It should be noted that, by detecting a touch trajectory of a user, the icon is correspondingly operated, and a last touch point of the touch trajectory (i.e., an end point of the touch trajectory) needs to be on the icon, and the icon becomes an execution object of the corresponding operation. And if the end point of the touch track is not on the icon, not performing corresponding operation and prompting 'please designate the icon'. Due to the fact that the touch tracks of the users have diversity and the corresponding operations have diversity, the operation of the icons can be greatly enriched, and the usability of the touch operation is improved. Compared with sliding operation, clicking operation and multi-point touch operation in the prior art, the types of the operation corresponding to the touch track of the user are more, and different operations can be executed as long as the touch track of the user is changed. The operation here refers to all operations on the icon, including: basic operations such as deleting, opening, moving, updating and the like further comprise: setting the unread message as a read message, sending the stored draft mail out and the like.
In a preferred embodiment of the present invention, the step S100 further includes:
step S10 is to generate several concentric patterns with the icon as the center in advance, and to mark each concentric pattern with different mark numbers.
In this embodiment, before detecting a touch trajectory of a user, a plurality of concentric patterns are generated in advance with an icon as a center, and a label is assigned to each concentric pattern, and the labels of the concentric patterns are different. Of course, several concentric patterns may be generated centering on the icon when the user touches the icon in the range or long presses the icon. The concentric patterns may be concentric circles, concentric squares, triangles, etc., or may be corresponding concentric patterns formed according to the shapes of icons. For convenience of reference of each concentric pattern, reference may be made from the innermost pattern or from the outermost pattern, preferably from the innermost pattern to the outermost pattern. The symbols of the labels can adopt numbers, Chinese characters or English letters, and preferably, the labels of the numbers are adopted, so that the labels are convenient to read. When a plurality of concentric patterns are generated by taking the icon as the center, the labels of all the concentric patterns are displayed, and the label sequence is convenient for a user to touch.
In a preferred embodiment of the present invention, the step S100 specifically includes:
step S110, detecting a touch track of a user, and recording labels of passing concentric patterns to obtain a label sequence;
in this embodiment, after the concentric patterns are generated around the icons, when the user touches the concentric patterns, a sequence of labels obtained by the touch trajectory can be displayed on the touch screen so as to invoke the corresponding operation. For example, as shown in fig. 3, the numbers 1, 2, 3 and 4 are sequentially numbered from the innermost pattern, when the touch trajectory sequentially passes through the numbers 2, 3 and 4, the number sequence 234 is obtained, and the number sequence 234 is displayed on the touch screen; when the touch track passes through the labels 2, 3, 2 and 1 in sequence, the obtained label sequence is 2321, and meanwhile, the label sequence 2321 is displayed on the touch screen.
In a preferred embodiment of the present invention, the recording of the passing concentric pattern labels specifically comprises: when there are multiple icons on the touch screen, the number of concentric patterns passing through each icon is recorded.
In this embodiment, there are several icons on the touch screen, all the icons are formed with concentric patterns, the concentric patterns formed by the icons may be separated from each other or overlapped with each other, preferably, the concentric patterns formed by the icons are separated from each other so as to avoid that no label can be determined in the overlapped concentric pattern area, and certainly, no label can be defaulted in the overlapped concentric pattern area. For example, when the touch trajectory starts from the reference numeral 4 of one icon (denoted as the first icon) and passes through the reference numerals 4, 3, 2 and 1 of another icon (denoted as the second icon), the reference numeral sequence 44321 is obtained. Thus, when the icons are closer, fewer concentric patterns are provided, for example, when 2 concentric patterns are provided, only the reference numerals 1 and 2 are provided, and since a plurality of icons can be included in the reference numeral sequence, a plurality of reference numeral sequences, for example, 221, 121, 2221, 21221, and the like, can be obtained. It is convenient to execute various corresponding operations, and the usability of the touch operation is further improved.
And step S120, when the fact that the user releases the touch screen is detected, the last touch point is obtained, and when the touch point is on the icon, whether the preset operation corresponding to the current label sequence exists or not is judged.
In this embodiment, when the user releases the touch screen, the touch trajectory of the user is completed, and when the position of the last touch point of the touch trajectory is on the icon, the label sequence formed by the touch trajectory is determined, and if the current label sequence corresponds to a predetermined operation, step S200 is performed.
In a preferred embodiment of the present invention, the step S200 specifically includes: and when the corresponding preset operation exists in the current label sequence, executing the corresponding preset operation on the icon where the last touch point is located.
In this embodiment, when there is a corresponding predetermined operation in the current label sequence, the icon where the last touch point is located performs the corresponding predetermined operation.
The invention also provides a preferred embodiment of the mobile terminal:
as shown in fig. 2, a mobile terminal provided by the present invention includes: a processor 10, and a memory 20 connected to the processor 10, wherein the memory 20 stores an operation detection program of a touch screen, and the operation detection program of the touch screen realizes the following steps when executed by the processor 10:
detecting a touch track of a user, and acquiring a last touch point when the user is detected to release the touch screen;
and executing corresponding operation on the icon where the last touch point is located according to the touch track, which is specifically described above.
When the processor 10 executes the operation detection program of the touch screen, the following steps are also realized:
several concentric patterns are generated in advance with the icon as the center, and each concentric pattern is labeled with a different label, as described above.
When the processor 10 executes the operation detection program of the touch screen, the following steps are also realized:
detecting a touch track of a user, and recording labels of passing concentric patterns to obtain a label sequence;
and when the touch screen is released by the user, acquiring the last touch point, and when the touch point is on the icon, judging whether the preset operation corresponding to the current label sequence exists, specifically as described above.
When the processor 10 executes the operation detection program of the touch screen, the following steps are also realized:
when the current label sequence has a corresponding predetermined operation, the corresponding predetermined operation is performed on the icon where the last touch point is located, which is specifically described above.
When the processor 10 executes the operation detection program of the touch screen, the following steps are also realized: when there are multiple icons on the touch screen, the labels of the concentric patterns passing through each icon are recorded, as described above.
The present invention also provides a preferred embodiment of a storage medium:
the storage medium stores an operation detection program of the touch screen, and the operation detection program of the touch screen realizes the steps of any one of the operation detection methods of the touch screen when being executed by the processor 10, which is specifically described above.
In summary, the present invention provides an operation detection method for a touch screen, a mobile terminal and a storage medium, wherein the method includes the steps of: detecting a touch track of a user, and acquiring a last touch point when the user is detected to release the touch screen; and executing corresponding operation on the icon where the last touch point is located according to the touch track. Because the icon where the last touch point of the touch track is located is taken as the execution object of the corresponding operation, the touch track of the user has diversity, the corresponding operation also has diversity, the operation on the icon can be greatly enriched, and the usability of the touch operation is improved.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.