this.clearAllGestures(tapAndHoldOnly);
tapAndHoldOnly.registerInputProcessor(new TapAndHoldProcessor(app, 2000));
tapAndHoldOnly.addGestureListener(TapAndHoldProcessor.class, new TapAndHoldVisualizer(app, getCanvas()));
tapAndHoldOnly.addGestureListener(TapAndHoldProcessor.class, new IGestureEventListener() {
public boolean processGestureEvent(MTGestureEvent ge) {
TapAndHoldEvent th = (TapAndHoldEvent)ge;
switch (th.getId()) {
case TapAndHoldEvent.GESTURE_DETECTED:
break;
case TapAndHoldEvent.GESTURE_UPDATED:
break;
case TapAndHoldEvent.GESTURE_ENDED:
if (th.isHoldComplete()){
if (tapAndHoldOnly.getText().endsWith("--"))
tapAndHoldOnly.setText("Tap&Hold me! -|-");
else
tapAndHoldOnly.setText("Tap&Hold me! ---");
}