My current project shows a hierarchical list of items that the user can scroll through/edit and I need some advice on how to enable drag/drop reordering
I'm looking for a solution that in its simplest form is like the way that the B4A designer works with the Views tree - namely:
* Showing the hierarchy, with children shown below their parent. There are no grandchildren. There may be top level items with no children.
* Scrolling up and down the list
* Enabling list items to be selected - for further operations like editing the item's attributes.
* Enabling list items to be reordered using drag/drop - with visible feedback of where the item that's being dragged will be dropped (between two parents, at the start/end of the parents, between two children, at the start/end of the children of a specific parent).
I need to be able to handle "nonsense" cases - for example trying to drag a parent within its own children, or drag a parent into another parent - as well as handling "viable" cases like dragging an item out from under its parent (promotion) or dragging a top-level item with no children under another item that then becomes it's parent (demotion). Ideally, these should be able to be handled using visible feedback - like the designer showing long/short lines only where an item can be dropped.
Any suggestions for the best approach/libraries to use?
Thanks all.
I'm looking for a solution that in its simplest form is like the way that the B4A designer works with the Views tree - namely:
* Showing the hierarchy, with children shown below their parent. There are no grandchildren. There may be top level items with no children.
* Scrolling up and down the list
* Enabling list items to be selected - for further operations like editing the item's attributes.
* Enabling list items to be reordered using drag/drop - with visible feedback of where the item that's being dragged will be dropped (between two parents, at the start/end of the parents, between two children, at the start/end of the children of a specific parent).
I need to be able to handle "nonsense" cases - for example trying to drag a parent within its own children, or drag a parent into another parent - as well as handling "viable" cases like dragging an item out from under its parent (promotion) or dragging a top-level item with no children under another item that then becomes it's parent (demotion). Ideally, these should be able to be handled using visible feedback - like the designer showing long/short lines only where an item can be dropped.
Any suggestions for the best approach/libraries to use?
Thanks all.