I\'m trying to refresh specific item in RecyclerView.
Story: Whenever user clicks on item, it shows AlertDialog. User can
I think I have an Idea on how to deal with this. Updating is the same as deleting and replacing at the exact position. So I first remove the item from that position using the code below:
public void removeItem(int position){
mData.remove(position);
notifyItemRemoved(position);
notifyItemRangeChanged(position, mData.size());
}
and then I would add the item at that particular position as shown below:
public void addItem(int position, Landscape landscape){
mData.add(position, landscape);
notifyItemInserted(position);
notifyItemRangeChanged(position, mData.size());
}
I'm trying to implement this now. I would give you a feedback when I'm through!