How to use Adapter.notifyDataSetChanged() in MainActivity?
I have created a list with a RecyclerView, and would like to be able to update this now in the MainActvitiy, the context comes from a fragment which comes from the MainActivity, but I just can't use
Adapter.notifyDataSetChanged()
In the fragment it works, and it updates the list, how do I get the context from the fragment b.z how can I use Adapter.notifyDataSetChanged() also in the MainActvitiy?
Adapter.kt
class Adapter(val context: Context) : RecyclerView.Adapter() {
var dataList =...