i have recycler and use the endless recycler(Link) for load data from server with volley i have a problem! when load next page for example load page 2 and when recycler update , recycler refresh and goes to first position and i do not want goes to first i want show continuation of the list. please help me?!
my code :
recyclerView.addOnScrollListener(new EndlessRecyclerOnScrollListener(manager) {
@Override
public void onLoadMore(int current_page) {
int lastFirstVisiblePosition = ((GridLayoutManager) recyclerView.getLayoutManager()).findFirstVisibleItemPosition();
((GridLayoutManager) recyclerView.getLayoutManager()).scrollToPosition(lastFirstVisiblePosition);
LoadMore(current_page);
}
});