Last active
November 15, 2018 16:41
-
-
Save lewisevans/e606a4ec633c982f4f266b7a5ad578da 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
class MyFragment : BaseFragment<MyViewModel>() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
viewModel = viewModelWith(activity!!) | |
with(viewModel) { | |
/*DO SOME STUFF HERE*/ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The ViewModel can have anything injected into the constructor
class MyViewModel @Inject constructor(private val getRoutesUseCase: MyUseCase) : BaseViewModel()