Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How would I go about making a circle appear on the app's screen and make multiply ones of it. In my app the circle is moving down so I also want to know how to make the circle appear at a random point along the apps width.

Thanks in advance,

Collin Napier
Citrus Works
Posted

Check out the 2D Drawing section on this: android-tutorial[^]
 
Share this answer
 
You can create a circle instance and draw it multiple times on canvas. For example, you have a custom view, so you can override the method
protected void onDraw (Canvas canvas)
. Canvas can draw a circle via
public void drawCircle (float cx, float cy, float radius, Paint paint)
.
You can refer to
http://developer.android.com/reference/android/view/View.html#onDraw(android.graphics.Canvas)
http://developer.android.com/reference/android/graphics/Canvas.html#drawCircle(float, float, float, android.graphics.Paint)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900