You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
If RecyclerView has less items than it can maximum has visible (ie. RecyclerView can take 5 items on the screen, but adapter contains only 3 items) and it has set nextPageListener then IllegalStateException happens when adding next page without any delay.
Steps to reproduce:
add RecyclerView, set nextPageListener and add just few items in adapter (to take less than recycler size)
in onScrolledToNextPage add few more items (I used addAll method)
Workaround is to wrap code that is in onScrolledToNextPage into some runnable and post it on main handler.
Solution is to use main handler for posting task that would call nextPageListener.onScrolledToNextPage inside of onBindViewHolder method of MjolnirRecyclerAdapter.
The text was updated successfully, but these errors were encountered:
If RecyclerView has less items than it can maximum has visible (ie. RecyclerView can take 5 items on the screen, but adapter contains only 3 items) and it has set
nextPageListener
thenIllegalStateException
happens when adding next page without any delay.Steps to reproduce:
nextPageListener
and add just few items in adapter (to take less than recycler size)onScrolledToNextPage
add few more items (I usedaddAll
method)Workaround is to wrap code that is in
onScrolledToNextPage
into some runnable and post it on main handler.Solution is to use main handler for posting task that would call
nextPageListener.onScrolledToNextPage
inside ofonBindViewHolder
method ofMjolnirRecyclerAdapter
.The text was updated successfully, but these errors were encountered: