Created
October 1, 2018 15:14
-
-
Save hkhc/5e0aad9eb59e1e51bd5055dfe785982f to your computer and use it in GitHub Desktop.
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
| package myapp.di | |
| import androidx.lifecycle.ViewModel | |
| import dagger.Binds | |
| import dagger.Module | |
| import dagger.multibindings.IntoMap | |
| import myapp.di.MyAppViewModel | |
| import myapp.di.annotations.ViewModelKey | |
| @Module | |
| @Suppress("unused") | |
| abstract class MyViewModelBuilder { | |
| @Binds | |
| @IntoMap | |
| @ViewModelKey(MyAppViewModel::class) | |
| internal abstract fun myappViewModel(viewModel: MyAppViewModel): ViewModel | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment