Created
April 22, 2019 13:08
-
-
Save Philio/c9084bf4798c7a3e0a81a4dd5bc0e34d to your computer and use it in GitHub Desktop.
This file contains 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
public class MyApplication extends DaggerApplication { | |
@Override | |
protected AndroidInjector<? extends DaggerApplication> applicationInjector() { | |
AppComponent appComponent = DaggerAppComponent.create(); | |
BindingComponent bindingComponent = DaggerBindingComponent.builder() | |
.appComponent(appComponent) | |
.build(); | |
DataBindingUtil.setDefaultComponent(bindingComponent); | |
return appComponent; | |
} | |
} |
This file contains 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 MyApplication : DaggerApplication() { | |
override fun applicationInjector(): AndroidInjector<out DaggerApplication> { | |
val appComponent = DaggerAppComponent.create() | |
val bindingComponent = DaggerBindingComponent.builder() | |
.appComponent(appComponent) | |
.build() | |
DataBindingUtil.setDefaultComponent(bindingComponent) | |
return appComponent | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment