LiveTyping / u2020-mvp

[DEPRECATED] Port of Jake Wharton's U2020 sample app with use of MVP and Dagger 2
Apache License 2.0
314 stars 53 forks source link

Implement interaction onActivityResult method from Activity to Presenter #14

Open cosic opened 9 years ago

cosic commented 9 years ago

There is a problem that onActivityResult Activity method invokes early than onStart(), where calls Presenter.takeView(view) and Presenter.onLoad(), correspondingly. Now we must do few hacks for storing of onActivityResult data for correctly using it at onLoad method. I think we should do it more properly.

defaultbr commented 7 years ago

Any solution or workaround? im stuck in a new project because this. My only guess is to use OnCreate/OnDestroy or create some kind of ping pong to check if something has changed on the view or its variables after onStart is invoked... any suggestion?

IgorGanapolsky commented 7 years ago

@defaultbr Just as a side question, have you tried looking into Android Architecture Components (https://developer.android.com/topic/libraries/architecture/guide.html#recommended_app_architecture) instead of the old-school MVP pattern?

cosic commented 7 years ago

@IgorGanapolsky Hi! Yes, we saw Architecture Components and we interested in to try them in our next real project. @defaultbr But now we're using Moxy framework. I guess you heard about it. Moxy better then our MVP concept. They fixed almost all our problems wich we had in u2020-mvp. And it's easy to migrate from u2020-mvp to Moxy. @IgorGanapolsky Have you already tried Architecture Components in real project? It would glad to hear your opinion.

IgorGanapolsky commented 7 years ago

@cosic I have not heard of Moxy until now. I've looked at it, and it's pretty interesting. In the past I've used Mosby framework: https://github.com/sockeqwe/mosby. It is similar, I guess.

To answer your question about Architecture Components - I am still learning them. I believe it is the way to go for many new apps, since it's part of the Support Library and is so easy to integrate.

cosic commented 7 years ago

@IgorGanapolsky Yes, it's similar. But as far as I think it more simple than Mosby. I advise you to try.