Open eicm opened 9 years ago
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.
Right. I was a little bit skeptical that maybe there is a point I am missing, since only LinearLaoutManager was supported in the api.
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.
What I'm asking is to have a more general interface to implement pre-loading for any extension of LayoutMangers in RecyclerViews
@eicm A pull request to implement that functionality would certainly be welcome :)
@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 :)
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.
@eicm would you have a chance now to do a PR?
This is pretty easy to do in v4, in fact the existing RecyclerView preloader is just a thin wrapper itself: https://github.com/bumptech/glide/blob/062e9ba0af80437efad8dade830737eee6c2d3c5/integration/recyclerview/src/main/java/com/bumptech/glide/integration/recyclerview/RecyclerViewPreloader.java#L30
Delete file
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.