Comments (1)
目前的演示代码中,都是相邻两个元素进行交换,所以不会出现你说的问题:
=== DragGridActivity ===
if (fromPosition < toPosition) {
for (int i = fromPosition; i < toPosition; i++)
Collections.swap(mDataList, i, i + 1);
} else {
for (int i = fromPosition; i > toPosition; i--)
Collections.swap(mDataList, i, i - 1);
}
=== DragTouchListActivity ===
拖动时,相邻两个元素交换都会调用onItemMove,会被多次调用。
onItemMove() {
Collections.swap(mDataList, fromPosition, toPosition);
}
from swiperecyclerview.
Related Issues (20)
- 设置子条目高度无效
- 侧滑菜单和NestedScrollView滑动冲突 HOT 3
- AAPT: error: duplicate value for resource 'attr/contentViewId' with config ''.
- 多个viewtype没法拖动了
- 请问,停止维护了吗?
- 侧滑内容控制 HOT 2
- 迁移一下 mavenCentral()
- 散了散了 没维护了 listview拖动点进去就蹦
- 菜单子项 设置 点击无效 HOT 1
- 使用expandable模式一定会报错吧
- 还维护吗?遇到bug HOT 1
- fork了一个版本,我先维护着 HOT 2
- 侧滑打开关闭可否加一个监听回调呢、 HOT 1
- 不建议使用 HOT 1
- 不支持 settag() HOT 1
- 和BaseQuickAdapter 点击事件好用 但是侧滑按钮出现问题了 HOT 1
- GridSectionAverageGapItemDecoration 设置间距无效
- 有没有可以设置item之间的间距?这样左中右都保持一致 HOT 1
- uniapp打包自定义基座和发版时提示问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiperecyclerview.