I've implemented your method into my project, and i have a few problems, hopefully i will explain it properly:
When dragging items really fast up and down, sometimes it happens that a copy of an item appears in the "background" of a recyclerview, and stays there, you can select it and drag it but it wont move when released. It can be seen when items inside RV are not fixed size.
This is not what you have put but, i've added a textview that represents getAdapterPosition() of adapter in each item, it is working nice until i start "sling shoting" items via drag and sometimes there is a duplicate of a position ( 1 , 2 , 3 , 5 ,5 ,6 ,7) i fixed that issue with notifyDataSetChanged in onItemClear() but that wasn't very fortunate since i get IllegalStateException if i do the same thing.
I know this may be a bit difficult to resolve (cant use debugger since i have some huge recursion before that code which takes forever) and those lists can be really tricky to debug, so any tip or hint would be awesome. Thank you in advance.
I've implemented your method into my project, and i have a few problems, hopefully i will explain it properly:
getAdapterPosition()
of adapter in each item, it is working nice until i start "sling shoting" items via drag and sometimes there is a duplicate of a position ( 1 , 2 , 3 , 5 ,5 ,6 ,7) i fixed that issue withnotifyDataSetChanged
inonItemClear()
but that wasn't very fortunate since i getIllegalStateException
if i do the same thing.I know this may be a bit difficult to resolve (cant use debugger since i have some huge recursion before that code which takes forever) and those lists can be really tricky to debug, so any tip or hint would be awesome. Thank you in advance.