Q/A (was: Some doubts)
See original GitHub issueHi!
I’m working on an app I want to use Nucleus for MVP+Rx.
I have some doubts, and I couldn’t find any solution in the documentation/wiki. Could you please help me?:
-
How can I use two instances of the same view, and make each of them have their own instances of their presenters? Is it possible by telling the
PresenterStorage
with ID to use? Or by any other way? -
Why is the presenter being destroyed and pointed to null in the
onPause
method instead of doing so inonDestroy
? The documentation seems to be out of date. What if I want to stack several activities of the same type, and want them to keep their presenters while not destroyed by the system? Is that working because you passisFinishing()
to the delegate? -
I think we need more documentation about the
restartable*
methods inRxPresenter
. I know that it is documented in the code with Javadoc, but I think it would be great to add some explanation in the wiki. Something like thedeliver*
methods documentation (btw, some of them seem to be out of date since you released version 2.0.1).
Thank you very much. Your library is great. Cheers, M.
Issue Analytics
- State:
- Created 8 years ago
- Comments:64 (33 by maintainers)
I would use a separate presenter for each fragment. One view - one presenter.
If you do not need a presenter for the activity itself, you don’t need to extend
NucleusAppCompatActivity
. All view classes can work independently. I advise you to look inside them, they are very simple and must be very easy to read.@inorichi I’m always using the factory methods to eliminate reflection and use the constructor to set the factory.
So I have