Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphical binary tree in Android

I'm relatively new to Android and stuck with this problem. I need to create a UI with a graphical binary tree. Tree nodes contain some text and a small image. I went through the Android developer guide, but couldn't find a way to do this.

Is it possible to draw a binary tree in Android? If it is, what controls should I use? If possible please tell me where I can find more information as well.

like image 469
Gihan Rajakaruna Avatar asked Feb 21 '12 12:02

Gihan Rajakaruna


1 Answers

I think implementing the onDraw is your best bet here since you need a lot of customization and there is no default component for it. Please refer to the documentation on how to do it.

Here is a library which implements binary tree so you can check out how they are drawing it.

Hope it helps!

like image 77
Natan Avatar answered Nov 12 '22 08:11

Natan