Method for Processing Operation and Terminal
20170371479 · 2017-12-28
Inventors
Cpc classification
G06F2203/04808
PHYSICS
G06F3/016
PHYSICS
International classification
Abstract
A method includes detecting an operation on a touchscreen, executing a response to the operation when duration of the operation exceeds first preset duration, and returning to a state that exists when the response to the operation is not executed when the duration of the operation exceeds second preset duration, where the second preset duration is greater than the first preset duration. Hence, the technical solutions effectively identify an operation on a touchscreen, and lower a probability of occurrence of a misoperation.
Claims
1.-30. (canceled)
31. A method for processing an operation, comprising: detecting a first operation on a touchscreen; executing a response to the first operation when a duration of the first operation exceeds a first preset duration; returning to a state that exists when the response to the first operation is not executed when the duration of the first operation exceeds a second preset duration, wherein the second preset duration is greater than the first preset duration; detecting a second operation on the touchscreen before the first operation ends, wherein a type of the second operation is the same as a type of the first operation; and executing a response to the second operation when a duration of the second operation exceeds the first preset duration and does not exceed the second preset duration.
32. The method according to claim 31, wherein executing the response to the first operation comprises outputting a short-cut menu corresponding to the first operation to the touchscreen when the duration of the first operation exceeds the first preset duration, wherein the short-cut menu comprises at least one operation option, and wherein returning to the state that exists when the response to the first operation is not executed when the duration of the first operation exceeds the second preset duration comprises hiding the short-cut menu corresponding to the first operation when the duration of the first operation exceeds the second preset duration.
33. The method according to claim 31, wherein when the duration of the second operation exceeds the second preset duration, the method further comprises returning to a state that exists when the response to the second operation is not executed.
34. The method according to claim 31, wherein before the first operation ends, the method further comprises: detecting a third operation on the touchscreen; and executing a response to the third operation, wherein a type of the third operation is different from a type of the first operation.
35. A mobile terminal, comprising: a memory comprising a program code; a touchscreen; and a processor, wherein the memory, the touchscreen and the processor are connected to each other using a bus, and wherein the program code cause the processor to be configured to: detect a first operation on the touchscreen; execute a response to the first operation when a duration of the first operation exceeds a first preset duration; return to a state that exists when the response to the first operation is not executed when the duration of the first operation exceeds a second preset duration, wherein the second preset duration is greater than the first preset duration; detect a second operation on the touchscreen before the first operation ends, wherein a type of the second operation is the same as a type of the first operation; and execute a response to the second operation when a duration of the second operation exceeds the first preset duration and does not exceed the second preset duration.
36. The mobile terminal according to claim 35, wherein when executing the response to the first operation, the program code further causes the processor to be configured to output a short-cut menu corresponding to the first operation to the touchscreen, wherein the short-cut menu comprises at least one operation option, and wherein when returning to the state that exists when the response to the first operation is not executed, the program code further causes the processor to be configured to hide the short-cut menu corresponding to the first operation.
37. The mobile terminal according to claim 35, wherein when the duration of the second operation exceeds the second preset duration, the program code further causes the processor to be configured to return to a state that exists when the response to the second operation is not executed.
38. The mobile terminal according to claim 35, wherein before the first operation ends, the program code further causes the processor to be configured to: detect a third operation on the touchscreen; and execute a response to the third operation, wherein a type of the third operation is different from a type of the first operation.
39. A non-transitory computer readable medium comprising computer readable instructions that, when executed by a computer processor, cause the computer processor to implement the following operations; detecting a first operation on a touchscreen; executing a response to the first operation when a duration of the first operation exceeds a first preset duration; returning to a state that exists when the response to the first operation is not executed when the duration of the first operation exceeds a second preset duration, wherein the second preset duration is greater than the first preset duration; detecting a second operation on the touchscreen before the first operation ends, wherein a type of the second operation is the same as a type of the first operation; and executing a response to the second operation when a duration of the second operation exceeds the first preset duration and does not exceed the second preset duration.
40. The non-transitory computer readable medium according to claim 39, wherein when executing the response to the first operation, the computer readable instructions further cause the computer processor to implement the operation of outputting a short-cut menu corresponding to the first operation to the touchscreen, wherein the short-cut menu comprises at least one operation option, and wherein when returning to the state that exists when the response to the first operation is not executed, the computer readable instructions further cause the computer processor to implement the operation of hiding the short-cut menu corresponding to the first operation.
41. The non-transitory computer readable medium according to claim 39, wherein when the duration of the second operation exceeds the second preset duration, the computer readable instructions further cause the computer processor to implement the operation of returning to a state that exists when the response to the second operation is not executed.
42. The non-transitory computer readable medium according to claim 39, wherein before the first operation ends, the computer readable instructions further cause the computer processor to implement the following operations: detecting a third operation on the touchscreen; and executing a response to the third operation, wherein a type of the third operation is different from a type of the first operation.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0036] To describe the technical solutions in the embodiments of the present disclosure more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. The accompanying drawings in the following description show merely some embodiments of the present disclosure, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
DESCRIPTION OF EMBODIMENTS
[0050] The following clearly and completely describes the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. The described embodiments are merely a part rather than all of the embodiments of the present disclosure. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
[0051] Embodiments of the present disclosure provide a method for processing an operation and a terminal, which can lower a probability of occurrence of a misoperation. Detailed descriptions are separately provided below.
[0052] It should be noted that, the mobile terminal involved in this specification includes, but is not limited to a mobile phone, a mobile computer, a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), a smart watch, smart glasses, a smart band, and the like having a touchscreen.
[0053] Referring to
[0054] It should be noted that, step 101 to step 103 are performed by a mobile terminal or a processor in a mobile terminal, for example, a Central Processing Unit (CPU).
[0055] Step 101: Detect an operation on a touchscreen.
[0056] In this embodiment of the present disclosure, the touchscreen may also be referred to as a touch panel, a touch sensor, a capacitive touchscreen, or the like. This is not described again below in this embodiment of the present disclosure.
[0057] In this embodiment of the present disclosure, a user may input an operation to a mobile terminal using a touchscreen. The operation may include, but is not limited to tap (for example, single tap and double tap), slide, touch & hold, and the like.
[0058] The operation is generally touch & hold, which is not described again below in this embodiment of the present disclosure.
[0059] It should be noted that, in this embodiment of the present disclosure, the mentioned touchscreen is a touchscreen in a screen-on state unless otherwise described, which is not described again below in this embodiment of the present disclosure.
[0060] Step 102: Execute a response to the operation when duration of the operation exceeds first preset duration.
[0061] In this embodiment of the present disclosure, duration (first preset duration) may be preset. The first preset duration may be considered as shortest response duration of each function (including a function of the mobile terminal and a function that particular software has) of the mobile terminal, that is, the mobile terminal responds to the operation only when the duration of the operation on the touchscreen reaches a minimum of the first preset duration. For example, the first preset duration (for example, one second) may be set according to parameters such as sensitivity of the touchscreen and response time of each function of the mobile terminal.
[0062] Correspondingly, when detecting the operation on the touchscreen, the mobile terminal may collect statistics on duration of the operation. When the duration of the operation exceeds the first preset duration, the mobile terminal needs to respond to the operation, and further, the mobile terminal may execute the response to the operation, for example, a short-cut menu corresponding to the operation pops up, and an object of the operation is set to be in a movable state.
[0063] For example, in this embodiment of the present disclosure, when the mobile terminal detects the operation on the touchscreen, and the duration of the operation exceeds the first preset duration, the mobile terminal may output the short-cut menu corresponding to the operation to the touchscreen, where the short-cut menu may include at least one operation option.
[0064] For example, the operation is performed when a thumb of the user touches the touchscreen while the user holds the mobile terminal. Assuming that the response, preconfigured in the mobile phone, to the operation is a select operation, and the user may further select an operation such as copy, cut, and delete for an selected object, in this embodiment of the present disclosure, when the mobile terminal detects the foregoing operation, a short-cut menu including operation options such as “copy,” “cut,” and “delete” may pop up on the touchscreen.
[0065] Step 103: Return to a state that exists when the response to the operation is not executed, when the duration of the operation exceeds second preset duration.
[0066] In this embodiment of the present disclosure, another duration (second preset duration) may be further preset. The second preset duration may be considered as longest response duration of each function (including a function of the mobile terminal and a function that particular software has) of the mobile terminal, that is, when the duration of the operation on the touchscreen exceeds the second preset duration, the mobile terminal may consider that the operation is an invalid operation. If the operation has been responded to, the response to the operation needs to be canceled. The second preset duration is greater than the first preset duration.
[0067] Correspondingly, in this embodiment of the present disclosure, after the duration of the operation on the touchscreen exceeds the first preset duration, and the mobile terminal executes the response to the operation, the mobile terminal may continue to collect statistics on the duration of the operation, to determine whether the duration exceeds the second preset duration. If the duration exceeds the second preset duration, the mobile terminal considers that the operation is an invalid operation. The mobile terminal may return to a state that exists when the response to the operation is not executed, for example, hide a pop-up operation box corresponding to the operation, and recover, from a movable state to a normal state, an object corresponding to the operation.
[0068] For example, it is assumed that the first preset duration is one second and the second preset duration is three seconds. When the mobile terminal detects an operation on the touchscreen, and duration of the operation exceeds one second, the mobile terminal may execute a response to the operation, for example, set an object (for example, an icon or a picture of an application program) corresponding to the operation to be in a movable state, that is, the user may change a location of the icon or picture of the application program in the state. After the mobile terminal performs the foregoing operation, if the operation does not end yet, the mobile terminal may continue to collect statistics on the duration of the operation. If the duration of the operation exceeds three seconds, the mobile terminal may consider that the operation is an invalid operation. For example, the operation may be an operation of accidental touch of the user. Therefore, the mobile terminal may recover, from a movable state to a normal state, an object corresponding to the operation.
[0069] In this embodiment of the present disclosure, when the duration of the operation exceeds the first preset duration, but does not exceed the second preset duration, the mobile terminal may determine that the operation is a valid operation, and normally execute a response to the operation, or the mobile terminal may further determine, using another strategy, whether to cancel the response to the operation. Specific implementation thereof is not limited in this embodiment of the present disclosure.
[0070] For example, referring to
[0071] Optionally, in this embodiment of the present disclosure, if a mobile terminal detects an operation on a touchscreen, and duration of the operation exceeds first preset duration, the mobile terminal outputs a short-cut menu corresponding to the operation to the touchscreen. When the duration of the operation exceeds second preset duration, the mobile terminal may hide the short-cut menu.
[0072] In this embodiment of the present disclosure, in the method for processing an operation shown in
[0073] Optionally, in this embodiment of the present disclosure, in the process of the method shown in
[0074] Correspondingly, referring to
[0075] It should be noted that, step 104a and step 105a are performed by a mobile terminal or a processor in a mobile terminal, for example, a CPU.
[0076] Step 104a: Before the operation ends, detect another operation on the touchscreen, where a type of the other operation is the same as a type of the operation.
[0077] Step 105a: If duration of the other operation exceeds the first preset duration and does not exceed the second preset duration, execute a response to the other operation.
[0078] In this embodiment of the present disclosure, after the mobile terminal determines that the duration of the operation (a first operation) on the touchscreen exceeds the second preset duration, before the first operation ends (for example, the first operation is performed when a thumb of the user touches the touchscreen while the user holds the mobile terminal, and the first operation ends when the thumb of the user leaves the touchscreen), the mobile terminal may further detect another operation on the touchscreen, for example, tap (for example, single tap and double tap), slide, or touch & hold.
[0079] In this embodiment of the present disclosure, after the mobile terminal detects the other operation (a second operation) on the touchscreen, if a type of the second operation is the same as a type of the first operation, for example, assuming that the first operation is touch & hold, and the second operation is also touch & hold, the mobile terminal may collect statistics on duration of the second operation. If the duration of the second operation exceeds the first preset duration, and does not exceed the second preset duration, the mobile terminal may execute a response to the second operation.
[0080] For example, referring to
[0081] In this embodiment of the present disclosure, if the duration of the second operation also exceeds the second preset duration, the mobile terminal may also consider that the second operation is also an invalid operation. Further, the mobile terminal may return to a state that exists when the response to the second operation is not executed. For a specific processing process thereof, refer to a processing process of the mobile terminal when the duration of the first operation exceeds the second preset duration in the process of the method shown in
[0082] In the method for processing an operation shown in
[0083] Optionally, in this embodiment of the present disclosure, in the process of the method shown in
[0084] Correspondingly, referring to
[0085] It should be noted that, step 104b to step 106b are performed by a mobile terminal or a processor in a mobile terminal, for example, a CPU. Besides, in the process of the method shown in
[0086] Step 104b: Before the operation ends, detect another operation on the touchscreen, where a type of the other operation is different from a type of the operation.
[0087] Step 105b: If the other operation is a single-finger slide operation, A mobile terminal performs a browse operation corresponding to the single-finger slide operation.
[0088] Step 106b: If the other operation is a double-finger slide operation, A mobile terminal performs a pinch & stretch operation corresponding to the double-finger slide operation.
[0089] In this embodiment of the present disclosure, before the operation (a first operation) on the touchscreen ends (for example, the first operation is performed when a thumb of a user touches the touchscreen while the user holds the mobile terminal, and the first operation ends when the thumb of the user leaves the touchscreen), the mobile terminal may further detect another operation on the touchscreen, for example, tap (for example, single tap and double tap), slide, or touch & hold.
[0090] In this embodiment of the present disclosure, after the mobile terminal detects another operation (a second operation) on the touchscreen, the mobile terminal may execute a response to the second operation if a type of the second operation is different from a type of the first operation, for example, if the first operation is touch & hold, and the second operation is slide.
[0091] If the second operation is single-finger slide, the mobile terminal may execute the response to the second operation according to a direction in which a finger slides on the touchscreen.
[0092] For example, the user browses a webpage using the mobile terminal. When a single finger of the user slides upwards on the touchscreen, the mobile terminal may drag the webpage upwards, and when a single finger of the user slides upwards on the touchscreen, the mobile terminal may drag the webpage downwards.
[0093] For another example, the user browses, using the mobile terminal, a picture stored in the mobile terminal. When a single finger of the user slides to left on the touchscreen, the mobile terminal may display a next picture on the touchscreen, and when a single finger of the user slides to right on the touchscreen, the mobile terminal may display a previous picture on the touchscreen.
[0094] If the second operation is double-finger slide, the mobile terminal may execute the response to the second operation according to whether double fingers of the user slide towards each other or slide away from each other on the touchscreen.
[0095] For example, the user browses, using the mobile terminal, a picture stored in the mobile terminal. When double fingers of the user slide towards each other on the touchscreen (that is, the double fingers get close to each other), the mobile terminal may pinch a picture currently displayed on the touchscreen, and when double fingers of the user slide away from each other on the touchscreen (that is, the double fingers get away from each other), the mobile terminal may stretch a picture currently displayed on the touchscreen.
[0096] In the method for processing an operation shown in
[0097] In this embodiment of the present disclosure, when a mobile terminal detects an operation on a touchscreen, the mobile terminal determines, by referring to the processes of the methods shown in
[0098] The following describes the technical solution of determining, according to a touch area of the operation, whether the operation is a valid operation provided in this embodiment of the present disclosure in detail with reference to
[0099] Referring to
[0100] As shown in
[0101] It should be noted that, step 401 to step 404 are performed by a mobile terminal or a processor in a mobile terminal, for example, a CPU.
[0102] Step 401: Detect an operation on a touchscreen.
[0103] Step 402: Obtain a touch area of the operation.
[0104] In this embodiment of the present disclosure, when the mobile terminal detects the operation on the touchscreen, the mobile terminal may obtain the touch area of the operation. For example, the user touches the touchscreen using a finger. The touch area of the operation is an area touched by the finger of the user on the touchscreen.
[0105] Step 403: Determine whether the touch area of the operation is overlapped with both the first area and the second area. If the touch area of the operation is overlapped with both the first area and the second area, perform step 404, and otherwise, the current process ends.
[0106] In this embodiment of the present disclosure, after obtaining the touch area of the operation on the touchscreen, the mobile terminal may determine whether the touch area of the operation is overlapped with both the first area and the second area, that is, determines whether the touch area of the operation not only includes a part of the first area but also includes a part of the second area. For example, the user touches the touchscreen using a finger, the mobile terminal determines whether the finger of the user simultaneously touches the first area and the second area.
[0107] In this embodiment of the present disclosure, when the mobile terminal determines that the touch area of the operation is overlapped with both the first area and the second area, that is, the touch area of the operation not only includes a part of the first area but also includes a part of the second area, the mobile terminal may consider that the operation is an invalid operation, that is, the mobile terminal may skip executing a response to the operation.
[0108] A touchscreen shown in
[0109] In this embodiment of the present disclosure, when the mobile terminal determines that the touch area of the operation on the touchscreen is not overlapped with the first area, or the touch area of the operation is not overlapped with the second area, the mobile terminal may determine that the operation is a valid operation and execute a response to the operation. Alternatively, the mobile terminal may determine, using another strategy, whether to execute a response to the operation. For example, whether to execute a response to the operation is determined with reference to the processes of the methods shown in
[0110] Step 404: Skip executing a response to the operation.
[0111] In this embodiment of the present disclosure, when the mobile terminal detects the operation on the touchscreen and determines that the touch area of the operation is overlapped with both the first area and the second area, the mobile terminal may skip executing the response to the operation, for example, skip the response to the operation, or ignore the response to the operation.
[0112] For example, referring to
[0113] Optionally, in this embodiment of the present disclosure, when the mobile terminal detects the operation on the touchscreen, the mobile terminal may output a short-cut menu corresponding to the operation to the touchscreen, where the short-cut menu includes at least one operation option. Further, when the mobile terminal determines that the touch area of the operation is overlapped with both the first area and the second area, the mobile terminal may hide the short-cut menu corresponding to the operation.
[0114] For example, the operation is performed when a thumb of the user touches the touchscreen while the user holds the mobile terminal. Assuming that an operation that is preconfigured in the mobile phone and that responds to the operation is a select operation, and the user may further select an operation such as copy, cut, and delete for an selected object, in this embodiment of the present disclosure, when the mobile terminal detects the foregoing operation, a short-cut menu including operation options such as “copy,” “cut,” and “delete” may pop up on the touchscreen. When the mobile terminal determines that a touch area of the operation is overlapped with both a first area and a second area, the mobile terminal may hide the short-cut menu.
[0115] In this embodiment of the present disclosure, according to the method for processing an operation shown in
[0116] Optionally, in this embodiment of the present disclosure, in the process of the method shown in
[0117] Correspondingly, referring to
[0118] It should be noted that, step 405a to step 409a are performed by a mobile terminal or a processor in a mobile terminal, for example, a CPU.
[0119] Step 405a: Before the operation ends, detect another operation on the touchscreen.
[0120] Step 406a: Obtain a touch area of the other operation.
[0121] Step 407a: Determine whether the touch area of the other operation is overlapped with both the first area and the second area, and if the touch area of the other operation is overlapped with both the first area and the second area, perform step 408a, and otherwise, perform step 409a.
[0122] In this embodiment of the present disclosure, before the operation (a first operation) on the touchscreen ends (for example, the first operation is performed when a thumb of a user touches the touchscreen while the user holds the mobile terminal, and the first operation ends when the thumb of the user leaves the touchscreen), the mobile terminal may further detect another operation on the touchscreen, for example, tap (for example, single tap and double tap), slide, or touch & hold.
[0123] In this embodiment of the present disclosure, after detecting the other operation (a second operation) on the touchscreen, the mobile terminal may further determine whether a touch area of the second operation is overlapped with both the first area and the second area. For specific implementation thereof, refer to related descriptions in step 403, and details are not described herein again.
[0124] Step 408a: Skip executing a response to the other operation.
[0125] In this embodiment of the present disclosure, when the mobile terminal determines that the touch area of the second operation is overlapped with both the first area and the second area, the mobile terminal may skip executing the response to the second operation, for example, skip the response to the second operation, or ignore the response to the second operation.
[0126] Step 409a: Execute a response to the other operation.
[0127] In this embodiment of the present disclosure, when the mobile terminal determines that the touch area of the second operation is not overlapped with the first area, or the touch area of the second operation is not overlapped with the second area, the mobile terminal may consider that the second operation is a valid operation, and execute a response to the second operation.
[0128] For example, the first operation is performed when a thumb of the user touches the touchscreen while the user holds the mobile terminal. After the mobile terminal determines that touching the touchscreen by the thumb of the user is an invalid operation, if the mobile terminal detects a second operation on the touchscreen before the thumb of the user leaves the touchscreen, for example, the user taps a button “setting,” where it is assumed that a touch area of the second operation is not overlapped with the first area, or a touch area of the second operation is not overlapped with the second area, the mobile terminal determines that the second operation is a valid operation and executes a response operation to the second operation, that is, enters a setting function interface, thereby ensuring that the mobile terminal can normally respond to, in a case in which a finger accidentally touches the touchscreen when the user holds the mobile terminal, another touch operation input by the user.
[0129] In this embodiment of the present disclosure, in the method for processing an operation shown in
[0130] Optionally, in this embodiment of the present disclosure, in the process of the method shown in
[0131] Correspondingly, referring to
[0132] It should be noted that, step 405b to step 410b are performed by a mobile terminal or a processor in a mobile terminal, for example, a CPU.
[0133] Step 405b: Before the operation ends, detect another operation on the touchscreen.
[0134] Step 406b: Obtain a touch area of the other operation.
[0135] Step 407b: Determine whether the touch area of the other operation is overlapped with both the first area and the second area, and if the touch area of the other operation is overlapped with both the first area and the second area, perform step 408b, and otherwise, perform step 409b or 410b.
[0136] In this embodiment of the present disclosure, before the operation (a first operation) on the touchscreen ends (for example, the first operation is performed when a thumb of a user touches the touchscreen while the user holds the mobile terminal, and the first operation ends when the thumb of the user leaves the touchscreen), the mobile terminal may further detect another operation on the touchscreen, for example, tap (for example, single tap and double tap), slide, or touch & hold.
[0137] In this embodiment of the present disclosure, after detecting the other operation (a second operation) on the touchscreen, the mobile terminal may further determine whether a touch area of the second operation is overlapped with both the first area and the second area. For specific implementation thereof, refer to related descriptions in step 403, and details are not described herein again.
[0138] Step 408b: Skip executing a response to the other operation.
[0139] In this embodiment of the present disclosure, when the mobile terminal determines that the touch area of the second operation is overlapped with both the first area and the second area, the mobile terminal may skip executing the response to the second operation, for example, skip the response to the second operation, or ignore the response to the second operation.
[0140] Step 409b: When the other operation is a single-finger slide operation, the mobile terminal performs a browse operation corresponding to the single-finger slide operation.
[0141] Step 410b: When the other operation is a double-finger slide operation, the mobile terminal performs a pinch & stretch operation corresponding to the double-finger slide operation.
[0142] In this embodiment of the present disclosure, when the mobile terminal determines that the touch area of the second operation is not overlapped with the first area, or the mobile terminal determines that the touch area of the second operation is not overlapped with the second area, the mobile terminal may consider that the second operation is a valid operation, and execute the response to the second operation.
[0143] If the second operation is single-finger slide, the mobile terminal may execute the response to the second operation according to a direction in which a finger slides on the touchscreen.
[0144] For example, the user browses a webpage using the mobile terminal. When a single finger of the user slides upwards on the touchscreen, the mobile terminal may drag the webpage upwards, and when a single finger of the user slides upwards on the touchscreen, the mobile terminal may drag the webpage downwards.
[0145] For another example, the user browses, using the mobile terminal, a picture stored in the mobile terminal. When a single finger of the user slides to left on the touchscreen, the mobile terminal may display a next picture on the touchscreen, and when a single finger of the user slides to right on the touchscreen, the mobile terminal may display a previous picture on the touchscreen.
[0146] If the second operation is double-finger slide, the mobile terminal may execute the response to the second operation according to whether double fingers of the user slide towards each other or slide away from each other on the touchscreen.
[0147] For example, the user browses, using the mobile terminal, a picture stored in the mobile terminal. When double fingers of the user slide towards each other on the touchscreen (that is, the double fingers get close to each other), the mobile terminal may pinch a picture currently displayed on the touchscreen, and when double fingers of the user slide away from each other on the touchscreen (that is, the double fingers get away from each other), the mobile terminal may stretch a picture currently displayed on the touchscreen.
[0148] In this embodiment of the present disclosure, in the method for processing an operation shown in
[0149] Referring to
[0150] In this embodiment of the present disclosure, when the detection module 701 detects an operation on a touchscreen, the processing module 702 may be enabled. After being enabled by the detection module 701, the processing module 702 may collect statistics on duration of the operation. When the duration of the operation exceeds first preset duration, the processing module 702 may execute a response to the operation. In this case, if the operation still does not end, the processing module 702 may continue to collect statistics on the duration of the operation. If the duration of the operation exceeds second preset duration, the processing module 702 may consider that the operation is an invalid operation, and control the mobile terminal to return to a state that exists when the response to the operation is not executed.
[0151] In an optional embodiment, the processing module 702 may be further configured to output a short-cut menu corresponding to the operation to the touchscreen when the duration of the operation exceeds the first preset duration, where the short-cut menu includes at least one operation option, and hide the short-cut menu corresponding to the operation when the duration of the operation exceeds the second preset duration.
[0152] In this embodiment of the present disclosure, when the duration of the operation on the touchscreen exceeds the first preset duration, the processing module 702 may output the short-cut menu corresponding to the operation to the touchscreen. Further, if the duration of the operation does not exceed the second preset duration, that is, when the operation is a valid operation, the mobile terminal may perform a corresponding response operation according to a selection instruction of the user for an operation option in the short-cut menu. If the duration of the operation exceeds the second preset duration, the processing module 702 may consider that the operation is an invalid operation. Further, the processing module 702 may hide the short-cut menu corresponding to the operation.
[0153] In an optional embodiment, the detection module 701 is further configured to detect another operation on the touchscreen before the operation ends, where a type of the other operation is the same as a type of the operation, and correspondingly, the processing module 702 is further configured to execute a response to the other operation if duration of the other operation exceeds the first preset duration and does not exceed the second preset duration.
[0154] The processing module 702 may be further configured to return to a state that exists when the response to the other operation is not executed if the duration of the other operation exceeds the second preset duration.
[0155] In this embodiment of the present disclosure, after detecting the operation (the first operation) on the touchscreen, the detection module 701 may further detect another operation on the touchscreen.
[0156] If the processing module 702 determines that the first operation is an invalid operation, and the detection module 701 detects, before the first operation ends, another operation (the second operation) that is performed on the touchscreen and whose type is the same as the first operation, the detection module 701 may enable the processing module 702 to determine whether the second operation is a valid operation or an invalid operation. After the processing module 702 is enabled, if the processing module 702 determines that duration of the second operation exceeds the first preset duration, and does not exceed the second preset duration, the processing module 702 may determine that the second operation is a valid operation, and may further execute a response to the second operation. If the duration of the second operation exceeds the second preset duration, the processing module 702 may determine that the second operation is an invalid operation, and control the mobile terminal to return to a state that exists when the response to the other operation is not executed.
[0157] In an optional embodiment, the detection module 701 may be further configured to detect another operation on the touchscreen before the operation ends, where a type of the other operation is different from a type of the operation, and correspondingly, the processing module 702 may be further configured to execute a response to the other operation.
[0158] In this embodiment of the present disclosure, if the processing module 702 determines that the first operation is an invalid operation, and the detection module 701 detects, before the first operation ends, another operation that is performed on the touchscreen and whose type is different from a type of the first operation, the processing module 702 may be enabled to execute a response to the other operation.
[0159] For example, assuming that the first operation is a touch & hold operation, when the processing module 702 determines that the duration of the first operation exceeds the second preset duration, that is, when the first operation is an invalid operation, if the detection module 701 detects another operation on the touchscreen, where it is assumed that the other operation is a slide operation, the detection module 701 may directly enable the processing module 702 to execute a response to the other operation.
[0160] In this embodiment of the present disclosure, the mobile terminal shown in
[0161] Referring to
[0162] In an optional embodiment, executing, by the processor 801, a response to an operation includes outputting, by the processor 801, a short-cut menu corresponding to the operation to the touchscreen 803, where the short-cut menu includes at least one operation option, and returning, by the processor 801, to a state that exists when the response to the operation is not executed includes hiding, by the processor 801, the short-cut menu corresponding to the operation.
[0163] In an optional embodiment, the processor 801 may further perform the operations of detecting another operation on the touchscreen 803 before the operation ends, where a type of the other operation is the same as a type of the operation, and executing a response to the other operation if duration of the other operation exceeds the first preset duration and does not exceed the second preset duration.
[0164] In an optional embodiment, the processor 801 may further perform the operation of returning to a state that exists when the response to the other operation is not executed if the duration of the other operation exceeds the second preset duration.
[0165] In an optional embodiment, before the operation ends, the processor 801 may further perform the operation of detecting another operation on the touchscreen 803, and executing a response to the other operation, where a type of the other operation is different from a type of the operation.
[0166] It should be noted that, the mobile terminal shown in
[0167] In this embodiment of the present disclosure, the mobile terminal shown in
[0168] Referring to
[0169] In this embodiment of the present disclosure, when the determining module 903 determines that the touch area of the operation is overlapped with both the first area and the second area, the processing module 904 may consider that the operation is an invalid operation and skip performing the response to the operation.
[0170] In an optional embodiment, when the determining module 903 determines that the touch area of the operation is overlapped with both the first area and the second area, the processing module 904 may further configured to skip the response to the operation, or ignore the response to the operation.
[0171] In an optional embodiment, the processing module 904 may be further configured to execute the response to the operation when the determining module 903 determines that the touch area of the operation is not overlapped with both the first area and the second area.
[0172] In this embodiment of the present disclosure, when the determining module 903 determines that the touch area of the operation is not overlapped with the first area, or the touch area is not overlapped with the second area, the processing module 904 may consider that the operation is a valid operation and execute the response to the operation. Alternatively, the mobile terminal may determine, using another strategy, whether the operation is an invalid operation or a valid operation. Specific implementation thereof is not described in detail herein.
[0173] In an optional embodiment, the detection module 901 may be further configured to detect another operation on the touchscreen before the first operation ends. The obtaining module 902 may be further configured to obtain a touch area of the other operation. The determining module 903 may be further configured to determine whether the touch area of the other operation is overlapped with both the first area and the second area, and the processing module 904 may be further configured to perform a response operation to the other operation when the determining module 903 determines that the touch area of the other operation is not overlapped with the first area, or the touch area of the other operation is not overlapped with the second area.
[0174] The processing module 904 may be further configured to skip executing the response to the other operation when the determining module 903 determines that the touch area of the other operation is overlapped with both the first area and the second area.
[0175] In this embodiment of the present disclosure, after detecting the operation (the first operation) on the touchscreen, the detection module 901 may also detect another operation on the touchscreen.
[0176] When the first operation is an invalid operation, and the detection module 901 detects, before the first operation ends, the other operation (a second operation) on the touchscreen, the obtaining module 902 may be enabled to obtain a touch area of the second operation. After the obtaining module 902 obtains the touch area of the second operation, the determining module 903 may be enabled to determine whether the touch area of the second operation is overlapped with both a first area and a second area. If the determining module 903 determines that the touch area of the second operation is not overlapped with both the first area and the second area, the processing module 904 may consider that the second operation is a valid operation, and further execute a response to the second operation. If the determining module 903 determines that the touch area of the second operation is overlapped with both the first area and the second area, the processing module 904 may consider that the second operation is an invalid operation and skip performing a response to the second operation.
[0177] In this embodiment of the present disclosure, the mobile terminal shown in
[0178] Referring to
[0179] In an optional embodiment, invoking, by the processor 1001, the program code stored in the memory 1002 in order to skip executing a response to the operation includes skipping, by the processor 1001, the response to the operation, or ignoring, by the processor 1001, the response to the operation.
[0180] In an optional embodiment, the processor 1001 may further perform the operation of executing the response to the operation if the touch area of the operation is not overlapped with both the first area and the second area.
[0181] In an optional embodiment, after the touch area of the operation is overlapped with both the first area and the second area, and before the operation ends, the processor 1001 may further perform the operations of detecting another operation on the touchscreen 1003, obtaining a touch area of the other operation, determining whether the touch area of the other operation is overlapped with both the first area and the second area, and executing a response to the other operation if the touch area of the other operation is not overlapped with the first area, or the touch area of the other operation is not overlapped with the second area.
[0182] In an optional embodiment, the processor 1001 may further perform the operation of skipping executing the response to the other operation if the touch area of the other operation is overlapped with both the first area and the second area.
[0183] It should be noted that, the mobile terminal shown in
[0184] In this embodiment of the present disclosure, the mobile terminal shown in
[0185] In the foregoing embodiments, the description of each embodiment has respective focuses. For a part that is not described in detail in an embodiment, reference may be made to related descriptions in other embodiments.
[0186] A person of ordinary skill in the art may understand that all or some of the steps of the method embodiments may be implemented by a program instructing related hardware of a terminal device. The program may be stored in a computer-readable storage medium. When the program is performed, the steps including the foregoing method embodiments are performed. The foregoing storage medium includes any medium that can store program code, such as a flash memory, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.
[0187] The above describes a method used by a touchscreen to process an operation and a terminal according to the embodiments of the present disclosure in detail. In this specification, specific examples are used to describe the principle and implementation manners of the present disclosure, and the description of the embodiments is only intended to help understand the method and core idea of the present disclosure. Meanwhile, a person of ordinary skill in the art may, based on the idea of the present disclosure, make modifications with respect to the specific implementation manners and the application scope. Therefore, the content of this specification shall not be construed as a limitation to the present disclosure.