This is a small utility that provides quite configurable tree view list.
It is based on standard android list view. It separates out different
aspects of the tree: there is a separate list view, tree adapter, tree
state manager and tree state builder.
- Tree view provides the frame to display the view.
- Adapter allows to create visual representation of each tree
node.
- State manager provides storage for tree state (connections
between parents and children, collapsed/expanded state). It provides
all the low-level tree manipulation methods.
- Tree builder allows to build tree easily providing higher
level methods. The tree can be build either from prepared sequentially
prepared list of nodes (node id, level) or using (parent/child
relationships).
For now only in-memory state manager is provided, but Tree State
Manger interface is done in the way that database tree manager even for
large trees is potentially supported.