Open ravi7874 opened 7 years ago
I have the same issue, did you find any solution ? thank you
`recyclerView = (SuperRecyclerView) view.findViewById(R.id.recyclerView);`
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());
recyclerView.setLayoutManager(layoutManager);
recyclerView.setRefreshListener(this);
recyclerView.setupMoreListener(this, 1);
recyclerView.setRefreshingColorResources(android.R.color.holo_orange_light, android.R.color.holo_blue_light, android.R.color.holo_green_light, android.R.color.holo_red_light);
While Adding more items in adapter Use below code :
if (response.body() != null) {
if (response.body().size() > 0) {
offset += response.body().size();
adapter.add(response.body());
} else {
recyclerView.removeMoreListener();
recyclerView.hideMoreProgress();
}
}
Thanks!! You saved my life :D
When i scroll to second last item and hold to that item OnMoreListener continuously run and executes code. Check video in below attachment.
WhatsApp Video 2017-05-26 at 3.35.29 PM.zip