Monday, August 1, 2011

[android-developers] Drawing Circles in a Row

Hello all,

I'm not familiar with Graphics in Android. I'm trying to draw circles
in a row in my app using the code below. However, these circles appear
only for a second and then disappear. How do I make them stay?

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();
}
}

Thanks,
Y

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate