Closed charuraninag closed 5 years ago
I'm having the same issue, it happens when i delete the last itens from the last section, and call notifySectionDataSetChanged(index)
Call notifySectionItemRemoved(sectionIndex, itemIndex) method instead of notifySectionDataSetChanged(index)
/** * Notify that an item has been removed from a section * Never directly call notifyItemRemoved * * @param sectionIndex index of the section * @param itemIndex index of the item in the section where 0 is the first position in the section */ public void notifySectionItemRemoved(int sectionIndex, int itemIndex)
Hello! I have made a fork and solved the issue -> https://github.com/Sportner/StickyHeaders
Fatal Exception: java.lang.IndexOutOfBoundsException: adapterPosition (8) cannot be > getItemCount() (8)at org.zakariya.stickyheaders.b.a(SectioningAdapter.java:1198)at org.zakariya.stickyheaders.b.p(SectioningAdapter.java:1244)at org.zakariya.stickyheaders.StickyHeaderLayoutManager.q(StickyHeaderLayoutManager.java:840)at org.zakariya.stickyheaders.StickyHeaderLayoutManager.f(StickyHeaderLayoutManager.java:660)at org.zakariya.stickyheaders.StickyHeaderLayoutManager.h(StickyHeaderLayoutManager.java:721)at org.zakariya.stickyheaders.StickyHeaderLayoutManager.c(StickyHeaderLayoutManager.java:176)