Last active
August 13, 2018 09:03
-
-
Save charbgr/e8edcbc057e7eeb698a37069a3f7d7ed to your computer and use it in GitHub Desktop.
Inject with Dagger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DummyFragment : Fragment() { | |
@Inject | |
@Named("draftStorage") | |
lateinit var draftStorage: Storage | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
(activity as BaseActivity).component().inject(this) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment