Last active
November 26, 2017 05:14
-
-
Save tolmachevroman/8234e851fd70be0b48d2b87dee82dfaf to your computer and use it in GitHub Desktop.
Medium Post 2. ViewModel instantiation
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
class RestaurantsMapActivity : AppCompatActivity() { | |
private lateinit var restaurantsViewModel: RestaurantsViewModel | |
override fun onCreate(savedInstanceState: Bundle?) { | |
// ... | |
restaurantsViewModel = ViewModelProviders.of(this, viewModelFactory) | |
.get(RestaurantsViewModel::class.java) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment