A touch screen event processing method and related device
By performing preset operations and gesture recognition on the pop-up view when receiving a touch event on a touch-screen device, the problem of hidden lag in the pop-up view caused by gesture recognition is solved and the user experience and interface fluency are improved.
Patent Information
- Application Number
- CN202211335815.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-10-28
AI Technical Summary
Existing touch screen devices suffer from lags caused by the gesture recognition process when hiding pop-up views, which affects the user experience.
When receiving a touch screen event, first perform a preset operation on the pop-up window view to pre-hide it to avoid lags caused by gesture recognition time, and perform corresponding operations based on the control gestures to avoid accidental hiding.
It effectively avoids the hidden lag in the pop-up view caused by the gesture recognition time, improves the user experience, and ensures the smoothness and correctness of the display interface.
Smart Images

Figure CN115657924B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a touch screen event processing method and related devices. Background Art
[0002] Currently used touch screen devices generally have gesture recognition function. When a touch screen device receives a touch screen event, it will first perform gesture recognition on the received touch screen event through the gesture recognition function. When the gesture recognition succeeds, the touch screen event will no longer be passed through the response chain. When the gesture recognition fails, the touch screen event will continue to be passed to be processed by the response chain. However, the gesture recognition process of the touch screen event by the gesture recognition function takes a certain amount of time. When it is necessary to hide the pop-up window view on the display interface, the time spent in the gesture recognition process will cause a freeze problem when hiding the pop-up window view.
[0003] Therefore the prior art still needs to be improved and enhanced. Summary of the invention
[0004] The technical problem to be solved by the present application is to provide a touch screen event processing method and related devices in view of the deficiencies in the prior art.
[0005] In order to solve the above technical problems, a first aspect of an embodiment of the present application provides a touch screen event processing method, the method comprising:
[0006] Listening for a touch screen event performed on a display screen, wherein a display view with a pop-up window view is displayed on the display screen;
[0007] When a touch screen event is monitored, a preset operation is performed on the pop-up window view, and a control gesture corresponding to the touch screen event is identified, wherein the preset operation is used to control the pop-up window view not to block the display view at its location;
[0008] When the control gesture is a preset control gesture, executing a target control operation corresponding to the preset control gesture;
[0009] When the control gesture is not a preset control gesture, the pop-up window view is controlled to restore to the display state when the touch screen event is monitored.
[0010] In one implementation, the preset operation includes one or more of adjusting the opacity of the pop-up view, adjusting the view size of the pop-up view, and adjusting the view position of the pop-up view.
[0011] In one implementation, when a touch screen event is monitored, executing a preset operation on the pop-up window view and identifying a control gesture corresponding to the touch screen event specifically includes:
[0012] When a touch screen event is monitored, the touch screen event is transmitted to the parent view of the display view through the display view;
[0013] Sending a control signal to the display view through the parent view, so that the display view performs a preset operation on the pop-up view based on the control signal;
[0014] A control gesture corresponding to the touch screen event is identified through the display view.
[0015] In one implementation, when a touch screen event is monitored, executing a preset operation on the pop-up window view and identifying a control gesture corresponding to the touch screen event specifically includes:
[0016] When a touch screen event is monitored, a preset operation is performed on the pop-up view through the display view, and a control gesture corresponding to the touch screen event is identified through the display view.
[0017] In one implementation, when the control gesture is not a preset control gesture, controlling the pop-up window view to restore to a display state when a touch screen event is monitored specifically includes:
[0018] When the control gesture is not a preset control gesture, responding to a control operation corresponding to the control gesture, and controlling the pop-up window view to enter a preset display state;
[0019] When the control gesture ends, the pop-up window view is controlled to restore to the display state when the touch screen event is monitored.
[0020] In one implementation, when the control gesture is not a preset control gesture, controlling the pop-up window view to restore to a display state when a touch screen event is monitored specifically includes:
[0021] When the control gesture is not a preset control gesture, monitoring an end operation of the control gesture;
[0022] When the end operation is detected, the pop-up window view is controlled to restore to the display state when the touch screen event is detected.
[0023] In one implementation, when the control gesture is a preset control gesture, after executing the target control operation corresponding to the preset control gesture, the method includes:
[0024] Monitoring the duration of the touch screen event;
[0025] When the duration reaches a preset duration, the pop-up window view is controlled to enter a preset display state, and when the control gesture ends, the pop-up window view is controlled to restore to the display state when the touch screen event is monitored.
[0026] In one implementation, the preset operation is adjusting the opacity of the pop-up window view; and controlling the pop-up window view to enter the preset display state specifically includes:
[0027] Obtain a first opacity and a second opacity corresponding to the pop-up window view, wherein the first opacity is the opacity of the pop-up window view after a preset operation is performed on the pop-up window view, and the second opacity is the opacity corresponding to the preset display state;
[0028] A display animation corresponding to the pop-up view is determined based on the first opacity and the second opacity, and the display animation is played through a display screen so that the pop-up view enters a preset display state.
[0029] In one implementation, when a touch screen event is monitored, after performing a preset operation on the pop-up window view, the method includes:
[0030] A start state is configured for the display view on the display screen, wherein the start state is used to indicate that the touch screen event is in a gesture recognition state.
[0031] In one implementation, when the control gesture is a preset control gesture, the method further includes:
[0032] When the preset operation is the target control operation, modifying the start state of the display view configuration to a processed state, wherein the processed state is used to indicate that the touch screen event is in a responded state;
[0033] When the preset operation is not the target control operation, the start state of the display view configuration is modified to an unprocessed state, wherein the unprocessed state is used to indicate that the touch screen event is in an unresponded state.
[0034] In one implementation, when the control gesture is not a preset control gesture, the method further includes:
[0035] The starting state of the display view configuration is modified to an unprocessed state, wherein the unprocessed state is used to indicate that the touch screen event is in an unresponded state.
[0036] In one implementation, the touch screen event is an event generated by touching a target display area in the display view, wherein the target display area is a view area on the display view excluding an area occupied by the pop-up view.
[0037] A second aspect of an embodiment of the present application provides a touch screen event processing system, the system comprising:
[0038] A monitoring module, used to monitor a touch screen event performed on a display screen, wherein a display view with a pop-up window view is displayed on the display screen;
[0039] an identification module, configured to, when a touch screen event is detected, perform a preset operation on the pop-up window view and identify a control gesture corresponding to the touch screen event, wherein the preset operation is used to control the pop-up window view not to block a display view at its location;
[0040] A first control module, configured to, when the control gesture is a preset control gesture, execute a target control operation corresponding to the preset control gesture;
[0041] The second control module is used to control the pop-up window view to restore to the display state when the touch screen event is monitored when the control gesture is not a preset control gesture.
[0042] A third aspect of an embodiment of the present application provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in any of the touch screen event processing methods described above.
[0043] A fourth aspect of the embodiments of the present application provides a touch screen device, comprising: a processor, a memory and a communication bus; the memory stores a computer-readable program that can be executed by the processor;
[0044] The communication bus realizes the connection and communication between the processor and the memory;
[0045] When the processor executes the computer-readable program, the steps in any of the above-mentioned touch screen event processing methods are implemented.
[0046] Beneficial effect: Compared with the prior art, the present application provides a touch screen event processing method and related devices, the method comprising monitoring touch screen events performed on a display screen; when a touch screen event is monitored, performing a preset operation on a pop-up window view of a display view, and identifying a control gesture corresponding to the touch screen event; when the control gesture is a preset control gesture, performing a target control operation corresponding to the preset control gesture; when the control gesture is not a preset control gesture, controlling the pop-up window view to restore to the display state when the touch screen event is monitored. When the present application receives a touch screen event, it first performs a preset operation on the pop-up window view so that the pop-up window view does not block the display interface, which is equivalent to pre-hiding the pop-up window view in advance, and then performing gesture recognition on the touch screen event, and performing corresponding operations according to the recognized control gesture. In this way, pre-hiding the pop-up window view when a touch screen event is received can avoid the problem of freeze when the pop-up window view is hidden due to the system taking time to perform gesture recognition. In addition, after pre-hiding the pop-up view, the present application will redisplay the pop-up view when the control gesture is not a gesture for hiding the pop-up view, thereby avoiding accidental hiding of the pop-up view and bringing convenience to users. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 A flowchart of the touch screen event processing method provided in this application.
[0049] Figure 2 A schematic diagram of a display view showing a pop-up view.
[0050] Figure 3 A schematic diagram showing that the pop-up view in the display view is in a hidden state.
[0051] Figure 4 A schematic diagram showing a pop-up view in a display view in a preset display state.
[0052] Figure 5 This is a schematic diagram of the structure of the touch screen event processing system provided in this application.
[0053] Figure 6 This is a schematic diagram of the structure of the touch screen device provided in this application. DETAILED DESCRIPTION
[0054] The present application provides a touch screen event processing method and related devices. In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
[0055] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0056] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0057] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not mean the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0058] After research, the inventor found that the touch screen event processing in the currently used touch screen devices is divided into high-level event processing and low-level event processing, wherein high-level event processing is to use various user controls or gesture recognizers provided by the system to process events, and low-level event processing is to rewrite the touch screen callback method in the subclass of the view to directly process the touch screen event. Based on this, the touch screen event can be transmitted and processed through the response chain, or it can be processed by the gesture recognizer bound to the view. Since gesture recognition is a high-level event processing, when the touch screen device receives a touch screen event, it will first perform gesture recognition on the received touch screen event through the gesture recognition function. When the gesture recognition is successful, the touch screen event will no longer be transmitted through the response chain. When the gesture recognition fails, the touch screen event will continue to be transmitted to be processed by the response chain. However, the gesture recognition process of the gesture recognition function for the touch screen event takes a certain amount of time. When it is necessary to hide the pop-up window view on the display interface, the time spent in the gesture recognition process will cause a freeze problem when hiding the pop-up window view. For example, the gesture corresponding to hiding the pop-up window is clicking the display screen, and the time required for gesture recognition is 0.2s. Then, when the display screen is clicked, the pop-up window view will be hidden after 0.2s, resulting in a 0.2s delay when the pop-up window is hidden.
[0059] In order to solve the problem of stuck, when receiving a touch screen event, the pop-up view can be directly closed through the response chain processing. However, a variety of control gestures can be pre-set in touch screen devices, such as sliding gestures, pinching gestures, and long press gestures. Among the multiple control gestures, some control gestures correspond to control operations that do not require hiding the pop-up view, which causes the pop-up view to be incorrectly hidden, causing inconvenience to users.
[0060] Based on this, in an embodiment of the present application, a touch screen event performed on the display screen is monitored; when a touch screen event is monitored, a preset operation is performed on the pop-up window view, and the control gesture corresponding to the touch screen event is identified; when the control gesture is a preset control gesture, the target control operation corresponding to the preset control gesture is performed; when the control gesture is not a preset control gesture, the pop-up window view is controlled to restore to the display state when the touch screen event is monitored. When the present application receives a touch screen event, the preset operation is first performed on the pop-up window view so that the pop-up window view does not block the display interface, which is equivalent to pre-hiding the pop-up window view in advance, and then the touch screen event is gesture recognized, and the corresponding operation is performed according to the recognized control gesture, so that the pop-up window view is pre-hidden when the touch screen event is received, which can avoid the problem of jamming when the pop-up window view is hidden due to the time spent on gesture recognition. At the same time, after pre-hiding the pop-up window view, the present application will redisplay the pop-up window view when the control gesture is not a gesture to hide the pop-up window view, avoiding the accidental hiding of the pop-up window view, which brings convenience to the user.
[0061] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.
[0062] This embodiment provides a touch screen event processing method, such as Figure 1 As shown, the method includes:
[0063] S10: monitoring touch screen events performed on the display screen.
[0064] Specifically, the display screen may be a touch display screen carried by a touch screen device, for example, the display screen may be a capacitive touch display screen, etc. Figure 2 As shown, a display view is displayed on the display screen, and a pop-up window view is carried on the display view. The pop-up window view can be used as a subview of the display view, and an interactive control can be set on the pop-up window view. The touch screen interaction within the pop-up window view has no effect on the display view, wherein the pop-up window view can be triggered by an interactive button set on the display view. For example, the display view is a reading view, and the pop-up window view is a note pop-up window during reading. A pop-up window button is set on the display view. When the pop-up window button is triggered, the pop-up window view pops up from the display view according to the preset pop-up window size, so that the pop-up window view is displayed on the display view.
[0065] A touch screen event may be a touch screen event formed on a touch screen display screen by a finger or a touch screen pen, for example, a touch screen event is a touch screen event formed by a touch screen operation such as clicking and sliding a finger on the display screen. It can be understood that the touch screen event described in this embodiment is performed in a scene where a display view is displayed on the display screen and a pop-up window view is displayed on the display view. Thus, the touch screen event is a touch screen operation performed on the display view, wherein the touch screen event may be an operation performed on a view area other than the pop-up window view in the display view, or an operation performed on a view area corresponding to the display view (i.e., including an operation performed on the pop-up window view). In a typical implementation, since the pop-up window view may also carry an interactive control, the pop-up window view is operated through the interactive control, so as to avoid mistakenly treating the operation on the pop-up window view as an operation to hide the pop-up window view, the touch screen event received by the view area other than the pop-up window view in the display view is used as a monitored touch screen event. In other words, the touch screen event is an event generated by touching the target display area in the display view, wherein the target display area is the view area other than the area occupied by the pop-up window view on the display view.
[0066] S20: When a touch screen event is monitored, a preset operation is performed on the pop-up window view, and a control gesture corresponding to the touch screen event is identified.
[0067] Specifically, the preset operation is a pre-set operation to be performed on the pop-up window view when a touch screen event is detected. By performing the preset operation on the pop-up window view, the pop-up window view can be made not to block the display view, so that the display content carried by the display view under the pop-up window view can be seen by the user. For example, if the preset operation is to hide the pop-up window view, then Figure 2 After the preset operation is performed, the display view shown changes to Figure 3 The display view shown is in which the image obscured by the pop-up view is visible.
[0068] The preset operation may include one or more of adjusting the opacity of the pop-up view, adjusting the view size of the pop-up view, and adjusting the view position of the pop-up view. Among them, adjusting the opacity of the pop-up view refers to reducing the opacity of the pop-up view, for example, the opacity before adjustment is 1, and the opacity after adjustment is less than 1, so that the pop-up view that performs the preset operation is in a hidden state or a semi-transparent state; adjusting the view size of the pop-up view refers to reducing the view size of the pop-up view so that the pop-up view does not block the display content in the display view, for example, minimizing the pop-up view, or adjusting the view size of the pop-up view to 1% of the view size of the display view, etc.; adjusting the view position of the pop-up view refers to adjusting the position of the pop-up view in the display view, for example, when the pop-up view is located at the top of the display view, adjusting the pop-up view to only display the bottom of the view, etc.
[0069] The preset operation performed on the pop-up view can be performed by the display view directly based on the monitored touch screen time, or it can be based on the event processing mechanism carried by the operating system (for example, iOS system, Android system, etc.) carried by the touch screen device running the touch screen event processing method provided in this embodiment. When a touch screen event is monitored, the touch screen event is passed to the view that processes the touch screen event through the view that monitors the touch screen event, so that it forms a control signal according to the touch screen event. The view that processes the touch screen event includes the parent view of the view that monitors the touch screen event, the child view of the view that monitors the touch screen event, or the view itself that monitors the touch screen event.
[0070] Based on this, in one implementation, the display view monitors the touch screen event, the parent view of the display view generates a control signal according to the touch screen event, and the display view performs a preset operation on the pop-up window view based on the control signal. When a touch screen event is monitored, the preset operation is performed on the pop-up window view, and the control gesture corresponding to the touch screen event is identified, which specifically includes:
[0071] When a touch screen event is monitored, the touch screen event is transmitted to the parent view of the display view through the display view;
[0072] Sending a control signal to the display view through the parent view, so that the display view performs a preset operation on the pop-up view based on the control signal;
[0073] A control gesture corresponding to the touch screen operation is identified through the display view.
[0074] Specifically, the parent view is the next level view of the display view, which is used to monitor touch screen events, and when a touch screen event is monitored, it immediately notifies the display view to perform a preset operation on the pop-up view on it. The display view is used to identify the control gesture corresponding to the touch screen event, and perform corresponding control operations on the pop-up view based on the recognized control gesture. In one implementation, a touch screen listener is provided on the parent view, and a gesture listener is provided on the display view. The touch screen listener and the gesture listener work simultaneously, wherein the touch screen listener is used to monitor touch screen events, and immediately perform preset operations on the pop-up view when a touch screen event is monitored, and the gesture listener is used for gesture recognition. After recognizing the control gesture corresponding to the touch screen event, the control operation corresponding to the control gesture is performed on the pop-up view. This embodiment controls the touch screen listener and the gesture listener to work in combination, so that when the touch screen listener monitors the touch screen event, the preset operation can be immediately performed on the pop-up view, thereby avoiding the problem of not being able to immediately obtain the view content blocked by the pop-up view due to the time required for gesture recognition, thereby avoiding the problem of the pop-up view hiding freeze and delay.
[0075] After monitoring the touch screen event, the display view can pass the touch screen event to the parent view through the response chain, so that the parent view can monitor the touch screen event received by the display view. In other words, after the display view receives the touch screen event, the display view passes the touch screen event to the parent view through the response chain of the touch screen event, so that both the parent view and the display view can monitor the touch screen event.
[0076] In another implementation, when a touch screen event is monitored, executing a preset operation on the pop-up window view and identifying a control gesture corresponding to the touch screen event specifically includes:
[0077] When a touch screen event is monitored, a preset operation is performed on the pop-up window view through the display view, and a control gesture corresponding to the touch screen operation is identified through the display view.
[0078] Specifically, the control signal for executing preset operations on the pop-up view and gesture recognition are both performed by the display view. That is, the display view is configured with a touch screen monitoring module and a gesture recognition module. After monitoring a touch screen event, the display view directly forms a control signal based on the touch screen event through the touch screen monitoring module, and executes the preset operation on the pop-up view based on the control signal. At the same time, the display view will recognize the control gesture corresponding to the touch screen event through the gesture recognition module.
[0079] Since the preset operation performed on the pop-up window view is a preprocessing, it is only a preprocessing operation for the touch screen event. After the control gesture corresponding to the touch screen event is identified, the corresponding control operation is performed based on the control gesture. Therefore, in order to facilitate the determination of the state during the touch screen operation time, after the preset operation is performed on the pop-up window view, a working state can be set for the display view, and the processing state corresponding to the touch screen event is determined by the working state. Among them, the preset operation is performed on the pop-up window view when the touch screen event is monitored, and the gesture recognition of the touch screen event has not yet been performed, so that a starting state can be set for the display view, and the starting state indicates that the touch screen event is in a gesture recognition state. Based on this, when the control gesture is a preset control gesture, the method also includes: modifying the starting state to a processed state, wherein the processed state is used to indicate that the touch screen event is in a responded state.
[0080] S30: When the control gesture is a preset control gesture, execute a target control operation corresponding to the preset control gesture.
[0081] Specifically, the preset control gesture is pre-set, and the preset control gesture can be a control gesture whose execution time is less than the time required for gesture recognition, such as double-clicking, clicking, etc. The control operation corresponding to the preset control gesture is used to control the pop-up window view not to block the display view at its location, for example, the control operation corresponding to the preset control gesture is to hide the pop-up window view, or to adjust the opacity of the pop-up window view to a preset opacity, or to minimize the pop-up window view, etc.
[0082] In a typical implementation, when the preset control gesture is a click gesture, monitoring the touch screen event refers to monitoring the click operation. Then, setting the preset gesture to a click gesture will match the monitored touch screen event, thereby matching the preset operation on the pop-up video (for example, hiding the pop-up view) with the actual user demand (hiding the pop-up view through a click operation), bringing convenience to the user and improving the user's operating experience.
[0083] In addition, since a preset operation has been performed on the pop-up window view when a touch screen event is monitored, and the preset operation can be the same as the target control operation corresponding to the preset control gesture, or it can be different from the target control operation corresponding to the preset control gesture, when the preset operation is the same as the target control operation corresponding to the preset control gesture, there is no need to perform the target control operation, and when the preset operation is different from the target control operation corresponding to the preset control gesture, it is necessary to perform the target control operation. Based on this, in one implementation, when the control gesture is a preset control gesture, performing the target control operation corresponding to the preset control gesture specifically includes:
[0084] Detecting whether the preset operation is the target control operation corresponding to the preset control gesture;
[0085] When the preset operation is the target control operation, modifying the start state of the display view configuration to a processed state;
[0086] When the preset operation is not the target control operation, the start state of the display view configuration is modified to an unprocessed state.
[0087] Specifically, the processed state is used to indicate that the touch screen event is in a state where it has been responded to; the unprocessed state is used to indicate that the touch screen event is in an unresponded state. In other words, when the display view is configured with a processed state, it means that the touch screen event has been responded to, and there is no need to respond to the target control operation corresponding to the preset control gesture. On the contrary, when the display view is configured with an unprocessed state, it means that the touch screen event has not been responded to, and it is necessary to respond to the target control operation corresponding to the preset control gesture. Thus, when the control gesture is a preset control gesture, it is detected whether the preset operation is the target control operation corresponding to the preset control gesture to adjust the working state of the display view configuration, and repeated operations on the pop-up window view can be avoided. For example, if the preset operation performed on the pop-up window view is to hide the pop-up window view, and the target control operation corresponding to the preset control gesture is to hide the pop-up window view, then the start state of the display view configuration can be directly modified to the processed state, and the processing of the touch screen event is ended without having to perform the operation of hiding the pop-up window view again, thereby avoiding execution errors caused by performing the operation of hiding the pop-up window view again due to the pop-up window view being in a hidden state.
[0088] In one implementation, the preset control gesture is clicking the display screen, and the control gesture formed by clicking the display screen can be a click gesture or a long press gesture. Therefore, when the control gesture is the preset control gesture, it is also necessary to detect the duration of the control gesture to determine whether it is a long press gesture. Based on this, when the control gesture is the preset control gesture, after executing the target control operation corresponding to the preset control gesture, the method includes:
[0089] Monitoring the duration of the touch screen event;
[0090] When the duration reaches a preset duration, the pop-up window view is controlled to enter a preset display state, and when the control gesture ends, the pop-up window view is controlled to restore to the display state when the touch screen event is received.
[0091] Specifically, the duration is the duration of the touch screen event on the display screen. In other words, the duration is the contact duration between the touch screen device that forms the touch screen event and the display screen. For example, if the touch screen event is formed by a finger touching the display screen, then the duration is the touch duration of the finger touching the display. The preset duration is a pre-set basis for distinguishing between a click gesture and a long press gesture. When the duration is less than the preset duration, the control gesture is a click gesture, and when the duration is greater than or equal to the preset duration, the control gesture is a long press gesture. When the control gesture is a long press gesture, there is no need to hide the pop-up window view, so that when the duration reaches the preset duration, the pop-up window view needs to be redisplayed. Thus, when the duration reaches the preset duration, the pop-up window view can be controlled to enter a preset display state, and when the control gesture ends, the pop-up window view is controlled to be restored to the display state when the touch screen event is received, wherein the preset display state is pre-set, and the opacity of the pop-up window view in the preset display state is less than the opacity of the pop-up window view in the display state when the touch screen event is received. For example, when the display state of receiving a touch screen event is a display state with an opacity of 1, the preset display state can be a display state with an opacity of 0.5. In this embodiment, by controlling the pop-up window view to enter the preset display state when the duration reaches the preset duration, the user can read the content carried by the display view area below the pop-up window view without hiding the pop-up window view, and can also know the content carried by the pop-up window view at the same time, so that the user does not need to close the pop-up window view first and then start the pop-up window view in order to read the view content of the position covered by the pop-up window view for a short time (for example, watching 0.6s, etc.), and can only be achieved by long pressing the display view, which brings convenience to the user. Of course, in actual applications, when the duration reaches the preset duration, the pop-up window view can also be directly controlled to restore to the display state when the touch screen event is received, or, after the duration reaches the preset duration, the display state of the pop-up window view remains unchanged, and when the gesture end operation is monitored, the pop-up window view is directly controlled to restore to the display state when the touch screen event is monitored.
[0092] For example: Assume that the preset control gesture is a click gesture, the control gesture is a click gesture, the preset operation is to hide the pop-up view, the gesture recognition time is 0.2s, and the preset time is 0.5s, then:
[0093] 0-0.2s: The touch screen event is in gesture recognition, and the pop-up view is hidden based on the preset operation, such as Figure 3 As shown;
[0094] 0.2s-0.5: In response to click gesture operation, the pop-up window view state saves the hidden state, such as Figure 3 As shown;
[0095] 0.5s-before the touch screen operation ends: In response to the long press gesture operation, the pop-up window view state changes from the hidden state to the preset display state, and continues to display in the preset display state, such as Figure 4 As shown;
[0096] Touch screen event ends: The pop-up window view returns to the display state when the touch screen event is received, such as Figure 2 shown.
[0097] In an implementation of this embodiment, the preset operation is to adjust the opacity of the pop-up window view; and controlling the pop-up window view to enter the preset display state specifically includes:
[0098] Get the first opacity and the second opacity corresponding to the pop-up view;
[0099] A display animation corresponding to the pop-up view is determined based on the first opacity and the second opacity, and the display animation is played through a display screen so that the pop-up view enters a preset display state.
[0100] Specifically, the first opacity is the opacity of the pop-up window view after the preset operation is performed on the pop-up window view, and the second opacity is the opacity corresponding to the preset display state. The first opacity is less than the second opacity, so that when the pop-up window view is in the preset display state, the content carried by the pop-up window view can be known. The display animation is used to show the change process of the opacity of the pop-up window view from the first opacity to the second opacity, wherein the animation duration of the display animation can be preset. After obtaining the first opacity and the second opacity, the opacity change process of the pop-up window view can be determined based on the animation duration, and then the opacity change process of the pop-up window view is played in the form of a display animation. After the display animation is played, the pop-up view enters the preset display state. Of course, in actual applications, when the preset operation is different, the display animation can also be different. For example, the preset operation is to minimize the pop-up window view, then the preset display state is to display the pop-up window view at the original display position with the second opacity, then the display animation can be the display process of the opacity from 0 to the opacity corresponding to the preset display state at the original display position, etc.
[0101] S40: When the control gesture is not a preset control gesture, control the pop-up window view to restore to the display state when the touch screen event is monitored.
[0102] Specifically, when the control gesture is not a preset control gesture, it means that there is no need to perform a preset operation on the pop-up view, and thus the pop-up view needs to be restored to the display state when the touch screen event is monitored. In addition, when the control gesture is a preset control gesture, it means that the touch screen event has not been responded to, and thus when the control gesture is not a preset control gesture, it is necessary to respond to the control operation corresponding to the control gesture. Based on this, in one implementation, when the control gesture is not a preset control gesture, controlling the pop-up view to be restored to the display state when the touch screen event is received specifically includes:
[0103] When the control gesture is not a preset control gesture, responding to a control operation corresponding to the control gesture, and controlling the pop-up window view to enter a preset display state;
[0104] When the control gesture ends, the pop-up window view is controlled to restore to the display state when the touch screen event is received.
[0105] Specifically, when the control gesture is not a preset control gesture, it means that the control gesture has not been responded to, so the control operation corresponding to the control gesture is responded to. For example, if the control gesture is a sliding gesture, and the control operation corresponding to the sliding gesture is sliding the display view, the display view will be slid. In addition, since the control gesture is not a preset control gesture, there is no need to perform a preset operation on the pop-up window view, so that the pop-up window view can be controlled to enter a preset display state, so that when the display view is operated, all the contents of the display view on the display interface can be obtained, so that the user can operate the display view after understanding all the contents displayed on the display interface. Among them, the process of controlling the pop-up window view to enter the preset display state is the same as the process of controlling the pop-up window view to enter the preset display state in step S30, which will not be repeated here, and the specific description of S30 can be referred to. In addition, in actual applications, when the control gesture is not a preset control gesture, the pop-up window view can also be directly controlled to restore to the display state when the touch screen event is received, so that the original display state of the pop-up window view can be quickly restored.
[0106] For example: Assume that the preset control gesture is a click gesture, the control gesture is a slide gesture or a pinch gesture, the preset operation is to hide the pop-up view, and the gesture recognition time is 0.2s, then:
[0107] 0-0.2s: The touch screen event is in gesture recognition, and the pop-up view is hidden based on the preset operation;
[0108] 0.2s-before the touch screen operation ends: In response to the control operation corresponding to the sliding gesture, the pop-up window view state changes from the hidden state to the preset display state, and continues to be displayed in the preset display state;
[0109] Touch screen event ends: the pop-up view returns to the display state when the touch screen event is received.
[0110] In one implementation, when the control gesture is not a preset control gesture, controlling the pop-up window view to restore to a display state when the touch screen event is received specifically includes:
[0111] When the control gesture is not a preset control gesture, monitoring an end operation of the control gesture;
[0112] When the end operation is detected, the pop-up window view is controlled to restore to the display state when the touch screen event is detected.
[0113] Specifically, when the control gesture is not a preset control gesture, the pop-up window view is kept in the display state corresponding to the preset operation, and when the control gesture ends, the pop-up window view is controlled to be restored to the display state when the touch screen event is monitored. In this way, when the control operation corresponding to the control gesture is performed on the display view, the pop-up window view is in the display state corresponding to the preset operation (for example, in a hidden state), so that the user can know all the displayed contents on the display view when performing a control operation on the display view.
[0114] For example: Assume that the preset control gesture is a click gesture, the control gesture is a slide gesture or a pinch gesture, the preset operation is to hide the pop-up view, and the gesture recognition time is 0.2s, then:
[0115] 0-0.2s: The touch screen event is in gesture recognition, and the pop-up view is hidden based on the preset operation;
[0116] 0.2s-before the touch screen operation ends: respond to the control operation corresponding to the sliding gesture, and the pop-up view is hidden based on the preset operation;
[0117] Touch screen event ends: the pop-up view returns to the display state when the touch screen event is received.
[0118] In one implementation, when the control gesture is not a preset control gesture, it indicates that the touch screen event is not responded to, so it is necessary to modify the start state of the display view binding to an unprocessed state, and the unprocessed state indicates that the touch screen event is in an unresponded state, so that the display view responds to the control operation corresponding to the control gesture. Based on this, when the control gesture is not a preset control gesture, the method further includes: modifying the start state of the display view configuration to an unprocessed state. Then, when the start state of the display view configuration is modified to an unprocessed state, the control operation corresponding to the control gesture will be responded to.
[0119] In summary, the present embodiment provides a touch screen event processing method, the method comprising monitoring a touch screen event performed on a display screen; when a touch screen event is monitored, performing a preset operation on the pop-up window view, and identifying a control gesture corresponding to the touch screen event; when the control gesture is a preset control gesture, performing a target control operation corresponding to the preset control gesture; when the control gesture is not a preset control gesture, controlling the pop-up window view to restore to the display state when the touch screen event is monitored. When the present application receives a touch screen event, the preset operation is first performed on the pop-up window view so that the pop-up window view does not block the display interface, which is equivalent to pre-hiding the pop-up window view in advance, and then performing gesture recognition on the touch screen event, and performing corresponding operations according to the recognized control gesture, so that the pop-up window view is pre-hidden when the touch screen event is received, which can avoid the problem of jamming when the pop-up window view is hidden due to the time spent on gesture recognition. At the same time, after pre-hiding the pop-up window view, the present application will redisplay the pop-up window view when the control gesture is not a gesture for hiding the pop-up window view, thereby avoiding the accidental hiding of the pop-up window view and bringing convenience to the user.
[0120] Based on the above touch screen event processing method, this embodiment provides a touch screen event processing system, such as Figure 5 Said system comprises:
[0121] A monitoring module 100, configured to monitor a touch screen event performed on a display screen, wherein a display view with a pop-up window view is displayed on the display screen;
[0122] The recognition module 200 is used to perform a preset operation on the pop-up window view and recognize a control gesture corresponding to the touch screen event when a touch screen event is monitored, wherein the preset operation is used to control the pop-up window view not to block the display view at its location;
[0123] A first control module 300, configured to execute a target control operation corresponding to the preset control gesture when the control gesture is a preset control gesture;
[0124] The second control module 400 is used to control the pop-up window view to restore to the display state when the touch screen event is monitored when the control gesture is not a preset control gesture.
[0125] Based on the above touch screen event processing method, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the touch screen event processing method as described in the above embodiment.
[0126] Based on the above touch screen event processing method, the present application also provides a touch screen device, such as Figure 6As shown, it includes at least one processor (processor) 20; display screen 21; and memory (memory) 22, and may also include a communications interface (Communications Interface) 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logic instructions in the memory 22 to execute the method in the above embodiment.
[0127] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0128] The memory 22 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implementing the methods in the above embodiments.
[0129] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the touch screen device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient storage medium.
[0130] In addition, the specific process of loading and executing the plurality of instructions in the storage medium and the touch screen device has been described in detail in the method above, and will not be described here one by one.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A touch screen event processing method, characterized in that: The method comprises: Listening for a touch screen event performed on a display screen, wherein a display view with a pop-up window view is displayed on the display screen; When a touch screen event is monitored, a preset operation is performed on the pop-up window view, and a control gesture corresponding to the touch screen event is identified, wherein the preset operation is used to control the pop-up window view not to block the display view at its location; When the control gesture is a preset control gesture, executing a target control operation corresponding to the preset control gesture; When the control gesture is not a preset control gesture, controlling the pop-up window view to restore to the display state when the touch screen event is monitored; When a touch screen event is detected, executing a preset operation on the pop-up window view and identifying a control gesture corresponding to the touch screen event specifically include: When a touch screen event is monitored, the touch screen event is transmitted to the parent view of the display view through the display view; Sending a control signal to the display view through the parent view, so that the display view performs a preset operation on the pop-up view based on the control signal; A control gesture corresponding to the touch screen event is identified through the display view.
2. The touch screen event processing method according to claim 1, characterized in that: The preset operation includes one or more of adjusting the opacity of the pop-up view, adjusting the view size of the pop-up view, and adjusting the view position of the pop-up view.
3. The touch screen event processing method according to claim 1, characterized in that: When a touch screen event is detected, executing a preset operation on the pop-up window view and identifying a control gesture corresponding to the touch screen event specifically includes: When a touch screen event is monitored, a preset operation is performed on the pop-up view through the display view, and a control gesture corresponding to the touch screen event is identified through the display view.
4. The touch screen event processing method according to claim 1, characterized in that: When the control gesture is not a preset control gesture, controlling the pop-up window view to restore to the display state when the touch screen event is monitored specifically includes: When the control gesture is not a preset control gesture, responding to a control operation corresponding to the control gesture, and controlling the pop-up window view to enter a preset display state; When the control gesture ends, the pop-up window view is controlled to restore to the display state when the touch screen event is monitored.
5. The touch screen event processing method according to claim 1, characterized in that: When the control gesture is not a preset control gesture, controlling the pop-up window view to restore to the display state when the touch screen event is monitored specifically includes: When the control gesture is not a preset control gesture, monitoring an end operation of the control gesture; When the end operation is detected, the pop-up window view is controlled to restore to the display state when the touch screen event is detected.
6. The touch screen event processing method according to claim 1, characterized in that: When the control gesture is a preset control gesture, after executing the target control operation corresponding to the preset control gesture, the method includes: Monitoring the duration of the touch screen event; When the duration reaches a preset duration, the pop-up window view is controlled to enter a preset display state, and when the control gesture ends, the pop-up window view is controlled to restore to the display state when the touch screen event is monitored.
7. The touch screen event processing method according to claim 4 or 6, characterized in that: The preset operation is to adjust the opacity of the pop-up window view; The controlling the pop-up window view to enter the preset display state specifically includes: Obtain a first opacity and a second opacity corresponding to the pop-up window view, wherein the first opacity is the opacity of the pop-up window view after a preset operation is performed on the pop-up window view, and the second opacity is the opacity corresponding to the preset display state; A display animation corresponding to the pop-up view is determined based on the first opacity and the second opacity, and the display animation is played through a display screen so that the pop-up view enters a preset display state.
8. The touch screen event processing method according to claim 1, characterized in that: When a touch screen event is monitored, after a preset operation is performed on the pop-up window view, the method includes: A start state is configured for the display view on the display screen, wherein the start state is used to indicate that the touch screen event is in a gesture recognition state.
9. The touch screen event processing method according to claim 8, characterized in that: When the control gesture is a preset control gesture, the method further includes: When the preset operation is the target control operation, modifying the start state of the display view configuration to a processed state, wherein the processed state is used to indicate that the touch screen event is in a responded state; When the preset operation is not the target control operation, the start state of the display view configuration is modified to an unprocessed state, wherein the unprocessed state is used to indicate that the touch screen event is in an unresponded state.
10. The touch screen event processing method according to claim 8, characterized in that: When the control gesture is not a preset control gesture, the method further includes: The starting state of the display view configuration is modified to an unprocessed state, wherein the unprocessed state is used to indicate that the touch screen event is in an unresponded state.
11. The touch screen event processing method according to claim 1, characterized in that: The touch screen event is an event generated by touching a target display area in the display view, wherein the target display area is a view area on the display view excluding an area occupied by the pop-up view.
12. A touch screen event processing system, characterized in that: The system comprises: A monitoring module, used to monitor a touch screen event performed on a display screen, wherein a display view with a pop-up window view is displayed on the display screen; an identification module, configured to, when a touch screen event is monitored, perform a preset operation on the pop-up window view and identify a control gesture corresponding to the touch screen event, wherein the preset operation is used to control the pop-up window view not to block a display view at its location; A first control module, configured to, when the control gesture is a preset control gesture, execute a target control operation corresponding to the preset control gesture; A second control module is used for controlling the pop-up window view to restore to the display state when the touch screen event is monitored when the control gesture is not a preset control gesture; When a touch screen event is detected, executing a preset operation on the pop-up window view and identifying a control gesture corresponding to the touch screen event specifically include: When a touch screen event is monitored, the touch screen event is transmitted to the parent view of the display view through the display view; Sending a control signal to the display view through the parent view, so that the display view performs a preset operation on the pop-up view based on the control signal; A control gesture corresponding to the touch screen event is identified through the display view.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the touch screen event processing method as described in any one of claims 1-11.
14. A touch screen device, characterized in that: include: Processor, memory and communication bus; The memory stores a computer-readable program executable by the processor; The communication bus realizes the connection and communication between the processor and the memory; When the processor executes the computer-readable program, the steps in the touch screen event processing method as described in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Communication terminal and display method
CN112835472A
Display control method and device and electronic equipment
CN114138157A
