In part 2 of this tutorial, we will learn about Field Injection. By annotating a non-private variable with @Inject, Dagger will know to set its value by referencing it directly. Field injection is used to inject variables that the System instantiates and ones which can't perform Constructor Injection. Such as: Activities, Fragments, and ViewModelProviders.
To perform the injection process on an already instantiated object (such as an Activity), we have to create and call a members-injection function in our Component that takes this particular class as an argument.
Solution on branch "2-field-injection"
GitHub: https://github.com/ktenzweiler/LearnD...
FB: https://www.facebook.com/profile.php?...
IG: / texdroid01