package keijumt.todoapp import android.support.v7.app.AppCompatDelegate import dagger.android.AndroidInjector import dagger.android.support.DaggerApplication import keijumt.todoapp.di.AppAutomaticInjector import keijumt.todoapp.di.DependencyInjector /** * Application Class */ class App : DaggerApplication() { companion object { private var instance: App? = null fun getApp() = instance!! } override fun onCreate() { super.onCreate() AppCompatDelegate.setCompatVectorFromResourcesEnabled(true) instance = this AppAutomaticInjector.init(this) } override fun applicationInjector(): AndroidInjector<out DaggerApplication> { return DependencyInjector.initialize(this) } }