Could someone help me? I have 4 fragments that contain some items. I have buttons that are responsible for adding new items and editing. This involves a new class - holder. In this class, so far, I've typed 'add to Fragment number 1'. How can I change this - get a link to the fragment that I'm editing?

I will be grateful for the tips.

EDIT: One of my ideas is to send the value of the class name through the parameter. It works. Anyone have any better idea?