Skip to content

Instantly share code, notes, and snippets.

@kirich1409
Created November 11, 2019 19:00
Show Gist options
  • Save kirich1409/15c15b53726964798c9c7da961275b00 to your computer and use it in GitHub Desktop.
Save kirich1409/15c15b53726964798c9c7da961275b00 to your computer and use it in GitHub Desktop.
class MyFragment : Fragment() {
@Inject
lateinit var dependency: Dependency
override fun onAttach(context: Context) {
super.onAttach(context)
getAppComponent().inject(this)
}
private fun getAppComponent(): AppComponent {
// Get AppComponent
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment