Results From A Dialogfragment To An Activityfragment
I have a DialogFragment, that depending on how it's called, will either pop up a dialog, or start an Intent, based off of results from the dialogFragment. Essentially, my DialogFra
Solution 1:
My solution: Create an interface to receive the data from the Dialog. Pass the appropriate class to the Dialog, and let each function decide what it is going to do.
publicinterfaceListViewDialogReceiver {
abstractvoidOnListViewDialogReceived(FragmentActivity activity,AbstractItemType itemSelected);
}
Other than that, it's merely creating an appropriate instance of ListViewDialogReceiver, to call the class.
After thinking about this a bit, I could also simplify the interface, assuming that the class is created from the main function. Still, this interface gives me all of the flexibility I might need in the future to handle anything.
Post a Comment for "Results From A Dialogfragment To An Activityfragment"