Last active
August 19, 2018 15:37
-
-
Save ibrahimsn98/672f7dc9a230fbb1e94eb8373e27ae83 to your computer and use it in GitHub Desktop.
android-mvvm-with-dagger-2
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
@Singleton | |
@Module | |
abstract class ViewModelModule { | |
@Binds | |
@IntoMap | |
@ViewModelKey(ListViewModel.class) | |
abstract ViewModel bindListViewModel(ListViewModel listViewModel); | |
@Binds | |
@IntoMap | |
@ViewModelKey(DetailsViewModel.class) | |
abstract ViewModel bindDetailsViewModel(DetailsViewModel detailsViewModel); | |
@Binds | |
abstract ViewModelProvider.Factory bindViewModelFactory(ViewModelFactory factory); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment