https://kotlinlang.org logo
#dagger
Title
m

myanmarking

10/13/2021, 9:33 AM
with dagger, i used to have a navigator class scoped with activity, and i injected the same class in fragments viewmodels to share some logic. It seems to be not possible with Hilt, unless using a shared viewModel. Is there any way i can inject an activity dependency in a fragment? It should be possible. Activities outlive fragmets so there is no possible leak there