Suggestions for building a treeview control in Android

后端 未结 4 881
既然无缘
既然无缘 2020-12-13 11:13

Suggestions for building a treeview control in Android

4条回答
  •  [愿得一人]
    2020-12-13 12:01

    You can use this library: https://github.com/bmelnychuk/AndroidTreeView to get your required tree-view. It's a N-level tree where you can control every single node in tree.

    Usage

    1) install: compile 'com.github.bmelnychuk:atv:1.2.+'

    2) build tree-view:

     TreeNode root = TreeNode.root(); 
     TreeNode parent = new TreeNode("node-name");
     TreeNode child0 = new TreeNode("child-node-name-1");
     TreeNode child1 = new TreeNode("child_node-name-2");
    
     parent.addChildren(child0, child1);
     root.addChild(parent);
    

提交回复
热议问题