All Projects → shineM → Treeview

shineM / Treeview

Licence: apache-2.0
An android tree structure view with high performance and rich features

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Treeview

Graphview
Android GraphView is used to display data in graph structures.
Stars: ✭ 918 (+113.99%)
Mutual labels:  tree-structure, treeview
Unity-IMGUI-TreeView
Simple Tree View implementation for IMGUI (Editor GUI) in Unity. Includes a special type for working with asset paths, but base data structure and view can be easily extended to support anything.
Stars: ✭ 73 (-82.98%)
Mutual labels:  tree-structure, treeview
Pbtreeview
An UITreeView implementation from UITableView that Apple missed in its UIKit framework. And it is in pure Swift.
Stars: ✭ 128 (-70.16%)
Mutual labels:  tree-structure, treeview
Graphview
Flutter GraphView is used to display data in graph structures. It can display Tree layout, Directed and Layered graph. Useful for Family Tree, Hierarchy View.
Stars: ✭ 152 (-64.57%)
Mutual labels:  tree-structure, treeview
Perfect-Server-Side-Swift iOS-App
A family tree API server implementation with iOS client. Server has been implemented with Perfect: Server-Side Swift And iOS client is in pure Swift.
Stars: ✭ 15 (-96.5%)
Mutual labels:  tree-structure, treeview
Ete
Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
Stars: ✭ 506 (+17.95%)
Mutual labels:  tree-structure, treeview
vue-virtualised
Blazing fast scrolling and updating for any amount of list and hierarchical data.
Stars: ✭ 18 (-95.8%)
Mutual labels:  tree-structure, treeview
Bosket
Collection of tree view components for front-end frameworks. 🌳
Stars: ✭ 457 (+6.53%)
Mutual labels:  tree-structure, treeview
react-treefold
A renderless tree component for your hierarchical React views
Stars: ✭ 37 (-91.38%)
Mutual labels:  tree-structure, treeview
react-folder-tree
A versatile react treeview library that supports custom icons and event handlers
Stars: ✭ 56 (-86.95%)
Mutual labels:  tree-structure, treeview
react-tree
Hierarchical tree component for React in Typescript
Stars: ✭ 174 (-59.44%)
Mutual labels:  tree-structure, treeview
Vue Draggable Nested Tree
Please use the he-tree-vue, vue-draggable-nested-tree will no longer be maintained.
Stars: ✭ 302 (-29.6%)
Mutual labels:  tree-structure, treeview
GraphView
Android GraphView is used to display data in graph structures.
Stars: ✭ 952 (+121.91%)
Mutual labels:  tree-structure, treeview
Bstreeview
Bootstrap Treeview, A very simple plugin to build a basic and elegant Treeview with bootstrap 4. See the demo:
Stars: ✭ 308 (-28.21%)
Mutual labels:  tree-structure, treeview
Aestheticdialogs
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.
Stars: ✭ 352 (-17.95%)
Mutual labels:  android-ui
Cornercutlinearlayout
Linear Layout that allow corner (parent and children) cuts, complex shadow and divider.
Stars: ✭ 391 (-8.86%)
Mutual labels:  android-ui
Ng2 Tree
Angular tree component
Stars: ✭ 350 (-18.41%)
Mutual labels:  treeview
Liquor Tree
Tree component based on Vue.js
Stars: ✭ 348 (-18.88%)
Mutual labels:  treeview
Material Progressview
🔥A beautiful, gradual and simple used progress view for android.
Stars: ✭ 406 (-5.36%)
Mutual labels:  android-ui
Loginui Android
Login User Interface in android with innovative, beautiful and creative background 😊😊😉
Stars: ✭ 374 (-12.82%)
Mutual labels:  android-ui

TreeView

An android tree view with high performance and rich functions

中文介绍

Captures

There are some gifs from Demo:

  • Select node:
  • Operate all:

Features

  • expandAll/collapseAll
  • expandNode/collapseNode
  • expandLevel/collapseLevel
  • toggleNode
  • deleteNode/addNode
  • selectNode/deselectNode
  • selectAll/deselectAll
  • getSelectedNodes
  • refreshTreeView

Usage

1.Reference the library from your module's build.gradle:

implementation 'me.texy.treeview:treeview_lib:1.0.6'

2.Implement your all level's BaseNodeViewBinder

Sample:

public class FirstLevelNodeViewBinder extends BaseNodeViewBinder {
  TextView textView;
  public FirstLevelNodeViewBinder(View itemView) { 
    super(itemView);  
    textView = (TextView) itemView.findViewById(R.id.node_name_view)
  }
  
  @Override
  public int getLayoutId() {
    return R.layout.item_first_level;
  }
  
  @Override
  public void bindView(TreeNode treeNode) {
    textView.setText(treeNode.getValue().toString());
  }
}

SecondLevelNodeViewBinder
ThirdLevelNodeViewBinder
.
.
.

If you want add the selectable feature,replace BaseNodeViewBinder with CheckableNodeViewBinder.

3.Implement the BaseNodeViewFactory

Sample:

public class MyNodeViewFactory extends BaseNodeViewFactory {
  @Override
  public BaseNodeViewBinder getNodeViewBinder(View view, int level) {
    switch (level) {
      case 0:
        return new FirstLevelNodeViewBinder(view);
      case 1:
        return new SecondLevelNodeViewBinder(view);
      case 2:
        return new ThirdLevelNodeViewBinder(view);
      default:
        return null;
    }
  }
}

If you do not want to create a class file,just implement a anonymous inner class in TreeView's constructor

4.Add TreeView to wherever you want

Sample:

TreeNode root = TreeNode.root();
//build the tree as you want
for (int i = 0; i < 5; i++) {
  TreeNode treeNode = new TreeNode(new String("Child " + "No." + i));
  treeNode.setLevel(0);
  root.addChild(treeNode);
}
View treeView = new TreeView(root, context, new MyNodeViewFactory()).getView();
//add to view group where you want 

License

   Copyright 2017 shineM.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].