Reputation: 13
I want to build a simple app for building a tree and I am not sure how I should go about it. Similar to :
Where you can expand and minimize a branch by clicking the node. Now my question is: Is it better to have one surface view and draw the tree to a canvas and check if appropriate areas of the screen have been touched or should each node be its own view?
Upvotes: 0
Views: 58
Reputation: 23655
This question is quite broad and opinion based, but if you really what to display your tree something like in your image, it will probably be easier to go with a SurfaceView or other custom view and render the whole thing yourself.
Note - you do not need a SurfaceView, you can simply create your own custom view by deriving from View class and override the onDraw() method.
Upvotes: 1