我怎么能允许在列表中的用户进行重新排序的项目? [英] How can I allow a user to re-sort items in a list?
问题描述
我有一个Android应用程序,用户可以将项目添加到列表中,我希望他们能够重新排序列表中的项目然而,他们想要的(而不是仅仅向他们提供不同的排序顺序)。这是很容易添加一个位置设定为所述产品(它们来自DB)中,但什么样的UI元素可用于用户指示期望的排序
I have an Android app where users can add items to a list, and I'd like them to be able to re-order the items in the list however they want (as opposed to just offering them different sort orders). It's easy enough to add a position setting for the items (they come from the DB) but what kind of UI elements are available for the user to indicate the desired ordering?
有没有一种模式的人已经看到了实现这个?我还没有看到,做这样的事,但在主屏幕上是类似的,但看起来超出了我的专业知识一点点在这一点上Android的东西。最好我能想到的是使用长按和上下文菜单中的向上或下移。
Is there a pattern anyone has seen implemented for this? I have not seen anything on Android that does anything like this, except the home screen which is similar but looks a little bit beyond my expertise at this point. The best I can think of is to use a long click and context menu to "move up" or "move down".
推荐答案
我刚刚发现这一点:的 Android的列表视图拖动和一些搜索和浏览后删除排序。我认为这是有道理的在此处链接,因为这是寻找在Android的reorderable列表时出现的第一个问题。
I just found this: Android List View Drag and Drop sort after some searching and browsing. I thought it makes sense to link it here, because this is the first question that comes up when searching for reorderable lists in android.
这篇关于我怎么能允许在列表中的用户进行重新排序的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!