Sometimes, all items of the recyclerView are already visible to the user.
In this case, it wouldn\'t matter to the user to see overscroll effect, be
You could try something like this:
totalItemCount = linearLayoutManager.getItemCount();
firstVisibleItem = linearLayoutManager.findFirstCompletelyVisibleItemPosition()
lastVisibleItem = linearLayoutManager.findLastCompletelyVisibleItemPosition();
if(firstVisibleItem == 0 && lastVisibleItem -1 == totalItemCount){
// trigger the overscroll effect
}
Which you could add in the onScrolled()
of an OnScrollListener that you add on your RecyclerView
.