dagger - How do I finish an Activity from within a mortar Presenter or a View? -


how finish activity within presenter or view in mortar sample app?

the majority of time want avoid doing this. in dire circumstances follow same pattern actionbarowner[0] class implements. create injectable class exposes activity#finish via interface.

item 3 in [1] related calling order inverted. (activity lifecycle methods presenters instead of presenters activity methods).

hope helps!

[0] https://github.com/square/mortar/blob/master/mortar-sample/src/main/java/com/example/mortar/android/actionbarowner.java

[1] mortar + flow third party libraries hooked activity lifecycle


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -