protected class FloatingWindowView.DragLocationViewTouch extends FloatingWindowView.LocalTouchListenerExtend
Modifier and Type | Field and Description |
---|---|
private int[] |
locationOnScreen |
handleSimulationEvent, simulationDownEvent
downX, downY, isLocked, isMoving, isValidMove, lastX, lastY, nowX, nowY, scaledTouchSlop
Constructor and Description |
---|
DragLocationViewTouch(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
onTouchMove(android.view.View v,
android.view.MotionEvent event)
First of all by moving first threshold
TouchListenerExtend.scaledTouchSlop go into moving state, callback |
onTouchDown, onTouchUp
onTouch
public DragLocationViewTouch(android.content.Context context)
protected boolean onTouchMove(android.view.View v, android.view.MotionEvent event)
TouchListenerExtend
TouchListenerExtend.scaledTouchSlop
go into moving state, callback
You can add in your code second threshold, to reduce the unnecessary cost
... if (Math.abs(lastX - nowX) >= 1 || Math.abs(lastY - nowY) >= 1) { //Do something } ...
onTouchMove
in class TouchListenerExtend