diff --git a/app/src/main/java/keijumt/devandroid/activity/BaseActivity.kt b/app/src/main/java/keijumt/devandroid/activity/BaseActivity.kt index ae3450d..fbb3c54 100644 --- a/app/src/main/java/keijumt/devandroid/activity/BaseActivity.kt +++ b/app/src/main/java/keijumt/devandroid/activity/BaseActivity.kt @@ -1,9 +1,25 @@ package keijumt.devandroid.activity +import android.arch.lifecycle.ViewModelProvider +import android.support.v4.app.Fragment import android.support.v7.app.AppCompatActivity +import dagger.android.AndroidInjector +import dagger.android.DispatchingAndroidInjector +import dagger.android.support.HasSupportFragmentInjector +import keijumt.devandroid.di.Injectable +import javax.inject.Inject /** * Activityの基底クラス */ -abstract class BaseActivity : AppCompatActivity() { +abstract class BaseActivity : AppCompatActivity(), HasSupportFragmentInjector, Injectable { + + @Inject + lateinit var viewModelFactory: ViewModelProvider.Factory + @Inject + lateinit var androidInjector: DispatchingAndroidInjector + + override fun supportFragmentInjector(): AndroidInjector { + return androidInjector + } } \ No newline at end of file