Skip to content

Instantly share code, notes, and snippets.

@vferreirati
Created October 7, 2018 21:44
Show Gist options
  • Save vferreirati/41dd6d0f444dababfa492d7ad6905c1c to your computer and use it in GitHub Desktop.
Save vferreirati/41dd6d0f444dababfa492d7ad6905c1c to your computer and use it in GitHub Desktop.
// This is the NotesList activity Component (Which could be turned into a generic one)
component = DaggerNotesActivityComponent
.builder()
.notesActivityModule(NotesActivityModule(this)) // Extra step, since the module requires the context to provide a RecyclerViewAdapter
.notesApplicationComponent(NotesApplication.get(this).getComponent())
.build()
// This is the EditorActivity Component (The one which would be deleted in favor of the generic one)
component = DaggerEditorActivityComponent
.builder()
// Doesn't require the extra step .notesActivityModule(NotesActivityModule(this))
.notesApplicationComponent(NotesApplication.get(this).getComponent())
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment