varuni varuni - 1 month ago 18
Android Question

toast after removing last item from recyclerview android

I have a recyclerview with an adapter. I am using the following method in onbindviewholder to remove the items from the list.

List<MyList> myList;
Adpater myAdapter = myList.get(position);
myList.remove(position);
notifyDataSetChanged();


I want a toast after the last item is removed from the list. Please help.

Answer

Set toast after myList.remove(position); line.