All Projects → jakebonk → DraggableTreeView

jakebonk / DraggableTreeView

Licence: MIT License
TreeView with drag and drop (n-th level)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to DraggableTreeView

Custom-Grid-View
Custom Drag and Drop Grid for Home Assistant
Stars: ✭ 103 (+8.42%)
Mutual labels:  drag-and-drop, custom-view
vue-simple-upload-component
A simple upload component for Vue.js 2.x
Stars: ✭ 14 (-85.26%)
Mutual labels:  drag-and-drop
react-super-treeview
👏 Finally, a React Treeview component which is customizable on every level
Stars: ✭ 98 (+3.16%)
Mutual labels:  tree-view
SuperBadge
🚀 📛 SuperBadge Android Library 🔥
Stars: ✭ 34 (-64.21%)
Mutual labels:  custom-view
DragBoardView
⭐ Android 看板,支持项拖拽、列拖拽。Draggable kanban/board view for Android.
Stars: ✭ 85 (-10.53%)
Mutual labels:  drag-and-drop
viiny-dragger
viiny-dragger is a drag and drop plugin for javascript.
Stars: ✭ 27 (-71.58%)
Mutual labels:  drag-and-drop
android-tableview-kotlin
Android's missing TableView component.
Stars: ✭ 40 (-57.89%)
Mutual labels:  custom-view
image-uploader
Simple Drag & Drop image uploader plugin to static forms, without using AJAX
Stars: ✭ 70 (-26.32%)
Mutual labels:  drag-and-drop
FancyAdapters
A collection of customizable RecyclerView Adapters for Android, that provide various functionality like item selection, contextual action mode controls, drag&drop and swiping, among other.
Stars: ✭ 49 (-48.42%)
Mutual labels:  drag-and-drop
signal-strength-view
📶 Material design signal strength view for Android
Stars: ✭ 30 (-68.42%)
Mutual labels:  custom-view
WaveView
Simple Android library to draw sinusoidal waves.
Stars: ✭ 43 (-54.74%)
Mutual labels:  custom-view
MutativeFab
This is animating floating action button with text
Stars: ✭ 54 (-43.16%)
Mutual labels:  custom-view
yii2-dropzone
This extension provides the Dropzone integration for the Yii2 framework.
Stars: ✭ 11 (-88.42%)
Mutual labels:  drag-and-drop
nested-sort
Nested Sort is a JavaScript library which helps you to sort a nested list of items via drag and drop.
Stars: ✭ 31 (-67.37%)
Mutual labels:  drag-and-drop
auto-fill-edit-text
This custom EditText can suggest and fill text defined before.
Stars: ✭ 26 (-72.63%)
Mutual labels:  custom-view
vite-vue3-lowcode
vue3.x + vite2.x + vant + element-plus H5移动端低代码平台 lowcode 可视化拖拽 可视化编辑器 visual editor 类似易企秀的H5制作、建站工具、可视化搭建工具
Stars: ✭ 1,309 (+1277.89%)
Mutual labels:  drag-and-drop
CeilingLayout
CeilingLayout用来控制子View的吸顶联滑,理论上支持实现了NestedScrollingChild的联滑控件,如NestedScrollView、RecyclerView、SmartRefreshLayout等;只需要在xml里配置需要吸顶子View的位置索引就能自动实现吸顶联滑效果。
Stars: ✭ 26 (-72.63%)
Mutual labels:  nestedscrollview
jquery-xhr-upload-queue
📂 A jQuery queued file uploading plugin.
Stars: ✭ 17 (-82.11%)
Mutual labels:  drag-and-drop
CustomViewStudy
This repository is used to learn CustomView(Text、Image、Progress、ViewGroup、ViewGragHelper).
Stars: ✭ 76 (-20%)
Mutual labels:  custom-view
splitImage
把图片分割成n*m份,支持拖拽、input上传
Stars: ✭ 22 (-76.84%)
Mutual labels:  drag-and-drop

DraggableTreeView

DraggableTreeView is a custom view that mimics a Tree View directory and also implements drag and drop. The tree view can go to the n-th level by default there is no limit.

Example

Basic Example

Download library with Jitpack.io

Add this to your build.gradle file for your app.

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Add this to your dependencies in build.gradle for your project.

	dependencies {
	        compile 'com.github.jakebonk:DraggableTreeView:1.0.1'
	}

Usage

DraggableTreeView is organized by a custom adapter called TreeViewAdapter, I included a Simple implementation of the adapter class called SimpleTreeViewAdapter.

      DraggableTreeView draggableTreeView = (DraggableTreeView)findViewById(R.id.dtv);
      TreeNode root = new TreeNode(this);
      TreeNode item = new TreeNode("Item 1");
      TreeNode item2 = new TreeNode("Item 2");

      TreeNode subitem = new TreeNode("Sub Item 2");
      subitem.addChild(new TreeNode("Sub Sub Item 1"));
      item.addChild(subitem);
      item.addChild(new TreeNode("Sub Item 1"));
      root.addChild(new TreeNode("Item 3"));
      root.addChild(new TreeNode("Item 4"));
      root.addChild(new TreeNode("Item 5"));
      root.addChild(new TreeNode("Item 6"));
      root.addChild(new TreeNode("Item 7"));
      root.addChild(new TreeNode("Item 8"));
      root.addChild(new TreeNode("Item 9"));
      root.addChild(new TreeNode("Item 10"));
      root.addChild(new TreeNode("Item 11"));
      root.addChild(new TreeNode("Item 12"));
      root.addChild(item2);
      root.addChild(item);
      SimpleTreeViewAdapter adapter = new SimpleTreeViewAdapter(this,root);
      draggableTreeView.setAdapter(adapter);

You can also change both the succesful placeholder as well as the bad placeholder by passing a view through the function

      adapter.setBadPlaceholder(view);

or

      adapter.setPlaceholder(view);      

By assigning the variable maxLevel a value you can define how many levels the tree view can drag to.

      draggableTreeView.maxLevels = 4;     

Callback functions

There are three call back functions that can be used, onStartDrag, onChangedPosition, and onEndDrag to use it simply call setOnDragItemListener

Example:

	draggableTreeView.setOnDragItemListener(new DraggableTreeView.DragItemCallback() {
            @Override
            public void onStartDrag(View item, TreeNode node) {
                Log.e("start",(String)node.getData());
            }

            @Override
            public void onChangedPosition(View item, TreeNode child, TreeNode parent, int position) {
                Log.e("changed",(String)parent.getData()+" > "+(String)child.getData()+":"+String.valueOf(position));
            }

            @Override
            public void onEndDrag(View item, TreeNode child, TreeNode parent, int position) {
                Log.e("end",(String)parent.getData()+" > "+(String)child.getData()+":"+String.valueOf(position));
            }
        });
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].