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