I have a Line class composed of two Points of two ints each that I draw with a wrapper over Canvas.drawLine().
Easy so far.
I want to have that Line drawn slowly from one Point to the other. My best guess is to make a function that will dice up my Line into an list of Lines, starting from the first Point with each subsequent Line getting longer and longer till it reaches from one Point to the other. Then, I will have a Canvas.drawLine wrapper that will take that array of Lines, and iterate over them, drawing each one with a pause of some sort in between them, giving the appearance of the line “growing”.
Is there something in the android libraries that already does this and/or would this be better solved some other way?
Edit: This is android 2.1
Android has libraries for creating animations. Look into tweened animations and the AnimationDrawable class.