cymcsg / UltimateRecyclerView

A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.
Apache License 2.0
7.22k stars 1.43k forks source link

Swiping Rapidly Causes IndexOutOfBounds #92

Open SyedWasiHaider opened 9 years ago

SyedWasiHaider commented 9 years ago

PID: 20606 java.lang.IndexOutOfBoundsException: Invalid index 7, size is 7 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.get(ArrayList.java:308) at com.marshalchen.ultimaterecyclerview.swipelistview.SwipeListViewTouchListener.closeOpenedItems(SwipeListViewTouchListener.java:780)

Can you please add the ability to override this or perhaps just check the index before using it.

cymcsg commented 9 years ago

Do you try SwipeListViewExampleActivity? I did not find the error. At the same time ,I think you can control it in onDismiss

SyedWasiHaider commented 9 years ago

Yes that is what I based my code off of. I think the problem is internal to your library since that is where the error comes from. I forgot to mention I have the following removed because I want to be able to swipe more than one at a time.

swipe:swipeCloseAllItemsWhenMoveList="true" swipe:onlyOneOpenedWhenSwipe="true"

cymcsg commented 9 years ago

I removed these line from the demo but nothing happens. Could you help me remove the two line from the demo and watch if the error would occur? I should find the error before I can fix it.