I am using Firestore Paging Adapter for loading a list of data and displaying it in RecyclerView. I set onClickListener on each item loaded and I would like to remove item from RecyclerView if it is pressed. How can I do that. I get pressed item with
val pressedUserRealtion = getItem(adapterPosition)?.toObject(UserRelation::class.java)
and I would like to delete this item from my RecyclerView. I searched and couldn't find any method that would do that, I can't get the reference to list that contains loaded items. The only thing I can think of is setting the view visibility to GONE when user selects the item.