I’m having an issue with dependency injection with Dagger, and using the MVP architecture, on a view which has dynamic tabs.
My activity is consisted basically of multiple tabs, which each tab has just a list of items (thus they all will be using the same Fragment class), and they all will use the same presenter class too (different instances). The number of tabs that I’ll be showing is based of a response I get from my server.
The problem is because dagger works on top of classes types, and I need to work on some sort of index to correlate the tab view and it's presenter.
I can't use the same instance of the presenter for all fragments because the presenter also keeps an reference to it's own fragment.
How can I achieve this kind of dynamic injection with dagger?