ShamylZakariya / StickyHeaders

Adapter and LayoutManager for Android RecyclerView which enables sticky header positioning.
MIT License
1.4k stars 185 forks source link

Adds method for resetting internal state of PagedLoadScrollListener #104

Closed clzola closed 5 years ago

clzola commented 5 years ago

This method is very useful if RecyclerView is inside SwipeRefreshLayout. Because if user reaches bottom of the list, developer should make call to loadComplete.notifyLoadExhausted() to indicate to PagedLoadScrollListener that we have loaded last items from data source. However if user do SwipeToRefresh action, onLoadMore() method will not be called because loadExhausted is set to true.

Workaround for developer would be to create new scroll listener.

With resetPaging() developer will not need to create new instance of PagedLoadScrollListener, but just call resetPaging() method to reset internal state of PagedLoadScrollListener.

ShamylZakariya commented 5 years ago

Looks good to me.