BaseGestureRecognizer

public abstract class BaseGestureRecognizer
已知的直接子类

所有手势识别器(即 DragGestureRecognizer)的基类。

手势识别器会处理轻触输入,以确定手势是否应启动,并在手势启动时触发事件。

如需确定手势完成/更新的时间,请监听手势对象上的事件。

嵌套类

接口 BaseGestureRecognizer.OnGestureStartedListener<T 扩展了 BaseGesture<T>&gt; BaseGesture 启动时要调用的回调的接口定义。

字段

受保护的最终 GesturePointersUtility gesturePointersUtility
受保护的最终 ArrayList<T 扩展了 BaseGesture<T>> 手势

公共构造函数

公共方法

无效
无效
onTouch(HitTestResulthitTestResult, MotionEvent motionEvent)
无效

受保护的方法

抽象 无效
tryCreateGesturesHitTestResulthitTestResult、MotionEvent motionEvent)

继承的方法

字段

受保护的最终 GesturePointersUtilitygesturePointersUtility

受保护的最终 ArrayList <T 扩展了 BaseGesture&t;T>> 手势

公共构造函数

public BaseGestureRecognizer (GesturePointersUtility gesturePointersUtility)

参数
gesturePointersUtility

公共方法

public void addOnGestureStartedListener (OnGestureStartedListener<T>监听器)

参数
监听器

public void onTouch (HitTestResulthitTestResult, MotionEvent motionEvent)

参数
命中结果
motionEvent [动作事件]

public void removeOnGestureStartedListener (OnGestureStartedListener<T>监听器)

参数
监听器

受保护的方法

Protected abstract void tryCreateGestures (HitTestResulthitTestResult, MotionEvent motionEvent)

参数
命中结果
motionEvent [动作事件]