Skip to content

Instantly share code, notes, and snippets.

@konmik
konmik / gist:6ac725fa7134402539c4
Last active September 8, 2020 21:36
Dagger 2 injection with inheritance
/**
* This class allows to inject into objects through a base class,
* so we don't have to repeat injection code everywhere.
*
* The performance drawback is about 0.013 ms per injection on a very slow device,
* which is negligible in most cases.
*
* Example:
* <pre>{@code