[go: up one dir, main page]

CN104778044B - The method and device of touch-screen gesture event stream distribution - Google Patents

The method and device of touch-screen gesture event stream distribution Download PDF

Info

Publication number
CN104778044B
CN104778044B CN201510158991.0A CN201510158991A CN104778044B CN 104778044 B CN104778044 B CN 104778044B CN 201510158991 A CN201510158991 A CN 201510158991A CN 104778044 B CN104778044 B CN 104778044B
Authority
CN
China
Prior art keywords
control
event
gesture
gesture event
stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510158991.0A
Other languages
Chinese (zh)
Other versions
CN104778044A (en
Inventor
方顺豹
乔川北
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510158991.0A priority Critical patent/CN104778044B/en
Publication of CN104778044A publication Critical patent/CN104778044A/en
Application granted granted Critical
Publication of CN104778044B publication Critical patent/CN104778044B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种触摸屏手势事件流分发的方法及装置。其中方法包括:获取用户输入的完整手势事件流,完整手势事件流包括按下事件、至少一个移动事件和抬起事件;根据完整手势事件流,分别向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流;根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。本发明通过将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理。

The invention discloses a method and a device for distributing a touch screen gesture event stream. The method includes: obtaining a complete gesture event stream input by the user, the complete gesture event stream includes a press event, at least one movement event, and a lift event; according to the complete gesture event stream, respectively distribute to the first control and the second control The first gesture event stream that the control responds to and the second gesture event stream that the second control responds to; realize the corresponding Gesture operation. By distributing the complete gesture event stream to multiple controls, the present invention enables the user to conveniently complete the effect of multiple operations with one operation, reduces the number of operations, improves user experience, and makes the overall interaction smoother and more reasonable.

Description

触摸屏手势事件流分发的方法及装置Method and device for distribution of touch screen gesture event stream

技术领域technical field

本发明涉及互联网技术领域,具体涉及一种触摸屏手势事件流分发的方法及装置。The invention relates to the technical field of the Internet, in particular to a method and device for distributing touch screen gesture event streams.

背景技术Background technique

Android系统的事件分发机制,对于同一个触屏事件的手势事件流,只能分发到一个控件上。从事件的action_down(按下)开始,action_move(移动),到action_up(抬起)结束,这个手势事件流被锁定在一个控件,因此,在一个复杂的组合控件上,如果不同手势组合需要不同控件进行处理,利用现有的android事件分发机制就无法完成。The event distribution mechanism of the Android system can only distribute the gesture event stream of the same touch screen event to one control. Starting from action_down (press) of the event, action_move (move), and ending with action_up (lift), this gesture event flow is locked in a control. Therefore, on a complex combined control, if different gesture combinations require different controls For processing, it cannot be completed using the existing android event distribution mechanism.

针对一些应用程序(app),同一个触屏手势事件流也需要多个控件来处理,基本都是让用户来分两次进行触屏,第一次触屏的手势事件流给一个控件,第二次触屏的手势事件流给第二个控件,用户不能连贯的进行一个操作来完成应有的效果,降低用户体验。For some applications (apps), the same touch screen gesture event stream also needs multiple controls to handle, basically let the user touch the screen twice, the gesture event stream of the first touch screen is sent to a control, the second The gesture events of the second touch screen flow to the second control, and the user cannot perform an operation coherently to complete the desired effect, which reduces the user experience.

发明内容Contents of the invention

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的触摸屏手势事件流分发的方法和相应的触摸屏手势事件流分发的装置。In view of the above problems, the present invention is proposed to provide a method for distributing touch screen gesture event streams and a corresponding device for distributing touch screen gesture event streams, which overcome the above problems or at least partly solve the above problems.

根据本发明的一个方面,提供了一种触摸屏手势事件流分发的方法,其包括:According to one aspect of the present invention, a method for distributing touch screen gesture event streams is provided, which includes:

获取用户输入的完整手势事件流,完整手势事件流包括按下事件、至少一个移动事件和抬起事件;Obtain the complete gesture event stream input by the user. The complete gesture event stream includes a press event, at least one move event and a lift event;

根据完整手势事件流,分别向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流;Distributing the first gesture event stream responded by the first control and the second gesture event stream responded by the second control to the first control and the second control respectively according to the complete gesture event stream;

根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。The corresponding gesture operation is realized according to the first gesture event flow distributed to the first control and the second gesture event flow distributed to the second control.

根据本发明的另一方面,提供了一种触摸屏手势事件流分发的装置,其包括:According to another aspect of the present invention, a device for distributing touch screen gesture event streams is provided, which includes:

输入接口,适于获取用户通过触摸屏输入的完整手势事件流,完整手势事件流包括按下事件、至少一个移动事件和抬起事件;The input interface is adapted to obtain a complete gesture event stream input by the user through the touch screen, and the complete gesture event stream includes a press event, at least one movement event and a lift event;

分发模块,适于根据完整手势事件流,分别向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流;The distribution module is adapted to distribute the first gesture event stream responded by the first control and the second gesture event stream responded by the second control to the first control and the second control according to the complete gesture event stream;

操作模块,适于根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。The operation module is adapted to implement corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control.

根据本发明提供的方案,获取用户输入的完整手势事件流,完整手势事件流包括按下事件、至少一个移动事件和抬起事件;根据完整手势事件流,分别向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流;根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作,通过将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理。According to the solution provided by the present invention, the complete gesture event stream input by the user is acquired, and the complete gesture event stream includes a press event, at least one movement event and a lift event; according to the complete gesture event stream, respectively distribute to the first control and the second control The first gesture event stream responded by the first control and the second gesture event stream responded by the second control; according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control Realize the corresponding gesture operation. By distributing the complete gesture event stream to multiple controls, the user can easily complete the effect of multiple operations with one operation, reducing the number of operations, improving the user experience, and making the overall interaction more efficient. Fluency is more reasonable.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:

图1为本发明一个示例的应用程序的截图;Fig. 1 is the screenshot of the application program of an example of the present invention;

图2为本发明一个示例的应用程序表头的截图;Fig. 2 is a screenshot of the application header of an example of the present invention;

图3为本发明一个示例的应用程序具体内容的截图;Fig. 3 is a screenshot of the specific content of the application program of an example of the present invention;

图4示出了根据本发明一个实施例的触摸屏手势事件流分发的方法的流程图;FIG. 4 shows a flowchart of a method for distributing touch screen gesture event streams according to an embodiment of the present invention;

图5示出了根据本发明另一个实施例的触摸屏手势事件流分发的方法的流程图;FIG. 5 shows a flowchart of a method for distributing touch screen gesture event streams according to another embodiment of the present invention;

图6示出了根据本发明另一个实施例的触摸屏手势事件流分发的方法的流程图;FIG. 6 shows a flowchart of a method for distributing touch screen gesture event streams according to another embodiment of the present invention;

图7示出了根据本发明另一个实施例的触摸屏手势事件流分发的方法的流程图;FIG. 7 shows a flowchart of a method for distributing touch screen gesture event streams according to another embodiment of the present invention;

图8示出了根据本发明一个实施例的触摸屏手势事件流分发的装置的结构框图;FIG. 8 shows a structural block diagram of a device for distributing touch screen gesture event streams according to an embodiment of the present invention;

图9示出了根据本发明另一个实施例的触摸屏手势事件流分发的装置的结构框图。Fig. 9 shows a structural block diagram of an apparatus for distributing touch screen gesture event streams according to another embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

本申请的发明人在研发过程中发现,在进入到app:360手机助手,点击进入任一可下载的应用程序界面后,图1为应用程序好搜的截图,用户在阅读该应用程序介绍时需要通过两次手指按下、移动、抬起才能实现相关阅读,第一次手指按下、移动、抬起仅仅是控制应用程序表头(如图2所示)动作,当表头消失后,无法继续控制应用程序具体内容动作;第二次手指按下、移动、抬起是控制应用程序具体内容(如图3所示)动作。用户无法通过一次操作实现同时控制应用程序表头和应用程序具体内容动作,本申请的发明人基于此提出了本申请。The inventor of this application discovered during the research and development process that after entering the app: 360 Mobile Assistant and clicking to enter any downloadable application program interface, Figure 1 is a screenshot of the application program Haosou. When the user reads the introduction of the application program It is necessary to press, move, and lift two fingers to realize relevant reading. The first finger press, move, and lift are only to control the action of the application meter (as shown in Figure 2). When the meter disappears, It is impossible to continue to control the specific content of the application; the second finger press, move, and lift are actions to control the specific content of the application (as shown in Figure 3). The user cannot simultaneously control the header of the application program and the action of the specific content of the application program through one operation, and the inventor of the present application proposes the present application based on this.

图4示出了根据本发明一个实施例的触摸屏手势事件流分发的方法的流程图。如图4所示,该方法包括以下步骤:Fig. 4 shows a flowchart of a method for distributing touch screen gesture event streams according to an embodiment of the present invention. As shown in Figure 4, the method includes the following steps:

步骤S400,获取用户输入的完整手势事件流。Step S400, acquiring a complete gesture event stream input by the user.

其中,完整手势事件流包括按下事件、至少一个移动事件和抬起事件。按下事件具体指用户手指点击触摸屏;移动事件指用户手指在触摸屏上移动;抬起事件指用户手指离开触摸屏。这里用户输入的完整的手势事件流包括用户手指点击触摸屏、用户手指在触摸屏上移动和用户手指离开触摸屏。Wherein, the complete gesture event flow includes a press event, at least one move event and a lift event. The press event specifically refers to the user's finger clicking on the touch screen; the move event refers to the user's finger moving on the touch screen; the lift event refers to the user's finger leaving the touch screen. Here, the complete flow of gesture events input by the user includes the user's finger clicking on the touch screen, the user's finger moving on the touch screen, and the user's finger leaving the touch screen.

步骤S410,根据完整手势事件流,分别向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流。Step S410, according to the complete gesture event stream, respectively distribute the first gesture event stream responded by the first widget and the second gesture event stream responded by the second widget to the first widget and the second widget.

其中,控件可以控制触摸屏显示界面根据用户手势事件流做出相应的操作。例如,用户手势事件流为用户手指垂直向上移动,则控件可以控制触摸屏显示界面向上移动;用户手势事件流为用户手指水平向右移动,则控件可以控制触摸屏显示界面水平移动。本步骤中的第一控件和第二控件只响应其对应的手势事件流,对其他手势事件流不做响应,举例说明,第一控件响应水平移动的手势事件流,第一控件对垂直移动的手势事件流不响应,这里仅仅是举例说明,本领域技术人员应该理解其不具有任何具体限定作用。Wherein, the control can control the touch screen display interface to perform corresponding operations according to the flow of user gesture events. For example, if the user gesture event flow is that the user's finger moves vertically upward, the control can control the touch screen display interface to move upward; if the user gesture event flow is the user's finger moves horizontally to the right, the control can control the touch screen display interface to move horizontally. The first control and the second control in this step only respond to their corresponding gesture event streams, and do not respond to other gesture event streams. For example, the first control responds to the gesture event stream of horizontal movement, and the first control responds to the vertical movement The gesture event flow does not respond, which is just an example, and those skilled in the art should understand that it does not have any specific limiting effect.

步骤S420,根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。Step S420, implementing corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control.

其中,第一控件和第二控件在接收到分发的手势事件流后,根据各自的手势事件流控制触摸屏显示界面动作,例如,第一控件接收到的手势事件流为水平向右移动,则第一控件控制触摸屏显示界面水平向右移动。Wherein, after receiving the distributed gesture event stream, the first control and the second control control the touch screen display interface actions according to their respective gesture event streams. For example, if the gesture event stream received by the first control is to move horizontally to the right, then the second A control controls the touch screen display interface to move horizontally to the right.

根据本发明上述实施例提供的方法,向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流,根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作,将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理。According to the method provided by the above-mentioned embodiments of the present invention, the first gesture event stream responded by the first control and the second gesture event stream responded by the second control are distributed to the first control and the second control. The first gesture event stream and the second gesture event stream distributed to the second control realize the corresponding gesture operation, and distribute the complete gesture event stream to multiple controls, so that the user can conveniently complete multiple operations with one operation. The effect is to reduce the number of operations, improve the user experience, and make the overall interaction smoother and more reasonable.

图5示出了根据本发明另一个实施例的触摸屏手势事件流分发的方法的流程图。如图5所示,该方法包括以下步骤:Fig. 5 shows a flowchart of a method for distributing touch screen gesture event streams according to another embodiment of the present invention. As shown in Figure 5, the method includes the following steps:

步骤S500,获取用户输入的完整手势事件流。Step S500, acquiring a complete stream of gesture events input by the user.

其中,完整手势事件流包括按下事件、至少一个移动事件和抬起事件。按下事件具体指用户手指点击触摸屏;移动事件指用户手指在触摸屏上移动;抬起事件指用户手指离开触摸屏。这里用户输入的完整的手势事件流包括用户手指点击触摸屏、用户手指在触摸屏上移动和用户手指离开触摸屏。以用户阅读图1所示应用程序好搜的显示界面为例,完整的手势事件流包括用户点击好搜应用程序显示界面,用户手指在显示界面上移动和用户手指从应用程序显示界面抬起。Wherein, the complete gesture event flow includes a press event, at least one move event and a lift event. The press event specifically refers to the user's finger clicking on the touch screen; the move event refers to the user's finger moving on the touch screen; the lift event refers to the user's finger leaving the touch screen. Here, the complete flow of gesture events input by the user includes the user's finger clicking on the touch screen, the user's finger moving on the touch screen, and the user's finger leaving the touch screen. Taking the user reading the display interface of the application Haosou shown in Figure 1 as an example, the complete gesture event flow includes the user clicking the display interface of the application Haosou, the user’s finger moving on the display interface, and the user’s finger lifting from the application display interface.

步骤S510,将完整手势事件流所包括的按下事件以及至少一个移动事件的一部分分发给第一控件,以供第一控件进行响应。Step S510, distribute a part of the press event and at least one move event included in the complete gesture event stream to the first control for the first control to respond to.

本步骤的第一控件用于控制好搜应用程序表头动作,具体地控制应用程序表头在垂直方向上下移动;第二控件用于控制好搜应用程序具体内容动作,具体控制应用程序具体内容在垂直方向上下移动。The first control in this step is used to control the header action of the Haosou application, specifically to control the vertical movement of the header of the application; the second control is used to control the specific content action of the Haosou application, specifically to control the specific content of the application Move up and down vertically.

本步骤中,按下事件以及至少一个移动事件的一部分具体是用户点击好搜应用程序显示界面和用户手指控制显示界面向上移动直至好搜应用程序表头消失这一部分移动事件。具体地,将MotionEvent.ACTION_DOWN函数和action_move函数传送给第一控件,以供第一控件进行响应。In this step, the press event and at least one part of the movement event are specifically the part of the movement event that the user clicks on the Haosou application display interface and the user's finger controls the display interface to move up until the Haosou application header disappears. Specifically, the MotionEvent.ACTION_DOWN function and the action_move function are transmitted to the first control for the first control to respond to.

步骤S520,当第一控件无法响应后续的移动事件时,通过重定义事件的方式将完整手势事件流所包括的至少一个移动事件的另一部分和抬起事件分发给第二控件,以供第二控件进行响应。Step S520, when the first control cannot respond to the subsequent movement event, distribute another part of at least one movement event and the lift event included in the complete gesture event flow to the second control by redefining the event, for the second control The control responds.

具体地,第一控件无法响应后续的移动事件具体为:第一控件从前端用户界面中消失;或者,后续的移动事件不属于第一控件的响应事件范围。本步骤中的重定义事件的方式是指将相关事件分发给相应的控件,这里利用setAction函数重新定义事件,并利用dispatchTouchEvent函数将应用程序表头消失后的用户手指在应用程序显示界面上移动的手势事件流和用户手指从应用程序显示界面抬起事件分发给第二控件。Specifically, the inability of the first control to respond to subsequent movement events specifically includes: the first control disappears from the front-end user interface; or, the subsequent movement events do not belong to the response event scope of the first control. The method of redefining the event in this step refers to distributing related events to the corresponding controls. Here, the setAction function is used to redefine the event, and the dispatchTouchEvent function is used to move the user's finger on the application display interface after the application header disappears. The gesture event flow and the user's finger lifting event from the application program display interface are distributed to the second control.

步骤S530,根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。Step S530, implementing corresponding gesture operations according to the first gesture event stream distributed to the first widget and the second gesture event stream distributed to the second widget.

具体地,第一控件根据所接收到的第一手势事件流控制应用程序表头垂直向上移动;第二控件根据所接收到的第二手势事件流控制应用程序具体内容垂直向上移动,第二控件接收到MotionEvent.ACTION_UP函数后,结束对应用程序具体内容的控制,应用程序具体内容不再垂直向上移动。Specifically, the first control controls the application header to move vertically upwards according to the received first gesture event flow; the second control controls the application specific content to move vertically upwards according to the received second gesture event flow, and the second After the control receives the MotionEvent.ACTION_UP function, it ends the control of the specific content of the application program, and the specific content of the application program no longer moves vertically upward.

步骤S540,根据第一控件结束手势事件流的需求向第一控件分发抬起事件以结束相应的手势事件流。Step S540 , dispatching a lift event to the first control according to the need of the first control to end the gesture event flow, so as to end the corresponding gesture event flow.

抬起事件是手势事件流的结束动作,控件只有在收到分发的抬起事件的情况下,才会结束相应的手势事件流。当控件收到分发的抬起事件后,将不再响应后续的手势事件流,应用程序的显示界面也不再动作。第一控件在接收到MotionEvent.ACTION_UP函数后,结束对应用程序表头的控制。The lift event is the end action of the gesture event stream, and the control will end the corresponding gesture event stream only when it receives the distributed lift event. After the control receives the distributed lift event, it will no longer respond to the subsequent gesture event stream, and the display interface of the application will no longer act. After receiving the MotionEvent.ACTION_UP function, the first control ends the control of the application header.

在本实施例中,第一控件和第二控件各自响应至少一个移动事件的一部分,即控制应用程序具体内容动作的部分。In this embodiment, each of the first control and the second control responds to a part of at least one movement event, that is, the part that controls the action of the specific content of the application program.

根据本发明上述实施例提供的方法,将完整手势事件流所包括的按下事件以及至少一个移动事件的一部分分发给第一控件,以供第一控件进行响应,当第一控件无法响应后续的移动事件时,通过重定义事件的方式将完整手势事件流所包括的至少一个移动事件的另一部分和抬起事件分发给第二控件,以供第二控件进行响应,第一控件和第二控件根据分发的手势事件流实现对应的手势操作,根据第一控件结束手势事件流的需求向第一控件分发抬起事件以结束相应的手势事件流,将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理,且能够根据控件所能实现操作分发手势事件流,具有灵活性。According to the method provided by the above-mentioned embodiments of the present invention, a part of the press event and at least one movement event included in the complete gesture event stream is distributed to the first control for the first control to respond to. When the first control cannot respond to the subsequent When moving an event, another part of at least one moving event and a lifting event included in the complete gesture event stream are distributed to the second control by redefining the event, so that the second control can respond, the first control and the second control Realize the corresponding gesture operation according to the distributed gesture event flow, distribute the lift event to the first control to end the corresponding gesture event flow according to the requirement of the first control to end the gesture event flow, and distribute the complete gesture event flow to multiple controls, so that Users can easily complete the effect of multiple operations with one operation, reducing the number of operations, improving the user experience, making the overall interaction smoother and more reasonable, and can distribute gesture event streams according to the operations that can be realized by the controls, which is flexible. sex.

图6示出了根据本发明另一个实施例的触摸屏手势事件流分发的方法的流程图。如图6所示,该方法包括以下步骤:Fig. 6 shows a flowchart of a method for distributing touch screen gesture event streams according to another embodiment of the present invention. As shown in Figure 6, the method includes the following steps:

步骤S600,获取用户输入的完整手势事件流。Step S600, acquiring a complete stream of gesture events input by the user.

本步骤与图5所示实施例中的步骤S500类似,在此不再赘述。This step is similar to step S500 in the embodiment shown in FIG. 5 , and will not be repeated here.

步骤S610,将完整手势事件流所包括的按下事件、至少一个移动事件以及抬起事件分发给第一控件,以供第一控件进行响应。Step S610, distribute the press event, at least one move event and lift event included in the complete gesture event flow to the first control for the first control to respond.

本步骤中,用户手指点击应用程序显示界面、将控制应用程序显示界面移动的移动事件和用户手指离开应用程序显示界面分发给第一控件,第一控件只在接收到用户手指离开应用程序界面的事件后,才会结束对应用程序界面的控制。具体地,将MotionEvent.ACTION_DOWN函数、action_move函数和MotionEvent.ACTION_UP函数传送给第一控件,以供第一控件进行响应。In this step, the user clicks the application program display interface with the user's finger, and distributes the movement event for controlling the movement of the application program display interface and the user's finger leaving the application program display interface to the first control. After the event, control of the application interface will end. Specifically, the MotionEvent.ACTION_DOWN function, the action_move function and the MotionEvent.ACTION_UP function are transmitted to the first control for the first control to respond.

步骤S620,通过重定义事件的方式将完整手势事件流所包括的至少一个移动事件的一部分和抬起事件分发给第二控件,以供第二控件进行响应。Step S620, distribute a part of at least one move event and lift event included in the complete gesture event flow to the second control by redefining the event, so that the second control can respond.

本步骤中的重定义事件的方式是指将相关事件分发给相应的控件,这里至少一个移动事件的一部分是控制应用程序具体内容动作的部分。利用setAction函数重新定义事件,并利用dispatchTouchEvent函数将控制应用程序具体内容动作的移动事件和用户手指从应用程序显示界面抬起事件分发给第二控件。The manner of redefining events in this step refers to distributing related events to corresponding controls, where at least a part of a mobile event is a part that controls specific content actions of the application program. The setAction function is used to redefine the event, and the dispatchTouchEvent function is used to distribute the movement event controlling the specific content action of the application program and the lifting event of the user's finger from the application program display interface to the second control.

步骤S630,根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。Step S630, implementing corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control.

本步骤与图5所示实施例中的步骤S530类似,在此不再赘述。This step is similar to step S530 in the embodiment shown in FIG. 5 , and will not be repeated here.

在本实施例中,第一控件和第二控件可以同时响应至少一个移动事件的一部分,即控制应用程序具体内容动作的部分。In this embodiment, the first control and the second control can simultaneously respond to at least a part of a movement event, that is, the part that controls the action of the specific content of the application program.

根据本发明上述实施例提供的方法,将完整手势事件流所包括的按下事件、至少一个移动事件以及抬起事件分发给第一控件,以供第一控件进行响应,通过重定义事件的方式将完整手势事件流所包括的至少一个移动事件的一部分和抬起事件分发给第二控件,以供第二控件进行响应,第一控件和第二控件根据分发的手势事件流实现对应的手势操作,将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理,且能够根据控件所能实现操作分发手势事件流,具有灵活性。According to the method provided by the above-mentioned embodiments of the present invention, the press event, at least one move event, and lift event included in the complete gesture event stream are distributed to the first control for the first control to respond, by redefining the event Distribute a part of at least one move event and a lift event included in the complete gesture event stream to the second control for the second control to respond to, and the first control and the second control implement corresponding gesture operations according to the distributed gesture event stream , distribute the complete gesture event stream to multiple controls, so that the user can easily complete the effect of multiple operations with one operation, reduce the number of operations, improve the user experience, and make the overall interaction smoother and more reasonable. Distribute the gesture event stream according to the operations that the control can realize, which is flexible.

图7示出了根据本发明另一个实施例的触摸屏手势事件流分发的方法的流程图。如图7所示,该方法包括以下步骤:Fig. 7 shows a flow chart of a method for distributing touch screen gesture event streams according to another embodiment of the present invention. As shown in Figure 7, the method includes the following steps:

步骤S700,获取用户输入的完整手势事件流。In step S700, a complete flow of gesture events input by the user is obtained.

本步骤与图5所示实施例中的步骤S500类似,在此不再赘述。This step is similar to step S500 in the embodiment shown in FIG. 5 , and will not be repeated here.

步骤S710,对完整手势事件流进行手势识别处理,将属于第一控件的响应事件范围的第一手势事件流分发给第一控件,将属于第二控件的响应事件范围的第二手势事件流分发给第二控件。Step S710, performing gesture recognition processing on the complete gesture event stream, distributing the first gesture event stream belonging to the response event range of the first control to the first control, and distributing the second gesture event stream belonging to the response event range of the second control Distributed to the second control.

其中,响应事件范围包括水平移动事件或垂直移动事件。在本步骤中,第一控件响应水平移动事件,第二控件响应垂直移动事件,用户输入一个斜上方45°的移动事件,通过对该移动进行手势识别处理,将该移动事件切分为水平向左的移动事件和垂直向上的移动事件,根据第一控件和第二控件响应事件范围,将水平向左的移动事件分发给第一控件,将垂直向上的移动事件分发给第二控件。Wherein, the response event range includes a horizontal movement event or a vertical movement event. In this step, the first control responds to the horizontal movement event, and the second control responds to the vertical movement event. The user inputs a movement event at an angle of 45° upward, and the movement event is divided into horizontal movement events by performing gesture recognition processing on the movement. For the left movement event and the vertical upward movement event, according to the response event range of the first control and the second control, the horizontal left movement event is distributed to the first control, and the vertical upward movement event is distributed to the second control.

步骤S720,根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。Step S720, implementing corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control.

本步骤与图5所示实施例中的步骤S530类似,在此不再赘述。This step is similar to step S530 in the embodiment shown in FIG. 5 , and will not be repeated here.

步骤S730,根据第一控件和/或第二控件结束手势事件流的需求向第一控件和/或第二控件分发抬起事件以结束相应的手势事件流。Step S730 , dispatching a lift event to the first control and/or the second control to end the corresponding gesture event flow according to the need of the first control and/or the second control to end the gesture event flow.

本步骤与图5所示实施例中的步骤S540类似,在此不再赘述。This step is similar to step S540 in the embodiment shown in FIG. 5 , and will not be repeated here.

根据本发明上述实施例提供的方法,对完整手势事件流进行手势识别处理,将属于第一控件的响应事件范围的第一手势事件流分发给第一控件,将属于第二控件的响应事件范围的第二手势事件流分发给第二控件,第一控件和第二控件根据接收到到的手势事件流实现对应的手势操作,根据第一控件和/或第二控件结束手势事件流的需求向第一控件和/或第二控件分发抬起事件以结束相应的手势事件流,将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理,且能够根据控件所能实现操作分发手势事件流,而且用户可以输入任意的手势具有灵活性。According to the method provided by the above-mentioned embodiments of the present invention, perform gesture recognition processing on the complete gesture event stream, distribute the first gesture event stream belonging to the response event range of the first control to the first control, and distribute the first gesture event stream belonging to the response event range of the second control The second gesture event stream is distributed to the second control, the first control and the second control implement corresponding gesture operations according to the received gesture event stream, and end the gesture event stream according to the requirements of the first control and/or the second control Distribute the lift event to the first control and/or the second control to end the corresponding gesture event flow, distribute the complete gesture event flow to multiple controls, so that the user can conveniently complete the effect of multiple operations with one operation, The number of operations is reduced, the user experience is improved, the overall interaction is smoother and more reasonable, and the gesture event flow can be distributed according to the operations that can be realized by the control, and the user can input arbitrary gestures with flexibility.

图8示出了根据本发明一个实施例的触摸屏手势事件流分发的装置的结构框图。如图8所示,该装置包括:输入接口800、分发模块810、操作模块820。Fig. 8 shows a structural block diagram of an apparatus for distributing touch screen gesture event streams according to an embodiment of the present invention. As shown in FIG. 8 , the device includes: an input interface 800 , a distribution module 810 , and an operation module 820 .

输入接口800,适于获取用户通过触摸屏输入的完整手势事件流,完整手势事件流包括按下事件、至少一个移动事件和抬起事件。The input interface 800 is adapted to acquire a complete gesture event stream input by the user through the touch screen, and the complete gesture event stream includes a press event, at least one move event and a lift event.

分发模块810,适于根据完整手势事件流,分别向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流。The distribution module 810 is adapted to distribute the first gesture event stream responded by the first control and the second gesture event stream responded by the second control to the first control and the second control respectively according to the complete gesture event flow.

操作模块820,适于根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。The operation module 820 is adapted to implement corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control.

根据本发明上述实施例提供的装置,向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流,根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作,将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理。According to the device provided by the above-mentioned embodiments of the present invention, the first gesture event stream responded by the first control and the second gesture event stream responded by the second control are distributed to the first control and the second control. The first gesture event stream and the second gesture event stream distributed to the second control realize the corresponding gesture operation, and distribute the complete gesture event stream to multiple controls, so that the user can conveniently complete multiple operations with one operation. The effect is to reduce the number of operations, improve the user experience, and make the overall interaction smoother and more reasonable.

图9示出了根据本发明另一个实施例的触摸屏手势事件流分发的装置的结构框图。如图9所示,该装置包括:输入接口900、分发模块910、操作模块920、结束模块930。Fig. 9 shows a structural block diagram of an apparatus for distributing touch screen gesture event streams according to another embodiment of the present invention. As shown in FIG. 9 , the device includes: an input interface 900 , a distribution module 910 , an operation module 920 , and an end module 930 .

输入接口900,适于获取用户通过触摸屏输入的完整手势事件流,完整手势事件流包括按下事件、至少一个移动事件和抬起事件。The input interface 900 is adapted to acquire a complete gesture event flow input by the user through the touch screen, and the complete gesture event flow includes a press event, at least one movement event and a lift event.

分发模块910,适于根据完整手势事件流,分别向第一控件和第二控件分发由第一控件响应的第一手势事件流和由第二控件响应的第二手势事件流。The distribution module 910 is adapted to distribute the first gesture event stream responded by the first control and the second gesture event stream responded by the second control to the first control and the second control respectively according to the complete gesture event flow.

可选地,分发模块910进一步适于:将完整手势事件流所包括的按下事件以及至少一个移动事件的一部分分发给第一控件,以供第一控件进行响应;当第一控件无法响应后续的移动事件时,通过重定义事件的方式将完整手势事件流所包括的至少一个移动事件的另一部分和抬起事件分发给第二控件,以供第二控件进行响应。Optionally, the distribution module 910 is further adapted to: distribute a part of the press event and at least one movement event included in the complete gesture event stream to the first control for the first control to respond to; when the first control cannot respond to the subsequent When the movement event is performed, another part of at least one movement event and the lifting event included in the complete gesture event flow are distributed to the second control by redefining the event, so that the second control can respond.

其中,第一控件无法响应后续的移动事件具体为:第一控件从前端用户界面中消失;或者,后续的移动事件不属于第一控件的响应事件范围。Wherein, the failure of the first control to respond to subsequent movement events specifically includes: the first control disappears from the front-end user interface; or, the subsequent movement events do not belong to the response event scope of the first control.

可选地,分发模块910进一步适于:将完整手势事件流所包括的按下事件、至少一个移动事件以及抬起事件分发给第一控件,以供第一控件进行响应;通过重定义事件的方式将完整手势事件流所包括的至少一个移动事件的一部分和抬起事件分发给第二控件,以供第二控件进行响应。Optionally, the distribution module 910 is further adapted to: distribute the press event, at least one move event, and lift event included in the complete gesture event stream to the first control for the first control to respond to; by redefining the event The method distributes a part of at least one move event and lift event included in the complete gesture event stream to the second control for the second control to respond.

可选地,分发模块910进一步适于:对完整手势事件流进行手势识别处理,将属于第一控件的响应事件范围的第一手势事件流分发给第一控件,将属于第二控件的响应事件范围的第二手势事件流分发给第二控件。Optionally, the distribution module 910 is further adapted to: perform gesture recognition processing on the complete gesture event stream, distribute the first gesture event stream belonging to the response event range of the first control to the first control, and distribute the response event belonging to the second control The scope's second stream of gesture events is dispatched to the second control.

其中,响应事件范围包括水平移动事件或垂直移动事件。Wherein, the response event range includes a horizontal movement event or a vertical movement event.

操作模块920,适于根据分发给第一控件的第一手势事件流和分发给第二控件的第二手势事件流实现对应的手势操作。The operation module 920 is adapted to implement corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control.

结束模块930,适于根据第一控件和/或第二控件结束手势事件流的需求向第一控件和/或第二控件分发抬起事件以结束相应的手势事件流。The end module 930 is adapted to distribute a lift event to the first control and/or the second control according to the need of the first control and/or the second control to end the gesture event flow so as to end the corresponding gesture event flow.

根据本发明上述实施例提供的装置,将完整手势事件流分发给多个控件,使用户可以方便的以一次操作完成多次操作才能完成的效果,减少了操作次数,提升了用户体验,使整体的交互更流畅更合理,且能够根据控件所能实现操作分发手势事件流,而且用户可以输入任意的手势具有灵活性。According to the device provided by the above-mentioned embodiments of the present invention, the complete gesture event stream is distributed to multiple controls, so that the user can conveniently complete the effect of multiple operations with one operation, reduce the number of operations, improve the user experience, and make the overall The interaction is smoother and more reasonable, and the gesture event flow can be distributed according to the operations that the control can achieve, and the user can input any gesture with flexibility.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的触摸屏手势事件流分发的设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to realize some or all functions of some or all components in the device for distributing touch screen gesture event streams according to embodiments of the present invention . The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

本发明公开了:A1、一种触摸屏手势事件流分发的方法,其包括:The invention discloses: A1, a method for distributing touch screen gesture event streams, which includes:

获取用户输入的完整手势事件流,所述完整手势事件流包括按下事件、至少一个移动事件和抬起事件;Obtaining a complete gesture event stream input by the user, the complete gesture event stream including a press event, at least one movement event and a lift event;

根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流;Distributing the first gesture event stream responded by the first control and the second gesture event stream responded by the second control to the first control and the second control respectively according to the complete gesture event stream;

根据分发给所述第一控件的第一手势事件流和分发给所述第二控件的第二手势事件流实现对应的手势操作。A corresponding gesture operation is realized according to the first gesture event flow distributed to the first control and the second gesture event flow distributed to the second control.

A2、根据A1所述的方法,其中,在所述实现对应的手势操作之后,所述方法进一步包括:A2. The method according to A1, wherein, after implementing the corresponding gesture operation, the method further includes:

根据所述第一控件和/或所述第二控件结束手势事件流的需求向所述第一控件和/或所述第二控件分发抬起事件以结束相应的手势事件流。Distributing a lift event to the first control and/or the second control according to the need of the first control and/or the second control to end the gesture event flow to end the corresponding gesture event flow.

A3、根据A1所述的方法,其中,所述根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流进一步包括:A3. The method according to A1, wherein, according to the complete gesture event stream, the first gesture event stream responded by the first control and the gesture event stream responded by the second control are respectively distributed to the first control and the second control. The second gesture event stream that the control responds to further includes:

将所述完整手势事件流所包括的按下事件以及至少一个移动事件的一部分分发给第一控件,以供所述第一控件进行响应;Distributing a part of the press event and at least one movement event included in the complete gesture event stream to the first control for the first control to respond to;

当所述第一控件无法响应后续的移动事件时,通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的另一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。When the first control cannot respond to subsequent movement events, another part of at least one movement event included in the complete gesture event flow and the lifting event are distributed to the second control by redefining the event, so that all The second control described above responds.

A4、根据A3所述的方法,其中,所述第一控件无法响应后续的移动事件具体为:所述第一控件从前端用户界面中消失;或者,所述后续的移动事件不属于所述第一控件的响应事件范围。A4. The method according to A3, wherein the inability of the first control to respond to a subsequent movement event is specifically: the first control disappears from the front-end user interface; or, the subsequent movement event does not belong to the first movement event A control's response event scope.

A5、根据A1所述的方法,其中,所述根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流进一步包括:A5. The method according to A1, wherein, according to the complete gesture event stream, the first gesture event stream responded by the first control and the gesture event stream responded by the second control are respectively distributed to the first control and the second control. The second gesture event stream that the control responds to further includes:

将所述完整手势事件流所包括的按下事件、至少一个移动事件以及抬起事件分发给第一控件,以供所述第一控件进行响应;Distributing the press event, at least one move event, and lift event included in the complete gesture event stream to the first control for the first control to respond to;

通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。Distributing a part of at least one move event and lift event included in the complete gesture event stream to the second control by redefining the event, so that the second control can respond.

A6、根据A1所述的方法,其中,所述根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流进一步包括:A6. The method according to A1, wherein, according to the complete gesture event stream, the first gesture event stream responded by the first control and the gesture event stream responded by the second control are respectively distributed to the first control and the second control. The second gesture event stream that the control responds to further includes:

对所述完整手势事件流进行手势识别处理,将属于所述第一控件的响应事件范围的第一手势事件流分发给第一控件,将属于所述第二控件的响应事件范围的第二手势事件流分发给第二控件。Perform gesture recognition processing on the complete gesture event stream, distribute the first gesture event stream belonging to the response event range of the first control to the first control, and distribute the second gesture event stream belonging to the response event range of the second control The stream of potential events is distributed to the second control.

A7、根据A6所述的方法,其中,所述响应事件范围包括水平移动事件或垂直移动事件。A7. The method according to A6, wherein the response event range includes a horizontal movement event or a vertical movement event.

本发明还公开了:B8、一种触摸屏手势事件流分发的装置,其包括:The present invention also discloses: B8, a device for distributing touch screen gesture event streams, which includes:

输入接口,适于获取用户输入的完整手势事件流,所述完整手势事件流包括按下事件、至少一个移动事件和抬起事件;The input interface is adapted to obtain a complete gesture event stream input by the user, the complete gesture event stream including a press event, at least one movement event and a lift event;

分发模块,适于根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流;A distribution module, adapted to distribute the first gesture event stream responded by the first control and the second gesture event responded by the second control to the first control and the second control respectively according to the complete gesture event stream flow;

操作模块,适于根据分发给所述第一控件的第一手势事件流和分发给所述第二控件的第二手势事件流实现对应的手势操作。The operation module is adapted to implement corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control.

B9、根据B8所述的装置,其中,所述装置进一步包括:B9. The device according to B8, wherein the device further comprises:

结束模块,适于根据所述第一控件和/或所述第二控件结束手势事件流的需求向所述第一控件和/或所述第二控件分发抬起事件以结束相应的手势事件流。An end module, adapted to distribute a lift event to the first control and/or the second control according to the need for the first control and/or the second control to end the gesture event flow to end the corresponding gesture event flow .

B10、根据B8所述的装置,其中,所述分发模块进一步适于:B10. The device according to B8, wherein the distribution module is further adapted to:

将所述完整手势事件流所包括的按下事件以及至少一个移动事件的一部分分发给第一控件,以供所述第一控件进行响应;Distributing a part of the press event and at least one movement event included in the complete gesture event stream to the first control for the first control to respond to;

当所述第一控件无法响应后续的移动事件时,通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的另一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。When the first control cannot respond to subsequent movement events, another part of at least one movement event included in the complete gesture event flow and the lifting event are distributed to the second control by redefining the event, so that all The second control described above responds.

B11、根据B10所述的装置,其中,所述第一控件无法响应后续的移动事件具体为:所述第一控件从前端用户界面中消失;或者,所述后续的移动事件不属于所述第一控件的响应事件范围。B11. The device according to B10, wherein the inability of the first control to respond to a subsequent movement event is specifically: the first control disappears from the front-end user interface; or, the subsequent movement event does not belong to the first movement event A control's response event scope.

B12、根据B8所述的装置,其中,所述分发模块进一步适于:B12. The device according to B8, wherein the distribution module is further adapted to:

将所述完整手势事件流所包括的按下事件、至少一个移动事件以及抬起事件分发给第一控件,以供所述第一控件进行响应;Distributing the press event, at least one move event, and lift event included in the complete gesture event stream to the first control for the first control to respond to;

通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。Distributing a part of at least one move event and lift event included in the complete gesture event stream to the second control by redefining the event, so that the second control can respond.

B13、根据B8所述的装置,其中,所述分发模块进一步适于:B13. The device according to B8, wherein the distribution module is further adapted to:

对所述完整手势事件流进行手势识别处理,将属于所述第一控件的响应事件范围的第一手势事件流分发给第一控件,将属于所述第二控件的响应事件范围的第二手势事件流分发给第二控件。Perform gesture recognition processing on the complete gesture event stream, distribute the first gesture event stream belonging to the response event range of the first control to the first control, and distribute the second gesture event stream belonging to the response event range of the second control The stream of potential events is distributed to the second control.

B14、根据B13所述的装置,其中,所述响应事件范围包括水平移动事件或垂直移动事件。B14. The device according to B13, wherein the response event range includes a horizontal movement event or a vertical movement event.

Claims (14)

1.一种触摸屏手势事件流分发的方法,其包括:1. A method for distribution of touch screen gesture event streams, comprising: 获取用户输入的完整手势事件流,所述完整手势事件流包括按下事件、至少一个移动事件和抬起事件;Obtaining a complete gesture event stream input by the user, the complete gesture event stream including a press event, at least one movement event and a lift event; 根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流;Distributing the first gesture event stream responded by the first control and the second gesture event stream responded by the second control to the first control and the second control respectively according to the complete gesture event stream; 根据分发给所述第一控件的第一手势事件流和分发给所述第二控件的第二手势事件流实现对应的手势操作,其中,第一控件控制应用程序表头动作,第二控件控制应用程序具体内容动作。The corresponding gesture operation is realized according to the first gesture event flow distributed to the first control and the second gesture event flow distributed to the second control, wherein the first control controls the action of the application program header, and the second control Control application specific content actions. 2.根据权利要求1所述的方法,其中,在所述实现对应的手势操作之后,所述方法进一步包括:2. The method according to claim 1, wherein, after implementing the corresponding gesture operation, the method further comprises: 根据所述第一控件和/或所述第二控件结束手势事件流的需求向所述第一控件和/或所述第二控件分发抬起事件以结束相应的手势事件流。Distributing a lift event to the first control and/or the second control according to the need of the first control and/or the second control to end the gesture event flow to end the corresponding gesture event flow. 3.根据权利要求1所述的方法,其中,所述根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流进一步包括:3. The method according to claim 1, wherein the first gesture event stream responded by the first control and the first gesture event stream responded by the first control are distributed to the first control and the second control according to the complete gesture event flow. The second gesture event flow that the second control responds to further includes: 将所述完整手势事件流所包括的按下事件以及至少一个移动事件的一部分分发给第一控件,以供所述第一控件进行响应;Distributing a part of the press event and at least one movement event included in the complete gesture event stream to the first control for the first control to respond to; 当所述第一控件无法响应后续的移动事件时,通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的另一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。When the first control cannot respond to subsequent movement events, another part of at least one movement event included in the complete gesture event flow and the lifting event are distributed to the second control by redefining the event, so that all The second control described above responds. 4.根据权利要求3所述的方法,其中,所述第一控件无法响应后续的移动事件具体为:所述第一控件从前端用户界面中消失;或者,所述后续的移动事件不属于所述第一控件的响应事件范围。4. The method according to claim 3, wherein the inability of the first control to respond to subsequent movement events is specifically: the first control disappears from the front-end user interface; or, the subsequent movement events do not belong to all Describe the response event scope of the first control. 5.根据权利要求1所述的方法,其中,所述根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流进一步包括:5. The method according to claim 1, wherein the first gesture event stream responded by the first control and the first gesture event stream responded by the first control are distributed to the first control and the second control according to the complete gesture event flow. The second gesture event flow that the second control responds to further includes: 将所述完整手势事件流所包括的按下事件、至少一个移动事件以及抬起事件分发给第一控件,以供所述第一控件进行响应;Distributing the press event, at least one move event, and lift event included in the complete gesture event stream to the first control for the first control to respond to; 通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。Distributing a part of at least one move event and lift event included in the complete gesture event stream to the second control by redefining the event, so that the second control can respond. 6.根据权利要求1所述的方法,其中,所述根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流进一步包括:6. The method according to claim 1, wherein, according to the complete gesture event stream, distributing the first gesture event stream responded by the first control and the gesture event stream responded by the first control to the first control and the second control respectively The second gesture event flow that the second control responds to further includes: 对所述完整手势事件流进行手势识别处理,将属于所述第一控件的响应事件范围的第一手势事件流分发给第一控件,将属于所述第二控件的响应事件范围的第二手势事件流分发给第二控件。Perform gesture recognition processing on the complete gesture event stream, distribute the first gesture event stream belonging to the response event range of the first control to the first control, and distribute the second gesture event stream belonging to the response event range of the second control The stream of potential events is distributed to the second control. 7.根据权利要求6所述的方法,其中,所述响应事件范围包括水平移动事件或垂直移动事件。7. The method of claim 6, wherein the range of response events includes a horizontal movement event or a vertical movement event. 8.一种触摸屏手势事件流分发的装置,其包括:8. A device for distributing touch screen gesture event streams, comprising: 输入接口,适于获取用户输入的完整手势事件流,所述完整手势事件流包括按下事件、至少一个移动事件和抬起事件;The input interface is adapted to obtain a complete gesture event stream input by the user, the complete gesture event stream including a press event, at least one movement event and a lift event; 分发模块,适于根据所述完整手势事件流,分别向第一控件和第二控件分发由所述第一控件响应的第一手势事件流和由所述第二控件响应的第二手势事件流;A distribution module, adapted to distribute the first gesture event stream responded by the first control and the second gesture event responded by the second control to the first control and the second control respectively according to the complete gesture event stream flow; 操作模块,适于根据分发给所述第一控件的第一手势事件流和分发给所述第二控件的第二手势事件流实现对应的手势操作,其中,第一控件控制应用程序表头动作,第二控件控制应用程序具体内容动作。An operation module, adapted to implement corresponding gesture operations according to the first gesture event stream distributed to the first control and the second gesture event stream distributed to the second control, wherein the first control controls the application header Action, the second control controls the specific content action of the application. 9.根据权利要求8所述的装置,其中,所述装置进一步包括:9. The apparatus of claim 8, wherein the apparatus further comprises: 结束模块,适于根据所述第一控件和/或所述第二控件结束手势事件流的需求向所述第一控件和/或所述第二控件分发抬起事件以结束相应的手势事件流。An end module, adapted to distribute a lift event to the first control and/or the second control according to the need for the first control and/or the second control to end the gesture event flow to end the corresponding gesture event flow . 10.根据权利要求8所述的装置,其中,所述分发模块进一步适于:10. The apparatus of claim 8, wherein the distribution module is further adapted to: 将所述完整手势事件流所包括的按下事件以及至少一个移动事件的一部分分发给第一控件,以供所述第一控件进行响应;Distributing a part of the press event and at least one movement event included in the complete gesture event stream to the first control for the first control to respond to; 当所述第一控件无法响应后续的移动事件时,通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的另一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。When the first control cannot respond to subsequent movement events, another part of at least one movement event included in the complete gesture event flow and the lifting event are distributed to the second control by redefining the event, so that all The second control described above responds. 11.根据权利要求10所述的装置,其中,所述第一控件无法响应后续的移动事件具体为:所述第一控件从前端用户界面中消失;或者,所述后续的移动事件不属于所述第一控件的响应事件范围。11. The device according to claim 10, wherein the inability of the first control to respond to subsequent movement events is specifically: the first control disappears from the front-end user interface; or, the subsequent movement events do not belong to all Describe the response event scope of the first control. 12.根据权利要求8所述的装置,其中,所述分发模块进一步适于:12. The apparatus of claim 8, wherein the distribution module is further adapted to: 将所述完整手势事件流所包括的按下事件、至少一个移动事件以及抬起事件分发给第一控件,以供所述第一控件进行响应;Distributing the press event, at least one move event, and lift event included in the complete gesture event stream to the first control for the first control to respond to; 通过重定义事件的方式将所述完整手势事件流所包括的至少一个移动事件的一部分和抬起事件分发给第二控件,以供所述第二控件进行响应。Distributing a part of at least one move event and lift event included in the complete gesture event stream to the second control by redefining the event, so that the second control can respond. 13.根据权利要求8所述的装置,其中,所述分发模块进一步适于:13. The apparatus of claim 8, wherein the distribution module is further adapted to: 对所述完整手势事件流进行手势识别处理,将属于所述第一控件的响应事件范围的第一手势事件流分发给第一控件,将属于所述第二控件的响应事件范围的第二手势事件流分发给第二控件。Perform gesture recognition processing on the complete gesture event stream, distribute the first gesture event stream belonging to the response event range of the first control to the first control, and distribute the second gesture event stream belonging to the response event range of the second control The stream of potential events is distributed to the second control. 14.根据权利要求13所述的装置,其中,所述响应事件范围包括水平移动事件或垂直移动事件。14. The apparatus of claim 13, wherein the response event range includes a horizontal movement event or a vertical movement event.
CN201510158991.0A 2015-04-03 2015-04-03 The method and device of touch-screen gesture event stream distribution Active CN104778044B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510158991.0A CN104778044B (en) 2015-04-03 2015-04-03 The method and device of touch-screen gesture event stream distribution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510158991.0A CN104778044B (en) 2015-04-03 2015-04-03 The method and device of touch-screen gesture event stream distribution

Publications (2)

Publication Number Publication Date
CN104778044A CN104778044A (en) 2015-07-15
CN104778044B true CN104778044B (en) 2018-03-20

Family

ID=53619530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510158991.0A Active CN104778044B (en) 2015-04-03 2015-04-03 The method and device of touch-screen gesture event stream distribution

Country Status (1)

Country Link
CN (1) CN104778044B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227422A (en) * 2016-07-15 2016-12-14 乐视控股(北京)有限公司 Video player control method and relevant apparatus
CN114237413A (en) * 2020-09-09 2022-03-25 华为技术有限公司 Method and device for processing interaction event
CN113110791B (en) * 2021-05-11 2024-04-05 长沙康欧创新科技有限公司 To-do task creation method and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840299A (en) * 2010-03-18 2010-09-22 华为终端有限公司 Touch operation method, device and mobile terminal
CN102541331A (en) * 2010-12-30 2012-07-04 福建星网视易信息系统有限公司 Multi-area sliding click responding method and system in touch display
CN103309483A (en) * 2012-03-12 2013-09-18 联想(北京)有限公司 Electronic device and touch information input method
CN103440107A (en) * 2013-09-04 2013-12-11 北京奇虎科技有限公司 Method and device for processing touch operation of electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9645986B2 (en) * 2011-02-24 2017-05-09 Google Inc. Method, medium, and system for creating an electronic book with an umbrella policy

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840299A (en) * 2010-03-18 2010-09-22 华为终端有限公司 Touch operation method, device and mobile terminal
CN102541331A (en) * 2010-12-30 2012-07-04 福建星网视易信息系统有限公司 Multi-area sliding click responding method and system in touch display
CN103309483A (en) * 2012-03-12 2013-09-18 联想(北京)有限公司 Electronic device and touch information input method
CN103440107A (en) * 2013-09-04 2013-12-11 北京奇虎科技有限公司 Method and device for processing touch operation of electronic device

Also Published As

Publication number Publication date
CN104778044A (en) 2015-07-15

Similar Documents

Publication Publication Date Title
WO2020186935A1 (en) Virtual object displaying method and device, electronic apparatus, and computer-readable storage medium
TWI571792B (en) Touch control method and device for multi - touch terminal
US9741084B2 (en) Method and system for providing remote access to data for display on a mobile device
US20120260219A1 (en) Method of cursor control
US20170046123A1 (en) Device for providing sound user interface and method thereof
US10594924B2 (en) Electronic device and computer-readable recording medium for displaying images
JP2016502722A (en) Using clamping to correct scrolling
CN103220339B (en) Cursor display packing, device and system in remote operation
CN105511732A (en) Method for displaying page entry icons and device
US20130322709A1 (en) User identity detection on interactive surfaces
US20160139692A1 (en) Method and system for mouse control over multiple screens
WO2020156058A1 (en) Method and device for realizing dragging-based image warping on terminal
CN107066081B (en) An interactive control method and device for a virtual reality system and virtual reality equipment
CN104778044B (en) The method and device of touch-screen gesture event stream distribution
CN107122966A (en) A kind of red packet amount of money distribution method and mobile terminal
CN103440107A (en) Method and device for processing touch operation of electronic device
CN106775182A (en) A kind for the treatment of method and apparatus of suspension control
CN112596609A (en) Display processing method, display processing device and wearable equipment
CN111988525A (en) Image processing method and related device
CN105320480B (en) Screen broadcasting method and system and device using the same
CN107817935A (en) Application interface display method and device, terminal and computer readable storage medium
JP5878671B1 (en) System, method, and program for distributing digital content
CN106078743A (en) Intelligent robot, is applied to operating system and the application shop of intelligent robot
CN104462470A (en) Display method and device for dynamic image
CN106775249B (en) A method and electronic device for setting a communication shortcut

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right