How can the RecyclerView adapter talk back to parent layout?

Viewed 34

I got a parent layout activity_main.xml layout with multiple views inside it, one of which is the RecyclerView view.

What happens is that, within the recycler view, there are buttons that, once the user deals with, I would like things to happen in the parent layout that is activity_main.xml.

For example, if I press a button on a ViewHolder item inside the child RecyclerView, in some cases, I would like changes to happen in the parent activity_main.xml layout.

However, my problem is that I don't know how to allow for this communication to happen.

Any suggestions on what might be the best practices for such cases?

1 Answers
Related