Android-cleanarchitecture: FragmentManager

Created on 11 May 2016  路  2Comments  路  Source: android10/Android-CleanArchitecture

I have an activity with lots of fragments which are replaced in one container. I have an own NavigationManager class which handle the fragments and do the replacement and other things with the fragments.

Where is the best place to instantiate and manage the NavigationManager (View or Presenter)?

discussion question

All 2 comments

Presenters, in theory, should have any view logic in them. So anything that imports com.android.* shouldn't exist in the presenter.
Since your NavigationManager is tightly coupled with Fragments it would be part of the "View" You can still abstract it away and be able to call it from the Presenter, though.

You have probably (hard to tell what you have without any code) something similar to Navigator.java.

Was this page helpful?
0 / 5 - 0 ratings