-
Notifications
You must be signed in to change notification settings - Fork 728
Closed
Description
I had a working drag implementation that was working fine with Epoxy v4.5.0.
EpoxyTouchHelper.initDragging(bindingController)
.withRecyclerView(recyclerView)
.forVerticalList()
.withTarget(CompactCellBinder::class.java)
.andCallbacks(ReorderDragCallback(::onCellMoved, ::onMoveComplete))
After updating to Epoxy v4.6.1, I now get an NPE whenever you drag a view over another. There is code in EpoxyTouchHelperCallback that is performing a cast when the ViewHolder is null. It looks like this class was converted from Java to Kotlin in this Epoxy release.
java.lang.NullPointerException: null cannot be cast to non-null type com.airbnb.epoxy.EpoxyViewHolder
at com.airbnb.epoxy.EpoxyTouchHelperCallback.chooseDropTarget(EpoxyTouchHelperCallback.kt:104)
at com.airbnb.epoxy.EpoxyTouchHelperCallback.chooseDropTarget(EpoxyTouchHelperCallback.kt:88)
at com.airbnb.epoxy.EpoxyTouchHelperCallback.chooseDropTarget(EpoxyTouchHelperCallback.kt:11)
at androidx.recyclerview.widget.ItemTouchHelper.moveIfNecessary(ItemTouchHelper.java:877)
at androidx.recyclerview.widget.ItemTouchHelper$2.onTouchEvent(ItemTouchHelper.java:389)
at androidx.recyclerview.widget.RecyclerView.dispatchToOnItemTouchListeners(RecyclerView.java:3259)
at androidx.recyclerview.widget.RecyclerView.onTouchEvent(RecyclerView.java:3421)
hbb20
Metadata
Metadata
Assignees
Labels
No labels