-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Noirter de Villefort edited this page Jan 30, 2023
·
3 revisions
- BaseContract interface - basic interface for other Contracts. Here you write your basic methods for Views and Presenters.
- BasePresenter class - need to be parent for other Presenters. Has basic logic, that you dont need to write in every Presenter, such as attachView(), init() or destroy().
- AppComponent interface - used to tell Dagger about an object (Activity) that requires a dependency(Presenter in our case) to be injected. For that, you expose a function(inject()) that takes as a parameter the object that requests injection(MainActivity in our case).
- Application class - here we create and store instance of interface, that generates the graph and annotated with @Component, in variable for call inject() in activities.
- MainModule class - here we define dependencies that would be Injected.