Can't get Endless Scroll to work
See original GitHub issueHi,
I have followed the documentation on how to setup endless scrolling. I’ve been able to create and populate a View Holder. From what I understand, endless scrolling is automatic when an EndlessScrollListener
is specified by .setEndlessScrollListener()
. All of which I have implemented or defined respectively.
public class EventFragment extends PagingFragment implements Callback<EventList>, FlexibleAdapter.EndlessScrollListener{
My adapter has been setup with:
eventAdapter .setLoadingMoreAtStartUp(true) .setEndlessTargetCount(15) .setEndlessScrollThreshold(1) .setEndlessScrollListener(this, progressItem) .setTopEndless(false)
Making use of the exact same ProgressItem
used in the demo application.
I have setup a rest API, using Square’s Retrofit. The API is tested and working. My problem sets in where on getting to the bottom of the RecyclerView after fetching Page 1, onLoadMore()
isn’t called by the adapter when the threshold is reached.
If it’s any help, my environment is Windows 10, building to an Android Marshmallow(6.0.1).
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Understood, I’d find a different resolution by extending
FlexibleAdapter
. Thanks for the clarification 😃@ACK19, I imagined that you couldn’t change it. However, perPage is the page size to set, as I can see. In theory, you should receive your page number based on the total items in the adapter. I don’t know if you have to do a +1.