this is a draggable flow layout lib.
this is a draggable flow layout lib (android 可拖拽的流布局库) . support android-x Sample apk/示例app
mDragflowLayout.setOnItemClickListener(new ClickToDeleteItemListenerImpl(R.id.iv_close){
//点击删除成功时回调
@Override
protected void onDeleteSuccess(DragFlowLayout dfl, View child, Object data) {
//your code
}
}); //预存指定个数的Item. 这些Item会反复使用
mDragflowLayout.prepareItemsByCount(10);…//root gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
// if you use androidx . please use '1.8.8-x'
implementation 'com.github.LightSun:android-drag-FlowLayout:1.8.8'
…//数据实体实现IDraggable (是否可拖拽) 接口,并且 isDraggable 为false即可
private static class TestBean implements IDraggable{
String text;
boolean draggable = true;
public TestBean(String text) {
this.text = text;
}
@Override
public boolean isDraggable() {
return draggable;
}
}repositories {
jcenter()
}
// if you use androidx . please use '1.8.8-x'
compile 'com.heaven7.android.dragflowlayout:dragflowlayout:1.8.8'… mDragflowLayout.setOnItemClickListener(new ClickToDeleteItemListenerImpl(R.id.iv_close){
@Override
protected void onDeleteSuccess(DragFlowLayout dfl, View child, Object data) {
//your code
}
});i like technology. especially the open-source technology.And previous i didn't contribute to it caused by i am a little lazy, but now i really want to do some for the open-source. So i hope to share and communicate with the all of you.
Copyright 2016
heaven7([email protected])
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.No open issues yet, or sync has not completed.