How can I get my activity to update a fragment it controls? It goes like this, I have a DatePickerDialog, that when your in the Fragment its called. I have a call back to the activity to let it know when this datepickerdialog is done having a date selected that passes back the date selected. So my activity has it, but I want the Fragment that called the DialogFragment to have access to it, instead of the activity above. Is this possible?
So I have this EditSessionActivity
, that in it calls the SessionEdit Fragment
. Which loads the fragment with UI and a date button, when that is clicked a DialogFragment
called DatePickerDialogFragment
is launched, this works great, and calls back to the EditSessionActivity
that implements the OnDialogDoneListner
that I wrote. The data is there, but I want to push that data back to the SessionEdit
fragment to update its UI. How would I go about doing this?
Earlier today I thought I was going to easily get this to work, tried to answer something here:
How to create datePicker and timePicker dialogs in fragment class?
realizing that my UpdateDisplay (From the link above) there in the above link does zilch for updating the buttons text from the calling fragment like I want.