Trying to figure out what is the issue with updating RecyclerView
\'s Adapter.
After I get a new List of products, I tried to:
Update t
I've solved the same problem in a different way. I don't have data I waiting for it from the background thread so start with an emty list.
mAdapter = new ModelAdapter(getContext(),new ArrayList());
// then when i get data
mAdapter.update(response.getModelList());
// and update is in my adapter
public void update(ArrayList modelList){
adapterModelList.clear();
for (Product model: modelList) {
adapterModelList.add(model);
}
mAdapter.notifyDataSetChanged();
}
That's it.