Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

Nullpointer when set section count from list size #3

Closed
pratamawijaya opened this issue Sep 23, 2015 · 2 comments · Fixed by #6
Closed

Nullpointer when set section count from list size #3

pratamawijaya opened this issue Sep 23, 2015 · 2 comments · Fixed by #6

Comments

@pratamawijaya
Copy link

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

@pratamawijaya
Copy link
Author

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

@humazed
Copy link

humazed commented Sep 27, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants