TreeView
Android TreeView is used to display data in tree structures.
Overview
The library is designed to support different algorithms. Currently, only the algorithm from Walker (with the runtime improvements from Buchheim) has been implemented. Feel free to contribute. The algorithm should only implement the Algorithm
Interface.
Download
Usage
You can make the node Layout how you like. Just define a layout file, e.g. node.xml
...
... and use it with the adapter
ViewHolder class:
Customization
To use the custom attributes you have to add the namespace first: xmlns:app="http://schemas.android.com/apk/res-auto"
Attribute | Format | Example | Explanation |
---|---|---|---|
levelSeparation | Dimension | 50dp | How much space should be used between levels |
lineThickness | Dimension | 10dp | Set how thick the connection lines should be |
lineColor | Color | "@android:color/holo_red_dark" | Set the color of the connection lines |
useMaxSize | Boolean | true | Use the same size for each node |