mattinger
02/12/2025, 7:38 PMJacob Applin
02/13/2025, 5:30 PMmattinger
02/13/2025, 5:49 PMLeo N
02/16/2025, 3:15 PMAlso, for those that do use hilt, do you put your ViewModelFactory instances in the Singleton scope, or in the Activity/Fragment scope?If we work with hilt, we don’t need to think about this because Hilt provides built-in support for injecting
ViewModel
instances. However, if you do have a use case where you need a custom ViewModelFactory
, the scope depends on how often you want to reuse the factory, nothing change from what you have done.mattinger
02/17/2025, 4:15 PMkevin.chiu
03/26/2025, 7:05 AM