retEvents.add(new TouchEvent(changedTouchPoint));
return retEvents;
}
private boolean checkClick(TouchPoint tpNew, List retEvents, boolean isDeath) {
TouchPoint tp;
long dt = tpNew.getTime() - _birth.getTime();
boolean isSingleClick = (isDeath && dt < MAXIMUM_CLICK_TIME);
if (dt < 500 && !isSingleClick)
return false;
_nMoves += 2;
// long (1/2 sec) pause and drag == double-click-drag ==> _translate
tp = new TouchPoint(_birth);
tp.setState(TouchState.DEATH);
retEvents.add(new TouchEvent(tp));
tp.setState(TouchState.CLICK);
retEvents.add(new TouchEvent(tp));
if (isSingleClick)
return true;
tp.setState(TouchState.BIRTH);
retEvents.add(new TouchEvent(tp));
if (!isDeath)
return true;
tp.setState(TouchState.DEATH);
retEvents.add(new TouchEvent(tp));
tp.setState(TouchState.CLICK);
retEvents.add(new TouchEvent(tp));
return true;
}