public void clear(List<?> list){
  int size=list.size();
  list.clear();
  notifyItemRangeRemoved(0,size);
}

public void clear ( List < ? > list ) { int size = list . size ( ) ; list . clear ( ) ; notifyItemRangeRemoved ( 0 , size ) ; }
clear the list of the adapter
