Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - how to create a family-tree diagram (visual)

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.

like image 324
user3358904 Avatar asked Feb 27 '14 05:02

user3358904


People also ask

Does Google have a family tree maker?

Does Google have a family tree maker? IMPORTANT NOTE: Both the Android and iOS versions of Family Tree Maker Connect are now available!

Is there an app to build a family tree?

Family tree creation application provided by Digital Gene. This is a new app of the smartphone generation to create a family tree. It features interactive display using digital devices. This is an app that allows you to make family trees without having to create an account.


1 Answers

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

like image 70
Henry Avatar answered Sep 28 '22 05:09

Henry