The problem is pretty simple: You are working with two relative coordinates. If you override the onTouchEvent()
from the view, you might get a value 10,10. If you now move the finger, you get a new value, lets say 9,9 so you change the position of the view which would result in the fact, that your finger is at 10,10 of the view coordinate system again.
What I would do: Override the onTouchEvent()
of the parent, so that you stay in the same coordinate system. Your implementation looks good, so it should work easily when you just move the code to the parent view/activity.