eowise / recyclerview-stickyheaders

DEPRECATED. Android library that integrate sticky section headers in your RecyclerView
http://eowise.github.io/recyclerview-stickyheaders
MIT License
960 stars 148 forks source link

Fix java.lang.IndexOutOfBoundsException: happens after AdapterDataObserver.onChanged() #13

Closed vovan888 closed 9 years ago

vovan888 commented 9 years ago

...er.onChanged() is called)

java.lang.IndexOutOfBoundsException: Invalid index 6, size is 0
            at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
            at java.util.ArrayList.add(ArrayList.java:147)
            at com.eowise.recyclerview.stickyheaders.HeaderStore.isHeader(HeaderStore.java:74)

Another option would be to use SparseArray instead of ArrayList for isHeaderByItemPosition

leruaa commented 9 years ago

Thanks a lot !