Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Implement Endless list #49

Closed
Uname-nikunj opened this issue Mar 11, 2014 · 4 comments
Closed

Implement Endless list #49

Uname-nikunj opened this issue Mar 11, 2014 · 4 comments

Comments

@Uname-nikunj
Copy link

Can you please implement functionality of Endless list with this Twoway- view so for huge data loading its good to use.

Thanks
Nkpatel

@lucasr
Copy link
Owner

lucasr commented Jun 4, 2014

This is something you have to implement in your own adapter.

@lucasr lucasr closed this as completed Jun 4, 2014
@arashsammak
Copy link

well, how?!! how to implement this in adapter?!

@arashsammak
Copy link

in found solution

mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
@OverRide
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {

            visibleItemCount = mRecyclerView.getChildCount();
            totalItemCount = adapter.getItemCount();
            pastVisiblesItems = mRecyclerView.getFirstVisiblePosition();
            adapter.notifyDataSetChanged();

            if (loading) {
                if ((visibleItemCount + pastVisiblesItems) >= totalItemCount) {
                    loading = false;
                    Log.v("...", "Last Item Wow !");

                 // REQUEST LOAD MORE

                    adapter.notifyDataSetChanged();
                }
            }
        }
    });

@summers314
Copy link

summers314 commented Sep 17, 2016

@arashsammak I was gonna implement the above method. Are there any updates to it, or does it work fine?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants