Search

CN-121979434-A - Mutual exclusion interaction method for scrolling view control and slider control and related equipment

CN121979434ACN 121979434 ACN121979434 ACN 121979434ACN-121979434-A

Abstract

The invention discloses a mutual exclusion interaction method of a rolling view control and a sliding block control and related equipment, comprising the steps of setting a first static variable in the rolling view control; setting a first static variable in the control of the interactive request, responding to the interactive request, obtaining a target interactive type of the interactive request, executing a drag slider response flow according to the first static variable when the target interactive type is the operation slider control to obtain a first feedback result of the interactive request, and executing a scroll view response flow according to the first static variable when the target interactive type is the operation scroll view control to obtain a second feedback result of the interactive request. The invention can improve the accuracy of the interactive response of the scrolling view control and the slider control, and can be widely applied to the fields of virtual reality processing software, cartoon game making engine software and development system, home entertainment product software, digital cultural creative software, education, news, cultural content industry software, game cartoon software and the like in the digital creative industry.

Inventors

  • HU QING
  • ZENG ZIPENG
  • LU WENHAO

Assignees

  • 珠海金山数字网络科技有限公司

Dates

Publication Date
20260505
Application Date
20251225

Claims (10)

  1. 1. The mutual exclusion interaction method of the scrolling view control and the slider control is characterized by comprising the following steps of: setting a first static variable in the scrolling view control; Setting a second static variable in the slider control; responding to an interaction request, and acquiring a target interaction type of the interaction request; when the target interaction type is that the slider control is operated, executing a dragging slider response flow according to the first static variable to obtain a first feedback result of the interaction request; And when the target interaction type is operation of the scroll view control, executing a scroll view response flow according to the second static variable to obtain a second feedback result of the interaction request.
  2. 2. The method of claim 1, wherein prior to setting the first static variable in the scroll view control, the method further comprises the steps of: and associating the scrolling view control with the slider control.
  3. 3. The method according to claim 1, wherein when the target interaction type is operation of the slider control, executing a drag slider response procedure according to the first static variable, to obtain a first feedback result of the interaction request, including the following steps: triggering a slider touch start event in response to the interaction request for operating the slider control, and setting a second state of the second static variable to be a sliding state; reading the first static variable of the scroll view control; acquiring a first state of the first static variable; When the first state is a non-rolling state, executing dragging logic of the slider control, and returning the first feedback result; and when the first state is a rolling state, stopping the response flow of the dragging sliding block, and returning the first feedback result.
  4. 4. The method of claim 3, wherein when the first state is a non-scroll state, executing drag logic of the slider control and returning the first feedback result, comprising the steps of: When the dragging logic is naturally terminated, triggering a sliding block touch end event, setting the second state to be a non-sliding state, terminating the dragging sliding block response flow, and returning the first feedback result; and triggering a sliding block touch cancellation event when the dragging logic is abnormally cancelled, setting the second state to be a non-sliding state, terminating the dragging sliding block response flow, and returning the first feedback result.
  5. 5. The method according to claim 1, wherein when the target interaction type is operating the scroll view control, executing a scroll view response procedure according to the second static variable to obtain a second feedback result of the interaction request, including the following steps: In response to the interaction request for operating the scroll view control, triggering a scroll event, and setting a first state of the first static variable as a scroll state; Reading the second static variable of the slider control; acquiring a second state of the second static variable; when the second state is a non-sliding state, executing the scrolling logic of the scrolling view control, and returning the second feedback result; and when the second state is a sliding state, terminating the scrolling view response flow, and returning the second feedback result.
  6. 6. The method of claim 5, wherein when the second state is a non-sliding state, executing scrolling logic of the scrolling-view control and returning the second feedback result, comprising the steps of: when the scrolling logic is terminated naturally, triggering a scrolling stop event, setting the first state to be a non-scrolling state, terminating the scrolling view response flow, and returning the second feedback result.
  7. 7. A mutually exclusive interaction system of a scrolling view control and a slider control, comprising: The first static variable setting module is used for setting a first static variable in the scrolling view control; The second static variable setting module is used for setting a second static variable in the slider control; The interactive type acquisition module is used for responding to the interactive request and acquiring a target interactive type of the interactive request; The slider control operation module is used for executing a dragging slider response flow according to the first static variable when the target interaction type is that the slider control is operated, so as to obtain a first feedback result of the interaction request; And the scrolling view control operation module is used for executing a scrolling view response flow according to the second static variable when the target interaction type is the operation of the scrolling view control, so as to obtain a second feedback result of the interaction request.
  8. 8. An electronic device comprising at least one control processor and a memory communicatively coupled to the at least one control processor, the memory storing instructions executable by the at least one control processor to enable the at least one control processor to perform the method of any one of claims 1-6.
  9. 9. A computer-readable storage medium, characterized in that the storage medium stores a program that is executed by a processor to implement the method of any one of claims 1 to 6.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1 to 6.

