truizlop/SectionedRecyclerView

Nullpointer when set section count from list size

pratamawijaya opened this issue · 2 comments

Hi im trying set section count using list size, but always give me null pointer, i have been trace my code,
and im sure my arraylist not null, here are my adapter

_Adapter_
https://gist.github.com/anonymous/fd7d7b0a5ee22532f626

_my MainActivity_
https://gist.github.com/anonymous/6767cbd484bbd4145487

_my MainPresenter_
https://gist.github.com/anonymous/2f6c4e4bde3cb4e16dab

then i have changed my adapter become like these

https://gist.github.com/anonymous/31781b2426fc6b81984f

and its work _
but im still didn't get it why in first method is throwing null pointer

I have the same problem here.
getItemCountForSection method called before constructor. so the fields is null.