通过拖动重新排序的ListView元素 [英] Reorder elements of ListView by dragging

查看:171
本文介绍了通过拖动重新排序的ListView元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到它在Android上做了很多最近:我可以在ListView拖动项目到列表中的其他位置。但我似乎无法找到任何例如code。有没有人有一些例如code他们不介意分享。我一直在阅读 http://developer.android.com/guide/topics /ui/drag-drop.html ,但我没有做太大进展。

I see it done a lot lately on android: I can drag an item in a listView to another position in the list. But I can't seem to find any example code. Does anyone have some example code they don't mind sharing. I have been reading http://developer.android.com/guide/topics/ui/drag-drop.html, but I am not making much progress.

并发症

所以,我觉得似乎是实现拖拽排序(http://ericharlow.blogspot.com/2010/10/experience-android-drag-and-drop-list.html).但是我的孩子意见是可以点击的自己,这似乎从看到我的拖动事件阻断母体的ListView。任何想法如何解决这一问题?

So I find what seems to be a simple way to accomplish the drag-sort (http://ericharlow.blogspot.com/2010/10/experience-android-drag-and-drop-list.html). But my child views are clickable themselves, and that seem to block the parent ListView from seeing my drag events. Any ideas how to fix this?

推荐答案

该bauerca列表视图是一种可能性......的这个SO帖子处理的是事实,这是比较复杂的,并提供了一​​个库,以巩固的东西; Git的源$ C ​​$ C 可以在这里找到。祝你好运,它的工作对我来说有一定的难度!

The bauerca listview is a possibility...this SO post deals with the fact that it is somewhat complicated, and offers a library to consolidate things; the Git source code can be found here. Good Luck, it worked for me with some difficulty!

这篇关于通过拖动重新排序的ListView元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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