I have a model inside an Activity, and a Fragment within this Activity needs access to it. I am currently passing it through the Fragment bundle, but why can't I just access it from the Activity within the fragment?
For example, I would use this code inside the fragment onCreate():
Model model = ((ActivityWithModel) getActivity).getModel();
In general, why cant this always be the method in which the Activity and Fragment share objects, or in which the Activity passes the parameters to the Fragment? Why is the Fragment bundle needed?