androidandroid-canvasandroid-drawablegraph-theoryandroid-paint

How to create graph with edges and vertices in Android


I want to create graph (with edges and vertices), to implement a problem called 3-color. I just need a little guidance on how to start, should i use a multiple views and draw each view as a circle, and then how can i connect lines (edges) between the views? should i work with pixels all the time or there is another way, more simple one because calculate pixels when dealing with big graphs (more than 10 vertices) is complicated.

thanks.


Solution

  • I found this library which is a good source: https://github.com/LordVulkan/Graphs