Folks, if we create a class **MyDialog** that is derived from **DialogFragment** class and **MyDialog** must mutate a field defined in **MainActivity** class whenever a certain button defined in **MyDialog** is clicked, what is the recommended approach (or design pattern) to realize this scenario?
Some people invoke **getActivity** (to obtain **MainActivity** reference) from **MyDialog** and mutate the field of **MainActivity**.
I feel this approach seems to be tightly coupled between **MyDialog** and **MainActivity**.