Search in sources :

Example 1 with ActivityModule

use of com.lguipeng.notes.injector.module.ActivityModule in project Notes by lguipeng.

the class MainActivity method initializeDependencyInjector.

@Override
protected void initializeDependencyInjector() {
    App app = (App) getApplication();
    mActivityComponent = DaggerActivityComponent.builder().activityModule(new ActivityModule(this)).appComponent(app.getAppComponent()).build();
    mActivityComponent.inject(this);
}
Also used : App(com.lguipeng.notes.App) ActivityModule(com.lguipeng.notes.injector.module.ActivityModule)

Example 2 with ActivityModule

use of com.lguipeng.notes.injector.module.ActivityModule in project Notes by lguipeng.

the class NoteActivity method initializeDependencyInjector.

@Override
protected void initializeDependencyInjector() {
    App app = (App) getApplication();
    mActivityComponent = DaggerActivityComponent.builder().activityModule(new ActivityModule(this)).appComponent(app.getAppComponent()).build();
    mActivityComponent.inject(this);
}
Also used : App(com.lguipeng.notes.App) ActivityModule(com.lguipeng.notes.injector.module.ActivityModule)

Example 3 with ActivityModule

use of com.lguipeng.notes.injector.module.ActivityModule in project Notes by lguipeng.

the class SettingActivity method initializeDependencyInjector.

@Override
protected void initializeDependencyInjector() {
    App app = (App) getApplication();
    mActivityComponent = DaggerActivityComponent.builder().activityModule(new ActivityModule(this)).appComponent(app.getAppComponent()).build();
    mActivityComponent.inject(this);
}
Also used : App(com.lguipeng.notes.App) ActivityModule(com.lguipeng.notes.injector.module.ActivityModule)

Aggregations

App (com.lguipeng.notes.App)3 ActivityModule (com.lguipeng.notes.injector.module.ActivityModule)3