Tracks preloading begins once you've reached three-quarters of the list
This commit is contained in:
1 parent
c77e23af13
commit
10e77d0492
1 file changed
+1
-1
+1
-1
@@ -23,7 +23,7 @@ public abstract class PaginationScrollListener extends RecyclerView.OnScrollList
|
||||
int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
|
||||
|
||||
if (!isLoading()) {
|
||||
if (firstVisibleItemPosition >= 0 && (visibleItemCount + firstVisibleItemPosition) >= totalItemCount) {
|
||||
if (firstVisibleItemPosition >= 0 && (visibleItemCount + firstVisibleItemPosition) >= (totalItemCount / 4 * 3)) {
|
||||
loadMoreItems();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user