Ivann Ruiz
01/03/2020, 5:34 PMViewModel
be a LifecycleObserver
so it can react to the view's lifecycle? There's some good arguments for each scenario: on one hand we don't want the ViewModel
to "_know"_ about the view's lifecycle, however, it may also help make the View
as dumb as possible and have more logic be done on the ViewModel
.Hitender Pannu
01/04/2020, 10:03 AMDaniel
01/05/2020, 6:56 PMonActivityPaused()
method there since I need to remove some things from the view when it goes into the background)Hitender Pannu
01/06/2020, 4:26 AMIvann Ruiz
01/06/2020, 8:27 PMViewModel
but I think I can avoid opening Pandora's box and just override the appropriate lifecycle function from the fragment and just call ViewModel
from there. Thanks for the tips though!Daniel
01/06/2020, 8:29 PMIvann Ruiz
01/06/2020, 8:32 PMinit { ... }
function though.Daniel
01/06/2020, 8:35 PM