Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Dagger injection on Fragments #76

@rodrigodiasferreira

Description

@rodrigodiasferreira

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions