Interesting approach, I’ll definitely play around with this pattern.
So far I’ve solved this problem with Mortar + scoped Dagger2 components. It does work, but it is far from trivial and needs a hefty amount of boilerplate to work.
I have 2 questions:
- How do you see this pattern working with plain Views instead of Fragments & Activities?
- In your experience, doesn’t it cause same problems that presenters are only available for Fragments in onResume? For example if the Fragment has a ListView in it and the data for the list adapter comes from the presenter, then on rotation, that data needs to be available during the reconstruction of the ListVew (onCreateView) so that ListView can retain its scroll position.