I have a DialogFragment in which I can handle events in two ways:

  1. to process the activation from which it was called:

     ((MainActivity) getActivity()).okClicked(); 
  2. process directly to DialogFragment .

How to do right?

  • one
    Where you see fit. Without a task context, to say unequivocally - it is impossible - Silento
  • what kind of event? Is an activation environment required for its execution? The question is too general to give a useful answer. Both ways will be correct depending on the problem being solved. - pavlofff

0