protected class FloatingWindowView.DragSizeViewTouch extends FloatingWindowView.LocalTouchListenerExtend
handleSimulationEvent, simulationDownEvent
downX, downY, isLocked, isMoving, isValidMove, lastX, lastY, nowX, nowY, scaledTouchSlop
Constructor and Description |
---|
DragSizeViewTouch(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 |
protected void |
setViewSize(int width,
int height,
boolean widthIsAscending,
boolean heightIsAscending) |
onTouchDown, onTouchUp
onTouch
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
protected void setViewSize(int width, int height, boolean widthIsAscending, boolean heightIsAscending)