-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to handle scroll UP and DOWN to load more? #46
Comments
Yes, it is! |
@EdsonBueno |
Ooooh, wow! Now I get it... |
When you say it's not possible, do you mean just as a limitation of this widget? I'm eager to hear what your thoughts are here, but in the meantime I and others may have to rely on the alternatives like the one I linked to meet this specific need. |
@zefaxet From what I could understand, the package you listed has nothing to do with pagination, it's just a circular What @valerybodak wants is to start showing the user the third page (for example). Then if the user scrolls up, we lazily fetch the second page. If he scrolls down, we lazily fetch the fourth page. |
Not quite. Example: What @valerybodak is asking for is, if they were to scroll up in this case, for the controller to dispatch a request for page 1 and prepend it to the top of the scroll view (preserving order). You're right that the package I linked is not paginating anything, but it is not circular. Is is able to generate indices infinitely in both directions, up or down, allowing you to have infinite scroll in both directions with fresh items. I think this concept can be extended to your implementation of the Perhaps: void prependPage(List<ItemType> newItems, PageKeyType nextReversePageKey) {
...
} Can't figure out a better name for What do you think? |
It can definitely be done, and the API you suggested would work. But, I'm afraid the inner workings of this aren't that simple, not to mention the visual aspects (loading and error indicators). I'll keep an eye on this, and if enough users start asking for it, I can give it a try. |
I agree with creating a new widget for this. I was going to suggest that next so it's good to see there's room for the feature if the demand comes. |
It's a great Idea. I'm looking for the same |
From now on, let's track this issue here. |
I see that we can handle scroll DOWN to load more, but is it possible to handle scroll UP as well to load more? For example, initial page is 2. So when I scroll to top I need to fetch page 1 etc.
The text was updated successfully, but these errors were encountered: