https://kotlinlang.org logo
#android
Title
# android
f

Francesco megna

06/30/2018, 10:34 AM
Anyone know a good and complete resource about Dagger 2? i want to inject various thing, like context or retrofit interface in my view module and other stuff like that
l

Lucas Ł

06/30/2018, 10:38 AM
Many of the example git repositories and tutorials don't show newest features. Official documentation would be your best bet, or try looking for a relatively new or recently updated examples. If you don't care about using the latest features, one or both of the mentioned at the top is a good starting point.
g

gildor

06/30/2018, 12:33 PM
It's big topic and really depends on your use case. It's easy for Retrofit (no dependency on context), more tricky for activity/fragment/view contexts, you need separate scope that reapects lifecycle of those components
5 Views