-
Notifications
You must be signed in to change notification settings - Fork 1
Dagger2
Weiyi Li edited this page Apr 1, 2018
·
23 revisions
The following 3 articles introduce how to use Dagger2 in a real Android App Project.
In part1, to attach activities/fragments to dagger graph, it create a lot boilerplate classes and needs a lot repetitive tasks, so is too complicated, so just walk through part1.
In part2, use @ContributesAndroidInjector
to simplify dagger graph, check this commit for details
In part3, use DaggerActivity
, DaggerFragment
, DaggerApplication
to reduce boilerplate in your Activity/Fragment/Application, use AndroidInjector<T>
in your dagger components to reduce boilerplate too.