Android的列表视图拖放排序 [英] Android List View Drag and Drop sort

查看:198
本文介绍了Android的列表视图拖放排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的纪录,我希望用户能够重新排序使用拖放方法列表视图列表。我已经看到了这一点实现其他应用程序,但我还没有找到一个教程吧。它必须是东西,其他人需要为好。任何人都可以点我的一些code这样做?

I have a list of records in a listview that I want the user to be able to re-sort using a drag and drop method. I have seen this implemented in other apps, but I have not found a tutorial for it. It must be something that others need as well. Can anyone point me to some code for doing this?

推荐答案

我一直在这方面的工作,现在有一段时间了。很难得到正确的,我不要求我这样做,但我很高兴与它至今。我的code和几个演示可以在

I have been working on this for some time now. Tough to get right, and I don't claim I do, but I'm happy with it so far. My code and several demos can be found at

  • <一个href="https://github.com/bauerca/drag-sort-listview">https://github.com/bauerca/drag-sort-listview

它的使用非常相似的TouchInterceptor(在其上code为基础的),虽然的显著的实施进行了更改。

Its use is very similar to the TouchInterceptor (on which the code is based), although significant implementation changes have been made.

DragSortListView拥有通畅predictable拖动和洗牌的项目滚动。项目洗牌是多少与拖动/浮动项的位置更加一致。异构高度列表项的支持。拖动滚动是可定制的(我演示了快速拖过一个长长的名单滚动---不是一个应用程序想到)。页眉/页脚得到尊重。等等。??一起来看看。

DragSortListView has smooth and predictable scrolling while dragging and shuffling items. Item shuffles are much more consistent with the position of the dragging/floating item. Heterogeneous-height list items are supported. Drag-scrolling is customizable (I demonstrate rapid drag scrolling through a long list---not that an application comes to mind). Headers/Footers are respected. etc.?? Take a look.

这篇关于Android的列表视图拖放排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