Reputation: 12559
Here is how I try to remove item from realm and recylerview:
public void deleteHistoryTerm(int position){
mRealm.beginTransaction();
mResults.get(position).deleteFromRealm();
mRealm.commitTransaction();
mAdapter.notifyItemRemoved(position);
}
However, instead of removed item, recylerView displays an empty holder for that item and it goes away when you tap on it. What might be the cause?
Upvotes: 0
Views: 150
Reputation: 12559
I got it. I should be removing specific items as following:
mResults.deleteFromRealm(position);
Upvotes: 1