In the data object collection in the Adapter, set a variable to indicate whether the current item status is to display the delete small icon or not. When long pressing a single item, change the value of the deletion status variable of all data in the collection, and use notifyItemRangeChanged (0, the number of all items - 1) to notify RecyclerView that the status of all items has changed, and then trigger a re- Call onBindViewHolder, and display the icon based on whether the item displays the delete icon status.
In the data object collection in the Adapter, set a variable to indicate whether the current item status is to display the delete small icon or not. When long pressing a single item, change the value of the deletion status variable of all data in the collection, and use notifyItemRangeChanged (0, the number of all items - 1) to notify RecyclerView that the status of all items has changed, and then trigger a re- Call onBindViewHolder, and display the icon based on whether the item displays the delete icon status.
The logic is written into bindView. When it needs to be changed, modify the flag value and notifyDataSetChanged