Exemplo n.º 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();
 }
Exemplo n.º 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();
 }
Exemplo n.º 3
0
 @Override
 public void press() {
   super.press();
   initialTouchedPosition = parent.indexOf(this);
   originalX = x;
 }