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'm working with RecyclerView and both the remove and the update work well.
1) REMOVE: There are 4 steps to remove an item from a RecyclerView
list.remove(position);
recycler.removeViewAt(position);
mAdapter.notifyItemRemoved(position);
mAdapter.notifyItemRangeChanged(position, list.size());
These line of codes work for me.
2) UPDATE THE DATA: The only things I had to do is
mAdapter.notifyDataSetChanged();
You had to do all of this in the Actvity/Fragment code not in the RecyclerView Adapter code.