Example #1
0
 @Override
 public void handleActionMove(int id, Pointer pos) {
   super.handleActionMove(id, pos);
   setPosition(x + pos.x - getPointer().downX, y);
   if (Math.abs(x - originalX) > SNAP_DIST) releaseLongPress();
   parent.layoutChildren();
 }
Example #2
0
 @Override
 public void release() {
   super.release();
   // notify listener of the touched label's old and new position in list
   int newPosition = parent.indexOf(this);
   if (newPosition != initialTouchedPosition) {
     labelListListener.labelMoved(initialTouchedPosition, newPosition);
   }
   parent.layoutChildren();
 }
Example #3
0
 @Override
 public void press() {
   super.press();
   initialTouchedPosition = parent.indexOf(this);
   originalX = x;
 }