I have a recycler view in which I load some data from the server when user scroll to bottom I want to show a progress bar and send another request to the server for more dat
Fetching the data from server is a Async Task. So you need to enclose the updation code in a runOnUiThread runnable. to change UI.
runOnUiThread(new Runnable() {
@Override
public void run() {
mUsers.remove(mUsers.size() - 1);
mUserAdapter.notifyItemRemoved(mUsers.size());
//sending request to server for more data
moreDealsRequest();
mUserAdapter.notifyDataSetChanged();
mUserAdapter.setLoaded();
}});