I have main activity like this:
MainActivity and ExampleFragment
I need to update my fragment when some one change something in spinner. I know i can use interfaces, and im using it in my application but in this case i cant do that. I searched some many topics in stackoverflow and there i found only this:
if (myFragment.getArguments() != null) {
myFragment.getArguments().putParcelable(Constants.USER,user);
myFragment.getArguments().putParcelable(Constants.PATIENT,pickedPatient);
}
I was trying detach and then attach my fragment to refresh, but data in bundle is not updated, and my fragment is just empty. I checked my logs and old data is still available.
Is there any solution for that problem? Or can I access my toolbar with spinner in my fragments and then update data in whole activity?
Some example with my another fragment here: