See more
private MotionEvent swapXY(MotionEvent event) { float width = getWidth(); float height = getHeight(); float newX = (event.getY() / height) * width; float new…