0

I just want to know what is the perfect way to notify data changed as I change data of RecyclerView.I am changing the whole list of recyclerView and want to inform about it.

    fun filterData(filteredList:List<PhoneNumberInfo>){
        contactList = filteredList
        notifyDataSetChanged()
    }

The filterData method is inside the RecyclerViewAdapter, and I am calling it outside the class. Do you have any idea? I don't want to recreate the adapter really.

Thank you in advanced.

0 Answers0