I have been working on expandablelistview. And its working fine with many adjustments. I am happy to use it and it is working like charm so far.
But now I have new requirements where user can able to perform the several things. and that is as under.
- User can drag and drop item from one group to another (sorting)
- User can drag and drop whole group up and down (sorting)
- User can swipe left/right an item to delete/move (move/delete)
- User can swipe left/right whole group to delete/move.(move/delete)
For these I have to implement the touch listener. I am successful to swipe left/right. But I am unable to do drag and drop using expandable listview.
I have seen this link. its ItemTouchHelper class and works well with the recyclerview. but I am not suer to how to use it listview. Specially with ExpandableListview.
So in short I can summerize my questions like this?
- How to perform drag/drop and swipe left/right on expandable listvie?
- How to use ItemTouchHelper class mentioned above?
- What is other way to show items in group header form. (I can think of breaking it down , I mean I can say that first I can show list of headers and then by clicking over one header I can then open another activity containing its childern . in this way I can user recyclerview and can easily perform all drag and drop and swipping. but in this break down I can not swipe one item out of one group to another)
Please suggest me better way. and help me out. It would be appreciateable.