Skip to content

Instantly share code, notes, and snippets.

View ederdoski's full-sized avatar
👨‍💻
Coding

Edermar Dominguez ederdoski

👨‍💻
Coding
View GitHub Profile
@LetItRock
LetItRock / RecyclerView.OnScrollListener.java
Last active June 9, 2022 03:42
Android RecyclerView detecting end of list
private boolean loading = true;
int pastVisiblesItems, visibleItemCount, totalItemCount;
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener()
{
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy)
{
if(dy > 0) //check for scroll down
{