Android – Rotate a view dynamically


I have another question related to this disk:

I have created a custom view, and set everything up to rotate it, but I don't know how to set the rotation of the view when the disk is spinning. I think I could've done this with an Animation object and a TimeInterpolater, but I couldn't figure out how to use either of those, so I created my own little algorithm for doing it. The code I have can be found at:

Thanks for ANY help, this and my other question for this disk have been giving me serious problems.

Best Solution

The easiest way will be to rotate the canvas than to draw the image and restore the canvas. For more info take a look here Rotating a view in Android