Skip to content

Instantly share code, notes, and snippets.

@mahdi-malv
Created November 10, 2018 08:22
Show Gist options
  • Save mahdi-malv/7922c8d4e3f9f82c2380c7f1e3804d5d to your computer and use it in GitHub Desktop.
Save mahdi-malv/7922c8d4e3f9f82c2380c7f1e3804d5d to your computer and use it in GitHub Desktop.
Detect scrolling up and down in a recyclerView
//تشخیص اسکرول کردن در لیست
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
if (dy > 0) {
//Scrolling down
} else if (dy < 0) {
//Scrolling up
}
}
});
@anhtt-asiantech
Copy link

@atiQkhalid
Copy link

It worked for me Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment