Possible Duplicate:
Problem to achieve curved animation
Can I create my own Animation class which will move my image in a curved path? If anybody have any idea or link to any post then please help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do a Frame by Frame animation. You can position the object step by step to create a curve. That will be of limited reuse, but you can do it.
Or you can write your own animation to create a subclass of TweenAnimation that can animate along a curve. If you’re good with math and can understand bezier curves then that might be a straight forward option. Once you have that class you could easily animate across any curved path, but it’s more work.
http://en.wikipedia.org/wiki/B%C3%A9zier_curve
Here’s some VB code:
http://www.codetoad.com/vb_bezier.asp
Here’s some Java code:
http://www.math.ubc.ca/~cass/gfx/bezier.html
And also take a look at these questions
animate-image-along-path-on-android