Created
March 2, 2018 17:22
-
-
Save arnaudgiuliani/f4d1ce24f768a16020aa23ccce3a21ff to your computer and use it in GitHub Desktop.
Koin 0.9.0 - Dynamic parameter setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DetailPresenter(val view : DetailContract.View) : DetailContract.Presenter { | |
| override fun getDetail(id: String) { | |
| // Get detail and notify it to view ... | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val appModule = applicationContext { | |
| // Presenter for Detail View | |
| factory { params -> DetailPresenter(params["DETAIL_ACTIVITY"]) as DetailContract.Presenter } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment