I found a way to not need the raw coordinates.
getX() and getY() should return you coordinates relative to the View that dispatched them.
It's correct. But in general we want coordinates relative to container View, not dispatched view.
float xRelativeToParent = view.getX() + motionEvent.getX();
float yRelativeToParent = view.getY() + motionEvent.getY();
Then, to move the center of the touched view to a moving pointer position, do:
view.setX(xRelativeToParent - view.getWidth()/2f);
view.setY(yRelativeToParent - view.getHeight()/2f);