8

There are a ton of family tree apps out there, but for some reason I cannot find one example of how to create one for an Android application. Do I use canvas, is there a chart library?

My basic requirement is to draw a tree (node) chart / diagram with with three levels, where each of the nodes are filled with some pre-determined content. The user will then be able to scroll across the screen to view the specific nodes and their content.

Any pointers on where to look or start will be greatly appreciated.

soumya
  • 3,801
  • 9
  • 35
  • 69
user3358904
  • 89
  • 1
  • 2

1 Answers1

1

Yes you use the Canvas for this. But instead of drawing all this in a single canvas, you could approach this a bit better. You could have a custom ViewGroup for the Tree. Then you could write a custom View for your Nodes. You could then add these nodes as child to the tree. This way you will have complete control on the position of the nodes in the tree.

I recently encountered a similar Family Tree question. For reference: Canvas without using bitmap takes more memory in Android

Community
  • 1
  • 1
Henry
  • 17,490
  • 7
  • 63
  • 98