0

For example I have Image with ABC, so that I have use android animation to move one pointer or dot, it should starts with A,continue with B, and ends with C.i.e the Dot should traverse along the ABC path.

Please any one can give hint or code snippet for this.

F J Patil
  • 59
  • 4
  • and http://stackoverflow.com/questions/21066509/smooth-floating-animation-using-translation-in-xml – Skynet Dec 31 '15 at 04:38
  • and http://stackoverflow.com/questions/19016674/android-translate-animation-permanently-move-view-to-new-position-using-animat – Skynet Dec 31 '15 at 04:38
  • and http://stackoverflow.com/questions/16727647/how-a-translate-animation-works-android – Skynet Dec 31 '15 at 04:39
  • and http://stackoverflow.com/questions/9927931/android-translate-animation – Skynet Dec 31 '15 at 04:39
  • and http://stackoverflow.com/questions/4213393/translate-animation – Skynet Dec 31 '15 at 04:40
  • and http://stackoverflow.com/questions/8978036/android-translateanimation-animation – Skynet Dec 31 '15 at 04:40
  • and many many more, just use google before you post a question which has already been answered tens of thousands of times. – Skynet Dec 31 '15 at 04:42

1 Answers1

0

For drawing path between Points you can use following class of Android:

https://developer.android.com/reference/android/graphics/Path.html

By using canvas.drawLine(x1, y1, x2, y2, paint); you can draw path between two points.

Here is the link of tutorial which can help you to use canvas in your code:

http://www.helloandroid.com/tutorials/how-use-canvas-your-android-apps-part-2

You can use the ObjectAnimator class to callback to one of your class's methods every time you'd like to draw a bit more of the path for animation. And for animating the traversion you can check below answer:

Animating the drawing of a canvas path on Android

Community
  • 1
  • 1
KishuDroid
  • 5,411
  • 4
  • 30
  • 47
  • Thank you Kishu for your response, my qtn is diffrent...I have one Dot k, it should traverse through the specified path..how to achieve this stuff.. – F J Patil Dec 31 '15 at 04:53