title: Animation Along a path with Auto Rotation based on the path in android
body: <p>I have been trying to animate an image of a fly which moves in a path like the following image(which i have added for a clear idea) in <strong>android version 2.2</strong></p>
  <p>Well,this can be done in a very simple manner in the iphone as they have a property forsetting this auto rotation after the path is drawn using</p>
  <pre><code>animation.rotationMode = kCAAnimationRotateAuto;
  </code></pre>
  <p>which i believe would rotate the object based on the path`</p>
  <p><img src="https://i.stack.imgur.com/stDC3.jpg" alt="Fly path" /></p>
  <p>I am able to animate ma fly through this path using the <a href="http://nineoldandroids.com/" rel="noreferrer">nineoldandroid</a> library using the methods</p>
  <pre><code> path.moveTo(float x, float y);
   path.lineTo(float x, float y);
   path.curveTo(float c0X, float c0Y, float c1X, float c1Y, float x, float y);
  </code></pre>
  <p>Such that the curves are drawn through cubic B�zier curve.</p>
  <p>Now what i have been trying is to implement something that would allow my fly to rotate itself along the path and i just cant seem to reach anywhere.</p>
  <p>Please Help Me out with some ideas!!!  :( :(</p>