New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presenter lifecycle tied to Activity's #30
Comments
@cxzhang2 What is your other proposal? Presenters need to be notified during activity lifecycle changes... |
Sorry, clarification: As you said, presenters should be notified of activity / fragment lifecycle events, but they should also survive configuration change. I have seen so far two general approaches to this problem (there are also external libraries that are explicitly for this purpose but I'm not too familiar with them):
As far as I can tell, the presenters in this project are destroyed and re-instantiated on configuration change. Just wondering if I'm missing something or maybe this is a special case where such considerations do not apply. Thanks! |
@cxzhang2 Yes, presenters are re-instantiated on every configuration change. There was no purpose to make them survive it initially. You can expose |
Thank you @kboyarshinov , and yes you are right about the second example. I originally thought that Instances of parent components held references to instances of subcomponents. Thinking about this now it makes no sense in terms of scoping. Doh. |
Hi guys,
It looks to me as though the presenters' lifecycles are coupled to their instantiating activity's. Please let me know if I missed something, and whether or not this is a conscious design choice.
Thank you!
The text was updated successfully, but these errors were encountered: