UltimateRecyclerView
UltimateRecyclerView copied to clipboard
Attempt to write to field 'int android.support.v7.widget.RecyclerView$ViewHolder.mItemViewType' on a null object reference
mBookingsList.enableLoadmore();
mBookingsList.setOnLoadMoreListener(new UltimateRecyclerView.OnLoadMoreListener() {
@Override
public void loadMore(int itemsCount, int maxLastVisiblePosition) {
}
});
I am getting null pointer exception when I scroll the recycler view.
I am extending it with UltimateViewAdapter<MyViewHolder>
i have made some similar design pattern to work with this mechanism and issued in another library this is the sample code.
set mBookingsList.enableLoadmore() after add first items range
@progfiles i dont understand, how can i do that?
same issue.
@Kaustubh-Deshmukh please check your getViewHolder()
, if this method return null, would cause this issue.
I added layout manager this way to fix it:
final ScrollSmoothLineaerLayoutManager mgm = new ScrollSmoothLineaerLayoutManager(this, LinearLayoutManager.VERTICAL, false, 300);
myURecycleRView.setLayoutManager(mgm);