bignerdranch / expandable-recycler-view

[DEPRECATED]
MIT License
1.22k stars 290 forks source link

ChildItem causes problems #101

Closed XxGoliathusxX closed 8 years ago

XxGoliathusxX commented 9 years ago

Hello, I'm almost done. There is one last problem: How to remove an ChildItem that has no parent? When i drag a child around it can temporary inserted everywhere. It can be that it has no parentitem. Then this childitem shall be removed and added to the nearest parent item. I call notifyItemMoved every time a item gets moved. For the parent the drag&drop behaviour works fantastic. Also swiping is implemented and causes no problems. Only dragging childitems causes problems.

XxGoliathusxX commented 9 years ago

It would be very helpful if you could implement notifyItemMoved(from, to). Because tinker with normal recyclerview notifyXXX methods and the parent/child notify methods you guys integrated doesnt work well.

paul-turner commented 9 years ago

I don't think I have a good answer to your question. This library was designed around the idea of children always living under a parent, not sure we cover your situation properly.

I agree mixing the different notify methods is not very good, we are working towards notifyMoved methods for the next version, tracked in #88. That being said I don't know that we would move a child to be "Parentless", only to being contained within a parent. I'll try to ping you when the PR goes up for this to get your input on the direction we take.

XxGoliathusxX commented 9 years ago

Ok I understand that.I think it would be sufficient if the user can swap parents with parents (I already solved that and it works). And inside a parent you can swap children. I think then you would get a very efficient solution for it that doesnt dissolute. Can I send you my code so you can have a look over it? The code contains only the readme example with the swipe and drag behavior, not more.

dgreenhalgh commented 8 years ago

Resolved in 2.1.0.