T
T
terminator-light2019-06-25 17:05:42
Android
terminator-light, 2019-06-25 17:05:42

How to build communication between presenters?

How should communication be organized between the MainActivity presenter and the Fragment/Controller(Conductor's View) presenters when implementing a Single Activity?
So far, there are 2 options:
1) The Fragment presenter has a link to the MainActivity presenter and calls its methods
2) Fragment directly calls the methods of MainActivity, and it calls the methods of its presenter
And another question:
Is it permissible to have initialization methods in the View (init..., setup. ..) and call them in the View constructor, or do you still need the presenter to call them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Varakosov, 2019-06-26
@terminator-light

Presenters must be connected through the data layer. But if you really need it, then you can access the parent activity, through the methods of the interface, and then it already works with its presenter itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question