title: Multiple Activities / Fragments and the Model View Presenter pattern
body: <p>Firstly, I know that with Model View Presenter there are different implementations, and in my mind as long as you have the layers of abstraction clearly defined and doing their appointed roles then how you implement this pattern is open to interpretation.  I have been implementing this pattern in quite a few apps where there was just one <code>Activity</code>.  I've now started a new project that has multiple Activities and attached <code>Fragments</code>, including nested fragments (<code>ViewPager</code>).</p>
  
  <p>I'm now trying to translate the MVP to this project and I've hit a concept wall and would like some guidance and insights.</p>
  
  <p>So far I've created the above structure and started to do a 1 : 1 relationship with View &amp; Presenter (regardless of <code>Activity</code> or <code>Fragment</code>).  I feel that this is OK, however if for example I sent a request to do something from an <code>Activity</code> View to its Presenter, which returns a result to the <code>Activity</code> View how would I go about propagating the result i.e. update all the other Activities/Fragments that are currently not in a <code>Paused()</code> or <code>Stop()</code> state.  I feel like in this case there should be a central Presenter that updates all necessary Activity and Fragment Views, but I'm not sure how to go about doing this.  </p>
  
  <p>Currently when each <code>Activity</code> and <code>Fragment</code> is created it creates a new instance of a Presenter class, passing in itself as a reference (the Activities and Fragments implement their own interfaces), which the presenter stores as a <code>WeakReference</code> and can invoke the relevant interface methods when returning a result.  </p>
  
  <p>According to the docs whenever <code>Fragments</code> want to communicate with one another and the attached <code>Activity</code> you should use a callback interface.   With this in mind should I have one callback interface that the Activity implements and the <code>Fragments</code> callback to whenever they request something, so in essence only the Activity would have a Presenter and Model layer that the Fragments have to callback to in order to make various requests?</p>
  
  <p>Sorry if this sounds a bit muddled, hopefully this is clear enough to understand what I want to achieve, and if I’m thinking along the right lines... or totally off the mark!</p>