I've found a lot of questions about this topic, but can't find pretty elegant and effective decision. So I have Activity with a few Fragments. Activity instantiates Model (non-trivial object with a few fields). Why I can't put my Model to each Fragment as reference? I mean implement Model as Observable. Usually I see answers "put data through API fragment.setArguments(bundle)". But Why? Why I should clone object for each fragment? Also it's not useful in case, when each fragment depends on one model. When one fragment changes something in Model, another fragments must receive changes and refresh their views. What is the best implementation in my case?
Aucun commentaire:
Enregistrer un commentaire