Description

Mutual exclusion interaction method for scrolling view control and slider control and related equipment Technical Field The invention relates to the technical field of software interaction and control, in particular to a mutual exclusion interaction method of a rolling view control and a sliding block control and related equipment. Background In the software development framework, both the scroll view ScrollView control and the Slider slide control are interactive controls that require handling touch events. Gesture sliding conflicts can occur when they are nested (e.g., one slide is placed within ScrollView), or when the gesture operation directions are similar even though they exist in the same scene. The essence of the conflict is that the engine cannot accurately judge the current gesture intention of the user, and it is unclear whether the current gesture intention of the user is to scroll ScrollView or drag slide, so that the interaction event of the scroll view control and the Slider control cannot be responded accurately. Disclosure of Invention In view of this, the embodiment of the invention mainly aims to provide a mutual exclusion interaction method for a scroll view control and a slider control and related equipment, so as to solve at least one of the problems in the prior art. In order to achieve the above object, an aspect of the embodiments of the present invention provides a mutual exclusion interaction method for a scroll view control and a slider control, including the following steps: setting a first static variable in the scrolling view control; Setting a second static variable in the slider control; responding to an interaction request, and acquiring a target interaction type of the interaction request; when the target interaction type is that the slider control is operated, executing a dragging slider response flow according to the first static variable to obtain a first feedback result of the interaction request; And when the target interaction type is operation of the scroll view control, executing a scroll view response flow according to the second static variable to obtain a second feedback result of the interaction request. In some embodiments, before the setting of the first static variable in the scroll view control, the method further comprises the steps of: and associating the scrolling view control with the slider control. In some embodiments, when the target interaction type is operation of the slider control, a drag slider response procedure is executed according to the first static variable, so as to obtain a first feedback result of the interaction request, including the following steps: triggering a slider touch start event in response to the interaction request for operating the slider control, and setting a second state of the second static variable to be a sliding state; reading the first static variable of the scroll view control; acquiring a first state of the first static variable; When the first state is a non-rolling state, executing dragging logic of the slider control, and returning the first feedback result; and when the first state is a rolling state, stopping the response flow of the dragging sliding block, and returning the first feedback result. In some embodiments, when the first state is a non-scroll state, executing drag logic of the slider control, and returning the first feedback result, including the following steps: When the dragging logic is naturally terminated, triggering a sliding block touch end event, setting the second state to be a non-sliding state, terminating the dragging sliding block response flow, and returning the first feedback result; and triggering a sliding block touch cancellation event when the dragging logic is abnormally cancelled, setting the second state to be a non-sliding state, terminating the dragging sliding block response flow, and returning the first feedback result. In some embodiments, when the target interaction type is operation of the scroll view control, executing a scroll view response procedure according to the second static variable to obtain a second feedback result of the interaction request, where the second feedback result includes the following steps: In response to the interaction request for operating the scroll view control, triggering a scroll event, and setting a first state of the first static variable as a scroll state; Reading the second static variable of the slider control; acquiring a second state of the second static variable; when the second state is a non-sliding state, executing the scrolling logic of the scrolling view control, and returning the second feedback result; and when the second state is a sliding state, terminating the scrolling view response flow, and returning the second feedback result. In some embodiments, when the second state is a non-sliding state, executing the scrolling logic of the scrolling view control, and returning the second feedback result, including the steps