Call super.onDraw() first thing in your method, just once.
And don't call invalidate(), as that would cause another redraw, and
another, and another..... at some point the value of "k" will increase
to place the circles beyond the right edge of the screen (you will want
to reset "k" somewhere, possibly right here inside onDraw).
-- Kostya
01.08.2011 22:20, Y пишет:
protected void onDraw(Canvas canvas) {
for (int i = 0; i< numOfCircles; i++) {
super.onDraw(canvas);
k = k + 10;
canvas.drawCircle(x + k, y, r, gPaint);
invalidate();
}
}
--
Kostya Vasilyev
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en