I would like to animate one Path on an android canvas.
public class MyView extends View { private Path paths[]; protected void onDraw( Canvas canvas ) { Paint paint = new Paint(); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth( 8 ); paint.setColor(Color.BLUE); Path path = new Path(); path.moveTo(75, 11); path.quadTo(62, 87, 10, 144); canvas.drawPath( path, paint ); paths[0] = path; path.reset(); path.moveTo(50, 100); path.lineTo(150, 200); canvas.drawPath( path, paint ); paths[1] = path; } }
Now I have the ways [], I would like to animate each separately. I would like him to change alpha, as if it were growing. At first there is only a small point, then it grows into a line, repeats.
Can this be done?
How?
source share