/** * Callback method to be invoked when the RecyclerView has been scrolled * * @param recyclerView The RecyclerView which scrolled. * @param dx The amount of horizontal scroll. * @param dy The amount of vertical scroll. */ @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); if (canLoadMoreItems()) { onScrolledToEnd(layoutManager.findFirstVisibleItemPosition()); } }