voben
12/28/2019, 4:16 AMgetViewModel()
, it will eagerly create an instance of your SigningViewModel as soon as the class is instantiated. Even though onCreate has not yet been called. What you need to do is lazily obtain the instance of your viewmodel by using
private val viewModel: SigningViewModel by viewmodel()
OR if you want do this inside of oncreate call getViewModel
from within onCreate