BUG
What is the current behavior?
When I refresh my recyclerview and then try to swipe to dismiss an item, I get an IndexOutOfBoundsException.
If the current behavior is a bug, please provide the steps to reproduce.
I just to a refresh and then try to swipe to dismiss an item.
Any logs, error output, bugreport etc?
adapter = RVHAdapter(context, listOfFiles)
recyclerView.swapAdapter(adapter, true)
val callback = RVHItemTouchHelperCallback(adapter, false, true, true)
val helper = ItemTouchHelper(callback)
helper.attachToRecyclerView(recyclerView)
What is the expected behavior?
No IndexOutOfBoundsException
Any other comments?
What versions of software are you using?
-
Device Information:
Google Pixel 2
-
Android Version:
Android 9: Pie
-
Configuration Information:
-
Misc:
Logcat:
java.lang.IndexOutOfBoundsException: Index: 4, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at com.example.ViewVideosActivity$VideoAdapter$onItemDismiss$1.invoke(ViewVideosActivity.kt:295)
at com.example.ViewVideosActivity$VideoAdapter$onItemDismiss$1.invoke(ViewVideosActivity.kt:260)
at org.jetbrains.anko.AsyncKt.runOnUiThread(Async.kt:34)
at com.example.ViewVideosActivity$VideoAdapter.onItemDismiss(ViewVideosActivity.kt:291)
BUG
What is the current behavior?
When I refresh my recyclerview and then try to swipe to dismiss an item, I get an IndexOutOfBoundsException.
If the current behavior is a bug, please provide the steps to reproduce.
I just to a refresh and then try to swipe to dismiss an item.
Any logs, error output, bugreport etc?
What is the expected behavior?
No IndexOutOfBoundsException
Any other comments?
What versions of software are you using?
Device Information:
Google Pixel 2
Android Version:
Android 9: Pie
Configuration Information:
Misc:
Logcat:
java.lang.IndexOutOfBoundsException: Index: 4, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at com.example.ViewVideosActivity$VideoAdapter$onItemDismiss$1.invoke(ViewVideosActivity.kt:295)
at com.example.ViewVideosActivity$VideoAdapter$onItemDismiss$1.invoke(ViewVideosActivity.kt:260)
at org.jetbrains.anko.AsyncKt.runOnUiThread(Async.kt:34)
at com.example.ViewVideosActivity$VideoAdapter.onItemDismiss(ViewVideosActivity.kt:291)