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
I was wondering if I always have to add some starting elements in order to endless scroll to work?
Let's say I initialize my adapter with FlexibleAdapter<IFlexible> adapter = new FlexibleAdapter<>(null);
Then i set EndlessScrollListener on it, for example adapter.setEndlessScrollListener(this, progressItem);.
In this case, will onLoadMore fire on startup? In all examples i have seen there are some starting items.
Is this considered a good practice?
The text was updated successfully, but these errors were encountered:
@shymmq, indeed, at the moment you need to bind something to trigger it (not the progressItem!), one item is necessary.
If I added if (getItemCount() == 0) onLoadMore(0); when setting the first time the progress, it will start automatically. But you can tell me better, since you are using it more than me: when adapter is empty at startup, better an implicit automatic start or a boolean settings?
However, this also works: your remote method at startup and also show the progressItem with mAdapter.addScrollableFooter(mProgressItem);
Thank you, that makes sense. I think that something like adapter.loadMoreOnStartup(boolean b) would be perfect. It should be set to false by default, though, so it doesn't break any old code.
I was wondering if I always have to add some starting elements in order to endless scroll to work?
Let's say I initialize my adapter with
FlexibleAdapter<IFlexible> adapter = new FlexibleAdapter<>(null);
Then i set EndlessScrollListener on it, for example
adapter.setEndlessScrollListener(this, progressItem);
.In this case, will onLoadMore fire on startup? In all examples i have seen there are some starting items.
Is this considered a good practice?
The text was updated successfully, but these errors were encountered: