mercredi 30 décembre 2015

Android MVP design - few views in same screen

I have an activity with collapsing toolbar layout content, provided by domain layer, and two fragments, which will be shown simultaneously on tablets. Fragments need content from domain layer as well.

What is the best way to implement MVP?

Should presenter have link only to activity? So should fragments interact with app through its activity? It's seems obvious, but this breaks idea, that fragment is independent and reusable view object and make many problems, like when activity receive update for fragment, when it doesn’t present and don't have content for just created fragment.

Aucun commentaire:

Enregistrer un commentaire