I have an activity that opens a menu (DialogFragment) that's being used to delete items from a list view. Information about the list item that was selected is being passed to the menu in the form of arguments ie.
DialogFragment dialog = new DialogFragment();
Bundle args = new Bundle();
args.putInt("VariableName", 42);
dialog.setArguments(args);
dialog.show(manager, "Dialog Menu");
This way I can access the variable from inside the menu. My question is how can I, upon closing the menu, call some function in the activity.