View Code? Open in Web Editor
NEW
This example application implements MVP architecture using Kotlin, Dagger2, RxJava2 and also inject, constraint-layout, typicode api.
Home Page: https://medium.com/@ogulcan/kotlin-mvp-dagger-2-retrofit-sample-android-application-e6fe3af7acd
License: GNU General Public License v3.0
kotlin-mvp-dagger2's Issues
Thank you very much for the tutorial. Please help me to how to write unit test for this?
What if I create another activity? For example PostDetailActivity. Should I create a new Module and Component? As in here:
fun inject(mainActivity: MainActivity)
We got MainActivity, if I inject on PostDetailActivity, as injectDependcy()
:
private fun injectDependency() {
val activityComponent = DaggerActivityComponent.builder()
.activityModule(ActivityModule(this))
.build()
activityComponent.inject(this)
}
this
will yield Type mismatch
, required MainActivity
while it required PostDetailActivity
.
In BaseApp, this class is being called, but no DaggerApplicationComponent can be found inside di.module package