Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagger injection on Fragments #76

Open
rodrigodiasferreira opened this issue Sep 22, 2023 · 0 comments
Open

Dagger injection on Fragments #76

rodrigodiasferreira opened this issue Sep 22, 2023 · 0 comments

Comments

@rodrigodiasferreira
Copy link

Hi Manuel, how are you?

On the Android developers documentation it says:
https://developer.android.com/training/dependency-injection/dagger-android#injecting-activities
"When using fragments, inject Dagger in the fragment's onAttach() method. In this case, it can be done before or after calling super.onAttach()."

On the codelab about dagger it says:
https://developer.android.com/codelabs/android-dagger#9
"A Fragment injects Dagger in the onAttach method after calling super."

Which one is correct?
Would you please let me know, and correct where it is wrong, please?

Thanks a lot for the great material that you built up about Dagger.

Best regards,

Rodrigo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant