How to check if a RecyclerView
is scrollable, ie, there are items below/above the visible area
I have a dropdown in my recycler view which works by using
This one works for me.
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
boolean isRecylerScrollable = recyclerView.computeHorizontalScrollRange() > recyclerView.getWidth();
if(isRecylerScrollable){
//do something
}
});
}