DividedDraggableView
Introduction: 一个带有分割区域的可拖动 view ,可屏幕自动上下滚动进行 Item 移动交换。
Tags:
Draggable grid view with divided line.
Usage
Add the dependency to your build.gradle.
compile 'com.github.andyken:divideddraggableview:1.2'
Usage
You should new the DividedDraggableView and setItemCount,then add your view by calling addChildView.
DividedDraggableView dividedDraggableView = new DividedDraggableView(SampleActivity.this);
dividedDraggableView.setItemCount(mockViews.size());
for (ImageView imageView : mockViews) {
dividedDraggableView.addChildView(imageView);
}
rootView.addView(dividedDraggableView);
- you can set the attributes at xml or by using DividedDraggableView.Builder.
- you can set the attributes such as rowHeight,itemWidth,itemHeight,rowPadding.
- you can set the gap between group,group line count,group item count.text in group.
- you can set some color attributes like background color,gap color,group color,the color of text in gap.