Mats again came and defeated me. I need your help to regroup and attack again.
What I have:

I have a surface view and a circle as a bitmap. I need to rotate the bitmap when the user moves his finger along the edge of the circle. The faster the user slides, the more I need to rotate the image. It seems simple, but not very easy to implement.
What I need
I need to calculate the angle of rotation of an image for an onDraw event. From what I have been thinking so far, I need two things: - the angle between the new touching point and the old one. I performed a simple function that will take care of this:
private int getAngleBetweenTwoTouchedPoints(double oldX, double oldY, double newX, double newY) { return (int) Math.abs(Math.atan2(newY - oldY, newX - oldX)); }
the angle returned by this varies from 0 to 1, and I believe that this is correct. Increasing the angle of the image rotation matrix by this value, I get a slow rotation, mainly by 1 unit. So, there is a chance to work, but so far not in order. - So, secondly, I may need the speed at which the user slides a finger across the screen. So basically something like this:
rotationAngle + = angleBetweenTouches + speed
Speed ββor speed, as I called it, is a problem in my case, given that I am not moving only in X or Y, but in a circle. I do not know how to calculate it. I saw VelocityTracker on Android help, but I don't know how this could help.
So, to repeat: I need to be able to rotate the image when the user moves his finger around the border of the image. Even easier, when the user stops sliding, the pixel of the image under the finger on the slide should be the same when the slide stops.
Any help is appreciated. Thanks you