Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android UI pattern for moving Listview items up and down

I have a ListView in which I would like to give user the ability to move items up and down by some gesture, such as by dragging the item.

Is there an established UI pattern to do such a thing? I'm not asking for any sample code (although that would be nice to have) just asking how do they do it in professional applications (if they do it)?

like image 902
Alexander Kulyakhtin Avatar asked Apr 05 '14 06:04

Alexander Kulyakhtin


1 Answers

It may not be a pattern, but I'd reccommend you to take a look at Play Music. When viewing the playlist you can reorder them by using the "anchors" on the left of the list item. The items itself are highlighted on drag.

Patterns are mentioned on http://www.androidpatterns.com/uap_pattern/drag-to-move and http://www.androidpatterns.com/uap_pattern/sort-drag-drop - these are a little bit deprecated and recommend similar ui as the Play Music app uses [0]. I'll quote the relevant part:

… the drag & drop mode is accessed, that can be identified by a visual target, added to every list item and…

[0] but with an explicit reordering mode - but modes should not be used when not necessary.

like image 88
lippertsjan Avatar answered Oct 19 '22 00:10

lippertsjan