Reordering Lists like playlists in the media player

Posted by CrazyBS on Stack Overflow See other posts from Stack Overflow or by CrazyBS
Published on 2010-04-01T23:29:42Z Indexed on 2010/04/01 23:33 UTC
Read the original article Hit count: 211

Filed under:
|
|
|

Hi,

I have a list of items that are displayed using a ListView from a SQLCursor. The SQL table includes(as well as other things) a _id field and an order field. I use the order field to sort the list before it gets to the ListView.

What I need is a widget like the MediaPlayer has in its playlist view. It allows you to click the icon and drag the item in the playlist around and put it into a new order. With that ability I can then retrieve the new order and update the SQL table with the new order. However, I am not having any luck finding any clues to help me add that functionality into my program.

The question is whether I can use existing functions to help me, or do I need to manually program motion events and such until I get nearly the same functionality.

© Stack Overflow or respective owner

Related posts about android

Related posts about list