DevAhamed / MultiViewAdapter

Easily create complex recyclerview adapters in android
https://devahamed.github.io/MultiViewAdapter
Apache License 2.0
818 stars 149 forks source link

NullPointerException in the sample app #21

Closed vale1534 closed 5 years ago

vale1534 commented 7 years ago

In 'Simple grid' and 'Complex' page, long press the grid item will caused NullPointerException:

FATAL EXCEPTION: main
    Process: com.ahamed.sample, PID: 25712
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.helper.ItemTouchHelper.startDrag(android.support.v7.widget.RecyclerView$ViewHolder)' on a null object reference
    at com.ahamed.multiviewadapter.CoreRecyclerAdapter$2.onStartDrag(CoreRecyclerAdapter.java:79)
    at com.ahamed.multiviewadapter.BaseViewHolder.startDrag(BaseViewHolder.java:162)
    at com.ahamed.sample.common.binder.GridItemBinder$ItemViewHolder$2.onItemLongClick(GridItemBinder.java:73)
    at com.ahamed.sample.common.binder.GridItemBinder$ItemViewHolder$2.onItemLongClick(GridItemBinder.java:71)
    at com.ahamed.multiviewadapter.BaseViewHolder.onLongClick(BaseViewHolder.java:44)
DevAhamed commented 5 years ago

The library has been refactored and 2.x has been released. If you are still facing this issue kindly re-open.