0

i get this photo from my UI designer he give me vector in full size with all circle around it, like this:

enter image description here

i import the full vector in android studio and set name for all paths in there, and select them in run time, so i can make them visible or invisible and change color i think if i have a vector with max circle and select vector paths , maybe work

but my problem is have to make it in run time , because the number of circle defined by user , between 25 to 30

dose anybody have any idea ,how to make this?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

0

A circle is 360 degrees, so if you want e.g. 30 points on that circle, you need a point every 360 / 30 = 12 degrees.

So now you dust off the cobwebs of your math skills and use the sine and cosine functions (see class Math) to calculate where those points are.

Then draw small circles centered on those points.

Andreas
  • 154,647
  • 11
  • 152
  • 247
  • i dont know how draw circles on perimeter of the circle and how set degrees – mohamad rezaei Jun 02 '19 at 06:01
  • Wait, programming requires math skills? _backs away slowly_ –  Jun 02 '19 at 06:46
  • @mohamadrezaei How to "set" degrees: `for (double degree = 0; degree < 360; degree += 360d / NumberOfCircles) { ... }` --- How to draw circle: See "[How to draw circle by canvas in Android?](https://stackoverflow.com/q/17954596/5221149)" --- How to calculate position of circles: See my answer ("math skills"). Do a [web search](https://www.google.com/search?q=sine+and+cosine). – Andreas Jun 02 '19 at 18:47