-
-
Save florina-muntenescu/07742e4703df51639ba09ade90a643e0 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
/* Copyright 2020 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
+ private val wordViewModel: WordViewModel by viewModels { | |
+ WordViewModelFactory(repository) | |
+ } | |
override fun onCreate(savedInstanceState: Bundle?) { | |
… | |
- val viewModelFactory = WordViewModelFactory(repository) | |
- val viewModel = ViewModelProvider(this, viewModelFactory).get(WordViewModel::class.java) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment