EndlessRecyclerView
lets you to load new pages when a user scrolls down to the bottom of a list.
It extends RecyclerView
and it is fully configurable to meet different development needs.
The library compatible with Android 7+.
To use the library in your project write this code to your build.gradle:
buildscript {
repositories {
jcenter()
}
}
dependencies {
compile 'com.github.yasevich:endless-recycler-view:1.1.0'
}
Or include it to your lib folder.
[] (https://bintray.com/slava/maven/endless-recycler-view/_latestVersion)
You can include EndlessRecyclerView
to your layout as following:
<com.github.yasevich.endlessrecyclerview.EndlessRecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Set up EndlessRecyclerView
parameters as required:
EndlessRecyclerView list = ...; // initialization
list.setLayoutManager(new LinearLayoutManager(this));
list.setProgressView(R.layout.item_progress);
list.setAdapter(adapter);
list.setPager(this);
When page is loaded you may want to stop showing progress view:
list.setRefreshing(false);
See sample and documentation for more details.