lucasr / twoway-view

[DEPRECATED] RecyclerView made simple
5.23k stars 1.02k forks source link

When removing item from adapter I get IndexOutOfBounds #284

Closed stefanionescu closed 7 years ago

stefanionescu commented 7 years ago

Hey guys,

I'm using an adapter with the TwoWayView and when I want to programmatically delete an item, it gives me IndexOutOfBounds. Did you encounter this situation ? And how did you handle it ?

stefanionescu commented 7 years ago

Nevermind, I solved it : in the adapter I had numerous ArrayLists. When I want to delete items, I get the Arraylists from the adapter, I add the elements that I want to remain in other ArrayLists and the I set the ArrayList again for the Adapter.

Complicated but works