F Flosch Member Licensed User Longtime User Sep 19, 2011 #1 Hi, I want to create a List where the user can rearrange the order of the list over a long click event and drop the entry to the right position. For example: I have the following list: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 The user will press long on Item 3 and then move it to Position 1 with his finger so the new order will be: Item 3 Item 1 Item 2 Item 4 Item 5 Item 6 So I already figured out that it is easier to rearrange a ScrollView than a List View. But I couldn't find an example of the Drag N Drop event. Is there an example with something similar? Thanks for your help!
Hi, I want to create a List where the user can rearrange the order of the list over a long click event and drop the entry to the right position. For example: I have the following list: Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 The user will press long on Item 3 and then move it to Position 1 with his finger so the new order will be: Item 3 Item 1 Item 2 Item 4 Item 5 Item 6 So I already figured out that it is easier to rearrange a ScrollView than a List View. But I couldn't find an example of the Drag N Drop event. Is there an example with something similar? Thanks for your help!
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2011 #2 I don't remember seeing such an example. As you wrote you should use a ScrollView instead of ListView. Upvote 0
I don't remember seeing such an example. As you wrote you should use a ScrollView instead of ListView.
F Flosch Member Licensed User Longtime User Sep 19, 2011 #3 Thanks for the quick reply. Is there any Drag N Drop example around? I’m a beginner with b4a – so any help would be good. Thanks Upvote 0
Thanks for the quick reply. Is there any Drag N Drop example around? I’m a beginner with b4a – so any help would be good. Thanks
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2011 #4 Maybe this thread will be helpful: http://www.b4x.com/forum/basic4andr.../7699-rearrange-listview-lines.html#post43713 Upvote 0
Maybe this thread will be helpful: http://www.b4x.com/forum/basic4andr.../7699-rearrange-listview-lines.html#post43713
F Flosch Member Licensed User Longtime User Sep 19, 2011 #5 Thanks Earl - I have seen this thread already. I think I can handle the Scroll View. But I have no idea how to handle a Drag and Drop event - so I'm pretty sure I need some help there ;-) Upvote 0
Thanks Earl - I have seen this thread already. I think I can handle the Scroll View. But I have no idea how to handle a Drag and Drop event - so I'm pretty sure I need some help there ;-)
klaus Expert Licensed User Longtime User Sep 19, 2011 #6 I'm afraid that you can't do it. Because for a DragNDrop function you need the Touch event. But with a ScrollView or with a ListView the Touch event is already consumed and can't be used anymore. Perhaps in the future with an overlaying Panel if it's Touch Event could be treated like the KeyPress event. Best regards. Upvote 0
I'm afraid that you can't do it. Because for a DragNDrop function you need the Touch event. But with a ScrollView or with a ListView the Touch event is already consumed and can't be used anymore. Perhaps in the future with an overlaying Panel if it's Touch Event could be treated like the KeyPress event. Best regards.
F Flosch Member Licensed User Longtime User Sep 19, 2011 #7 Thanks Klaus - so I will stop my experiments and will go to the next task: A list of all Audio Files sorted by artist / track name or album! If anybody has some information or tips how to realise this – don’t hesitate to let me know. I’m already playing with the ContentChooser but I only get all Audio Files - nothing sorted. Upvote 0
Thanks Klaus - so I will stop my experiments and will go to the next task: A list of all Audio Files sorted by artist / track name or album! If anybody has some information or tips how to realise this – don’t hesitate to let me know. I’m already playing with the ContentChooser but I only get all Audio Files - nothing sorted.
Djembefola Active Member Licensed User Longtime User Sep 20, 2011 #8 Flosch said: A list of all Audio Files sorted by artist / track name or album! If anybody has some information or tips how to realise this Click to expand... You need to read the id3v2 tags of the mp3 files. This can be done with the Random access file library. Upvote 0
Flosch said: A list of all Audio Files sorted by artist / track name or album! If anybody has some information or tips how to realise this Click to expand... You need to read the id3v2 tags of the mp3 files. This can be done with the Random access file library.