Skip to content
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

Support arbitrary LayoutManagers in RecyclerView integration package #493

Open
eicm opened this issue Jun 11, 2015 · 9 comments
Open

Support arbitrary LayoutManagers in RecyclerView integration package #493

eicm opened this issue Jun 11, 2015 · 9 comments

Comments

@eicm
Copy link

@eicm eicm commented Jun 11, 2015

I was taking a look on RecyclerView integrations and ListPreloader implementation. If I haven't missed anything simply changing RecyclerToListViewScrollListener.java class to get the correct firstVisible, visibleCount and itemCount should be enough to create infinite scrolling for any other type of LayoutManager. Would you please correct me if I'm wrong.

@sjudd
Copy link
Member

@sjudd sjudd commented Jun 12, 2015

Assuming I'm understanding you, you're correct. We could definitely add an interface allowing you to pull that data out and provide implementation(s) for the default layout managers.

@eicm
Copy link
Author

@eicm eicm commented Jun 12, 2015

Right. I was a little bit skeptical that maybe there is a point I am missing, since only LinearLaoutManager was supported in the api.

@TWiStErRob
Copy link
Collaborator

@TWiStErRob TWiStErRob commented Jun 12, 2015

It may be possible now to include those in the core library with http://b.android.com/149268 if I understand correctly what you're talking about.

@eicm
Copy link
Author

@eicm eicm commented Jun 12, 2015

What I'm asking is to have a more general interface to implement pre-loading for any extension of LayoutMangers in RecyclerViews

@sjudd
Copy link
Member

@sjudd sjudd commented Jun 12, 2015

@eicm A pull request to implement that functionality would certainly be welcome :)

@eicm
Copy link
Author

@eicm eicm commented Jun 12, 2015

@sjudd I can't do it this month, if it wasn't implemented in by next month I will gladly do a pull for it :)

@sjudd sjudd changed the title Question on RecyclerView Integration Support arbitrary LayoutManagers in recyclerview integration package Jun 12, 2015
@sjudd sjudd changed the title Support arbitrary LayoutManagers in recyclerview integration package Support arbitrary LayoutManagers in RecyclerView integration package Jun 12, 2015
@TWiStErRob
Copy link
Collaborator

@TWiStErRob TWiStErRob commented Jun 12, 2015

What I meant is the recyclerview integration module (I didn't know it existed :) could be built-in to main library module with a provided dependency on support-recyclerview with a generic interface and multiple implementations.

@TWiStErRob
Copy link
Collaborator

@TWiStErRob TWiStErRob commented Oct 16, 2015

@eicm would you have a chance now to do a PR?

@sjudd
Copy link
Member

@sjudd sjudd commented Nov 17, 2017

This is pretty easy to do in v4, in fact the existing RecyclerView preloader is just a thin wrapper itself:

public final class RecyclerViewPreloader<T> extends RecyclerView.OnScrollListener {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants